While I have not tried personally, I don't see any reason as to why this
would't work. Just ensure that the swfobject.js has loaded before you
attempt to call it (ie ensure you include the swfobject.js file before your
own .js file)

calling registerObject multiple times is definitely supported. They will all
get called on domready for the page.

Aran

On Sun, Apr 4, 2010 at 9:27 PM, Riz-Man <[email protected]> wrote:

> Hi,
>
> Is it possible to call multiple "swfobject.registerObject" from an
> external .js file?
>
> Currently, I have all the pages on my site set like so:
>
> <script type="text/javascript">
> swfobject.registerObject("myFlashContent1", "8.0.0");
> swfobject.registerObject("myFlashContent2", "8.0.0");
> swfobject.registerObject("myFlashContent3", "7.0.0");
> </script>
>
> Many of the pages on my site only have one of these Flash movies on
> display.  However, because I'm using a template system, I have to
> include the above code in the head section of all my pages (or I make
> several different templates - which isn't required).
>
> It would be a lot simpler, if I could just stick it in my external .js
> file.  If this is possible, how would I do it (call them)?
>
> Thank you.
>
> --
> You received this message because you are subscribed to the Google Groups
> "SWFObject" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<swfobject%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/swfobject?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en.

Reply via email to