A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Need help with passing swfobject variables in URL

  1. #1
    Senior Member
    Join Date
    Apr 2001
    Posts
    528

    Need help with passing swfobject variables in URL

    I have a piece of Javascript that creates a Flash file on my site with a swfobject. It uses something like this to read an XML file.

    <script type="text/javascript">
    var so3 = new SWFObject("scroller_x.swf", "scroller1", "100%", "82", "8");
    so3.addVariable("sourceFile", "xmlfiles/myfile.xml");
    so3.addVariable("fileType", "xml");


    </script>

    I have included this page as a php include as it shows on multiple pages. What happens though, is this is an image scroller and is used for navigation. When the users clicks item 10 and goes to that page, the scroller resets. What I want to do is pass along this via URL or on the page

    so3.addVariable("startAt", "10");

    to tell it where to start when the images is selected.

    Thanks in advance.

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    that should work. Of course the String "10" will need to be converted to a Number. If it doesn't work, maybe you could post your AS code, cause there is no problem with what you posted.

    gparis

  3. #3
    Senior Member
    Join Date
    Apr 2001
    Posts
    528
    I guess what I am asking is

    1) how would I pass that via a URL
    2) should I just embed that within JavaScript on the page it goes on?

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    Ah i see. Then you're in the wrong forum. You should post in the javascript/html/css.

    Also, on that thread, give more info, as to what happens when you click on item10? do you append a variable to the url? as page.php?myItem=10 or else.

    gparis

  5. #5
    Senior Member
    Join Date
    Apr 2001
    Posts
    528
    ok, thanks for your help.

  6. #6
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    Also, you should go back to blog.deconcept.com and read the part about getQueryParamValue

    gparis

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