A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [F8] Rotating pic flash file, use SWFObject to not reset to fix pic on new page.

  1. #1
    Senior Member
    Join Date
    Jun 2006
    Location
    Charlotte, NC
    Posts
    120

    [F8] Rotating pic flash file, use SWFObject to not reset to fix pic on new page.

    Greetings all.
    I have a website that has a Flash swf on it where i just have rotating pics. The same swf is on every page, but when you click on a new page, it always goes back to the first pic...

    i've used SWFObject before to control what frame to go to in a flash file, but i don't know how to have the swf tell the webpage what pic # it is on, so that when the user goes to a new page, the proper pic appears...

    Does that make sense? how would i do that?

  2. #2
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    you would use a sharedObject... or use the swfObject to grab a var form the url/query string.. that is appened onto the html page you call/load

    www.somedomain.com/about.html?picID=5

    www.somedomain.com/contact.html?picID=1

    www.somedomain.com/gallery.html?picID=8

    etc..etc.. you get the idea... either way you want to do it is up to you.

  3. #3
    Senior Member
    Join Date
    Jun 2006
    Location
    Charlotte, NC
    Posts
    120
    thanks Whispers... the appending to add the picID i already understand w/ SWFobject...
    but is there a way to figure out what pic the swf is currently on, and send that to the next page so the swf goes right to it?
    that's the part i don't get... how do i dynamically know and add the ?? part below:
    www.somedomain.com/gallery.html?picID=??

    i'm thinking using sharedObject and everytime the pic switches having it write its' ID in a cookie... but that seems like alot of unnecessary cookie-writing...
    don't know if there's a better way...
    Last edited by famousb; 08-07-2007 at 05:05 PM.

  4. #4
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,755
    well the "LINKS" that call/load another HTML page will have the ID you want to show hardcoded into it.... so I guess Im not following that part.

    once the .swf loads.. it will KNOW the picID and display that 'pic/frame' (whatever)

    If you want to 'save' the current picID (for whatever reason).. you would have to use a sharedObject.... your basically just overwriting (called: flush'ing) the same variable whenever you (do whatever it is you want to do)...

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