A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Pass Variables between 2 swf's through a Get URL

  1. #1
    Junior Member
    Join Date
    May 2000
    Posts
    6
    Here's my problem thats got me stuck - i know im not far off

    <page1.html> has <pic1.swf> embedded in it...

    <pic1.swf> has a button that loads the <audio1.swf> movie into level 5 (this is a voiceover to the picture)

    at the end of <audio1.swf> is a getURL that loads <page2.html> into the browser

    <page2.html> has <pic2.swf> embedded in it

    <pic2.swf> also has a button in it to load the <audio2.swf> movie into level 5 (this is the next voicover to the next picture)

    what i want to achieve is that if you play <page1.html>'s audio it automatically goes to <page2.html> and automatically loads <audio2.swf> over <pic2.swf> (audio=true)

    but if you got to <page2.html> directly the audio doesn't start unless you press the button

    my idea is basically getURL = slide2.html after setting the audio=true variable the send using GET .. somehow this is fed into the pic2.swf and if audio=true then loadMovie audio2.swf - for some reason the ?audio=true isn't being appended to the URL..?

    i'm using the polar lights javascript
    http://polar-lights.com/fla/url.html

    ive got a demo of all the files if anyone is interested in getting them off me - the funny thing is that it works if i run directly from the pic1.swf in flash player rather than browser..?


  2. #2
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    When you load a new page in javascript it cleans up all the variables and resets everything. The solution is to either use3 frames so the page doesn't load a completly new page or pop up a small window to hide the variables in.

  3. #3
    Junior Member
    Join Date
    May 2000
    Posts
    6

    Post but im using GET to send the variable to the next page

    I'm still stuffing about with this thing here and it appears the problem that i am having is that IE isn't appending the ?audio=true to the end of the URL - netscape is behaving itself though... If i create a HTML link on the first page that has the ?audio=true appended on the end of the URL, the swf on page 2 receives it properly...

    its really starting to break my brain..

  4. #4
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    IE won't behave itself, they use a different type of javascript than the rest of the world.

  5. #5
    Junior Member
    Join Date
    May 2000
    Posts
    6

    I've given up..

    Ive tried so many things - and im so close i can almost smell success from where i am but, im afraid im just not winning.

    I've posted all my source files at this address, if anyone is feeling adventurous...

    http://www.business.rmit.edu.au/emu/test_variables.zip

    my ICQ is 3152298 if you want to chat directly - any outcomes i will post on this thread... :P

    rock on flaskit for 100K+ memebers

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