A Flash Developer Resource Site

Results 1 to 17 of 17

Thread: simple URL question

  1. #1
    Senior Member
    Join Date
    Aug 2004
    Posts
    289

    simple URL question

    I want a link to go to a specific frame label in a seperate URL.

    I have:

    on (release) {
    getURL("index.html","_parent");
    _level0.gotoAndStop("slim");

    }

    It goes to the URL but doesn't go to the frame label "slim"

    Both movies are in the same directory...

    Can someone help me out on this?

    Thanks,

    Bluej2

  2. #2
    Senior Member
    Join Date
    Mar 2003
    Location
    New Orleans
    Posts
    191

    Maybe using php would help

    Here's the basic jist of it:

    on (release) {
    getURL("index.html&section=slim","_parent");


    Then in your "index.html" you grab the variable "slim" and direct your page to that area.

    I can be more detailed, just let me know if your new url is Flash or HTML.

    I'm guessing Flash.
    I'm only in it for the pleasure

  3. #3
    Senior Member
    Join Date
    Aug 2004
    Posts
    289
    Gotcha. I'll try it now...

  4. #4
    Senior Member
    Join Date
    Aug 2004
    Posts
    289
    what do you mean by:

    grab the variable "slim" and direct your page to that area
    I guess I need to know that before it'll work.

    Thanks,

    bluej2

  5. #5
    Living Proof mave_the_rave's Avatar
    Join Date
    May 2002
    Location
    East Dulwich
    Posts
    1,006
    lelales..

    on (release) {
    getURL("index.htmlžion=slim","_parent");

    what is 'htmlžion'
    If someone tells you it can't be done,
    it's probally because they don't know how.

  6. #6
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    It is not possible to grab a variable like that when the swf is embedded in a html page ( if its just the swf you adress it works though ). You need either to embed the recieving swf in some javascript to be able to recieve a variable in a url string OR you can also put the variable in html code, after the swf name...

    myMovie.swf?whereToGo=myFrameLabelName

    In the Flash movie you would have framelabels on the frames where you evetually want to go.

    On the first frame in Flash you would have the goto action which uses the whereToGo variable.

    if(whereToGo!=undefined){
    gotoAndStop(whereToGo);
    }


    Then it gets highly dynamic and will take you to whatever framelabel "whereToGo" have specified.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  7. #7
    Senior Member
    Join Date
    Aug 2004
    Posts
    289
    pellepiano

    It is not possible to grab a variable like that when the swf is embedded in a html page
    In effect, both swf's are embedded in different HTML (same directory)...I figured it was easier said than done.

    embed the recieving swf in some javascript
    Could you elaborate on that idea?

    bluej2

  8. #8
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    The recieving swf has to be ambedded in a script like this that graps all variables sent by the url string...

    //URlstring variables

    PHP Code:
    <script language="JavaScript">
    document.write ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
    +'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" '
    +'WIDTH=750 HEIGHT=500> <PARAM NAME=movie VALUE="knock.swf'+document.location.search+'">'
    +'<PARAM NAME=quality VALUE=high>'
    +'<EMBED src="knock.swf' +document.location.search+'" ' 
    +'quality=high  WIDTH=750 HEIGHT=500 '
    +'TYPE="application/x-shockwave-flash"></EMBED></OBJECT>')
    </
    script
    Last edited by pellepiano; 04-11-2005 at 01:22 PM.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  9. #9
    Senior Member
    Join Date
    Aug 2004
    Posts
    289
    I've never set up anything like it...(java script) string variables...I do understand the concept though...makes sense.

    What would it look like...excatly...

    bluej2

  10. #10
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Sorry, had to put the embed code in some script tags, now it should show in above post.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  11. #11
    Senior Member
    Join Date
    Aug 2004
    Posts
    289
    I see...and then the

    if(whereToGo!=undefined){
    gotoAndStop(whereToGo);
    }

    on the sending (as opposed to receiving) swf...?

  12. #12
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    No thats the goto action of the recieving swf ( I mean the sending swf should not go anywhere).

    You send the variables from the get url action by adding variables in the url string

    on (release) {
    getURL("index.html?whereToGo=theFrameLabelName");
    }

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  13. #13
    Senior Member
    Join Date
    Aug 2004
    Posts
    289
    Pellepiano (musical football player???)

    I have tried integrating the java script...to no avail. I'm using Dreamweaver and when I F12 it...it generates an extra white box right above my swf. I'm assuming (?) the java script replaces the code in the body tag...I can't figure it out.

    If you'd care to continue, I'm all for it. If not, I want to thank you for your input.

    Bluej2

  14. #14
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Yes , the javascript code IS the embed code. You have to fill in the name of your movie though in the 2 locations where the swf is mentioned in the code.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  15. #15
    Senior Member
    Join Date
    Aug 2004
    Posts
    289
    I'll try it again. Thank you.

    Bluej2

  16. #16
    Senior Member
    Join Date
    Aug 2004
    Posts
    289
    I got it to work, but the tag:

    27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=850 HEIGHT=500>
    appears above the swf when I F12 it...if I eliminate the tag, the swf disappears.

    bluej2

  17. #17
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Are you shure you used the code exactly as it is. There are a lot of quotes and stuff that can not be changed or left out.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

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