Lo all u wizzards!
Well, I have this complex issue which I need to solve rather fast (them contractors are breatging down my necl!).
So, this is my problem:
I have a website, with three iFrames present on it.
So there is index.htm, topframe.htm, middleframe.htm, bottomframe.htm.
I have a flash movie in topframe which has the menu on it. So, I want to call this function written in index.htm (http://www.dynamicdrive.com/dynamicindex8/collapsemain.htm) that enables the me to control the middleframe.htm height.
So for example, if the user clicks say "NEWS" in the flash move the middlesection needs to be resized to higher to fit all the content presented in the news area.
So, how am I to accomplish this? I know some about FsCommand but can't seem to figure out the connection part. :confused:
Hope someone can help me out! I would really appreaciate it!
Best Regards,
Richie
this is more a frames question than Flash really. To load in frames from a different frame you need to add that to the href anchor. so something like this:
<a href="newpage.html" target="middle">
The target = tells the new page which frame to load into. I don't use frames so you will have to play around with it to get it just right. :D
I see your point but the thing is I don't want to reload the whole thing. Cause in the topframe, where the flash movie is is a mp3 player playing music. So if I reload the site there will be restart of the flash movie.
Also, loading a new htm into the middleframe will sure change the content but it won't resize the actual frame in itself. Which I need to make it look really good. The height of the middleframe is set in the index.htm file and...yeah u know...tricky tricky
See what I mean?
Best Regards,
Richie
Okay, I see, sorry I missed the whole resizing thing....
However, loading into frames does not reset thewhole site, just that frame, so having your mp3 in the top frame and loading content into the middle frame will not effect the top frame at all.
If the resizing codes are on your pages, that should work, reguardless of where the button to that page content is.
Aside from making your getURLs in flash target the correct frame to laod into this would be more of a DD script question. If you don't get a workable answer in a bit, try asking in that thread.
Good Luck.
Is there anyway to incorporate this into a flash button then.
I mean, the script is set there and with a physical button built up from html it works just fine. But I need to call this function from within flash.
I know u can call getURL from within flah so there would be a logical way to call this...right?
How to call this from within Flash:
<a href="javascript:parent.resizeFrame('5,*')">Contact/Expand Top Frame</a>
Best Regards,
Richie
It would have to be done in AS... I will have to think on this one for a bit...
something like
on(release){
//do some JS stuff here;
//resize the window code blah blah;
}
I will try to find something that will at least get you started.
okay... starting to get somewhere... little by little LOL:
First, note that JS in Flash must be on ONE line...
Second, note that this code if creating a pop up...
However, this is a starting point, and the glaringly obvious answer to your question is yes, you can use the JS in the getURL function... now to get this paired down to not being a pop up and to load in a certain frame...
I am thinking...
All of this is untested as I can't use my Flash from my work computer :D doing the best I can from memory here! okay let's llok at it logically:
on (release) {
getURL("pagetoload.htm", "middle");
}
The above will load pagetoload.htm in the frame named middle...
on (release) {
getURL(javascript:parent.resizeFrame('5,*'));
}
The above, while incomplete, is a mock up of the JS code we need implimented.... so now to put the 2 together and make them work....