dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: GetUrl and frame

  1. #1
    Junior Member
    Join Date
    Jul 2002
    Posts
    13

    GetUrl and frame

    I am looking how to use the getUrl command to link to another webpage that has a seperate *.swf file and jump to a fixed frame inside of that movie. Is this possible?

    I have seen ways to jump from Html to a *.swf and certian frame but I'm not sure how to link from inside one movie to another movie on a different url and jump to a certian frame inside that movie?

    any help, thanks.

  2. #2
    Senior Member
    Join Date
    Sep 2000
    Location
    Pittsburgh
    Posts
    252
    hi vaport,

    if both movies will be open at the same time you could open a localConnection and have the main movie tell the child movie what frame to goto. You should be able to get all the info you need here:

    http://www.macromedia.com/support/fl...connection.htm

    the only other thing i can think of is maybe using a shared object, writing the frame number to a shared object and have the child movie read that in when it loads, but i'm not sure that would be the most efficient way.

    Hope this helps some,
    Dunc

  3. #3
    FK's Official War Driver wiReZ's Avatar
    Join Date
    Jun 2002
    Location
    wireless
    Posts
    615
    Inside your FLA, make this script on an MC that is running at all times in the FLA
    Code:
    onClipEvent(enterFrame) {
    	gotoAndPlay(whichFrame);
    }
    Then, inside the HTML of the page that you want to control, you have to use ASP. (Hopefully you have a webserver that can support ASP)
    Code:
    <*OBJECT>
    <*PARAM name="movie" value="main.swf?whichFrame=<*%=Request("whichFrame")%>">
    <*EMBED src="main.swf?whichFrame=<*%=Request("whichFrame")%>">
    <*/EMBED>
    <*/OBJECT>
    Notice the bolded text

    Then, you can make a link to the "frame" from the file that is on the page with the ASP script above like this....
    Code:
    <*a href="main.asp?whichFrame=4">click here to go to Frame 4!<*/a>
    Hopefully this helps out...

    Good luck.


    BTW, remove all asterisks
    My current rig: AMD Athlon64 3500+(Winchester Core) MSI K8N Neo2 Platinum - 1GB
    (2x512MB) Kingston HyperX DDR333 BH5 - ATI All-In-Wonder 9800 Pro 128mb - SB Audigy 2
    WD 80GB 7200RPM 8MB - WD 250GB 7200RPM 8MB - MAX 120GB 7200RPM 8MB - Dell 2001FP 20.1 LCD

  4. #4
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food
    Posts
    3,789
    The sharedobject/localconnection methods will work well if your exporting to flash player 6.
    Code:
    //first movie
    _btn.onRelease = function() {
    	getURL("http://url.com");
    	_so = SharedObject.getLocal("gotoframe");
    	_so.data.gotoframe = 27;
    	_so.flush();
    };
    //second movie
    _so = SharedObject.getLocal("gotoframe");
    gotoAndPlay(_so.data.gotoframe);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center