Not signed in (Sign In)

Vanilla 1.0.3 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthormikeebee
    • CommentTimeOct 18th 2007
     
    Hi all, first time I've used SWFObject. I have a page on a site I'm building which uses SWFObject twice on the same page...

    http://www.televisionexperts.co.uk/index.php/pages/how-much/entry-level/

    Which works really well. Unfortunately in IE6 or 7 the second one only shows the text and no flash.

    Any ideas? The site is due to go live tomorrow

    Many thanks
    • CommentAuthormikeebee
    • CommentTimeOct 18th 2007
     
    Sorry it was me being daft, I had duplicate id's which was upsetting everyone but Firefox!
    • CommentAuthorAran
    • CommentTimeOct 18th 2007
     
    It is also a good idea to name you SWFObjects with different var names. Currently you have var so = .... for both definitions. You should really have so1, so2 (or some other unique naming convention) in place.

    Cheers,
    Aran
    • CommentAuthormikeebee
    • CommentTimeOct 19th 2007
     
    Cool, I'll do that. Why is that a good idea? (no knowledge of javascrip
    • CommentAuthorAran
    • CommentTimeOct 23rd 2007
     
    Mike.

    If you want to reference objecs individually then you need to have unique names (say you want one of the flash files to do something later on down the track). Otherwise you overwrite the original reference with the new one and only have a reference to the last SWFObject you created.

    Think of it like: you named all of you 8 children "Zeb". If you then asked Zeb to take out the trash, which Zeb are you actaully talking to? You want each individual to have its own name so you can identify and communicate independently. (ok, maybe a bad analogy, but you get the idea....)
    • CommentAuthormikeebee
    • CommentTimeOct 24th 2007
     
    Like the analogy! Thanks Aran.