Loading a diferent html page

i don’t know if it is possible, but here it goes:

i have html page with a swf wich is a menu, when pressed i want to load a different html page with another swf and tell it to go to a specific label.

is there a way to do this?


yes there is, if I’m reading you’re post correctly. By label, I assume you mean “frame label”. If that’s the case, this is what you do.

The first swf menu should be using getUrl(); to get the next page.

The page that’s being brought up, with the new swf in it, should be set as normal.

Check out the code on this html page which embeds the flashplayer into the page. You will see two address lines (one if you only used embed and not object tags).

These address lines should be edited. Where ever the full URL of the swf that’s being embeded, ends, you should add a ? and a var=something. like this


notice the quotes encapsulate the ?frameToGoTo=chapter2

now, if the swf that is being loaded into that player takes this variable into account it can be used to send it to a frame. like:

frame one of the Flash movie.


now this movie checks to see if frameToGoTo is “true”, meaning it has been defined. If it has, then it will send the play head to the frame label which is represented in the string variable frameToGoTo.

This is really useful if you want to use the same menu system on all your pages, but you need it to be set up a little differently each time it’s loaded. Like if you were keeping animated menu bars open to show where the person was in your page structure.

Note, you can send as many variables into the swf as you like this way simply by adding a & and a new var=something inside the quotes. Like so.


ok, i think it could work… but the frame label to wich i want to go will be specified inside the second swf…
how can i define the variable in html getting it´s value from the url sended by flash?

thanks for your help,
i’m going to try to take out the value to that varible from the last characteres of the url… don’t know how, but i’m sure it will be possible

I’m not sure I understand you’re last question here. Can you explain that a little better?

oh, I’m sorry… I do understand.

just set up multiple html pages. Each one should be exactly the same EXCEPT in the embed code. Each one’s embed code will contain a different variable after the “?”.

That’s one way to do it. If you think that’s too cluttered, which I do, you could also try this, but I’m not sure if it will work off the bat. I might have to experiement with this.

in the first swf, you do a


what this SHOULD do is load up the html page sending the variable to the page that’s being loaded.

Now in the second swf you could use


and it should load the variable from the html page into the swf.

that’s a little more tricky… like I said, it might take some work… but that’s the better way to go since it’s more dynamic in aplication.

I’m going to take a look at that tomarrow. It’s definitely something that I’d want to take advantage of, and I haven’t yet been using.