A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Query html page to play .swf

  1. #1
    Junior Member
    Join Date
    Sep 2010

    Query html page to play .swf

    Whats the best way to have my movie play only when the homepage loads? I have the movie on every page as it is my navigational bar however I dont want it to play except when somebody loads the homepage, and I dont want to create a static version because then my site will have to load 2 versions.

    Is there some query code in actionscript to query the current URL of the loaded page? I guess I just set up a conditional statement and if its true, gotoAndPlay.

    thanks in advance.

  2. #2
    Developing For Dunkets mneil's Avatar
    Join Date
    Mar 2007
    Lincoln City
    you can use LoadVars. In the embed code or object code you can feed flash the url of the site, then in flash check that variable and if it's not the home page don't play it. Just look up LoadVars and you'll get an idea of what you need to do. If you need more help after trying it then ask away.
    Text Effects | Bubbles | Dynamic Resize
    4 weeks , 20 papers ... thats 2 dollars .....Caassshhh!

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