Hi.

So after the initial creation of the 1st swf on the page, there is a bit
more code involved in order to "swap" it. Basically you need to destroy and
recreate the DOM node.

Here is a good tutorial to walk you though the required bits.

http://learnswfobject.com/advanced-topics/load-a-swf-using-javascript-onclick-event/(look
at the section - "Replacing a loaded SWF with another SWF")

Cheers,
Aran

(BTW - seeing as you are relying of js timers etc to do your rotation, you
may consider using dynamic embedding using embedSWF() initially as you can
control the order / rendering etc more precisely. I would suggest to
implement the callback function in embedSWF() so that you can start your
timer at the right time)





On Mon, May 30, 2011 at 9:57 PM, [email protected] <[email protected]>wrote:

> Hi,
>
> I see all documentation but i not see how i can change my flashcontent
>
>  so i write here and hope you can unlock my probleme
>
> i need change the source of flash on random so i create my function
> random
>
> but how can change my data on my flash
>
> my code :
>
> swfobject.registerObject("logo_zz", "9.0.115", "images/
> expressInstall.swf");
> window.setInterval("chezoim()", 5000);
>
>
> function chezoim()
> {
> var randomnumber=Math.floor(Math.random()*6);
> if(randomnumber==0)var swf="yeux/Z.swf";
> if(randomnumber==1)var swf="yeux/Y.swf";
> if(randomnumber==2)var swf="yeux/X.swf";
> if(randomnumber==3)var swf="yeux/W.swf";
> if(randomnumber==4)var swf="yeux/S.swf";
> if(randomnumber==5)var swf="yeux/T.swf";
>
> var s0 = function (){
>        var att = { data:swf, width:"200", height:"50" };
>        var par = { };
>        var id = "flashContent";
>        var myObject = swfobject.createSWF(att, par, id);
>        };
> swfobject.addDomLoadEvent(s0);
>
> }
>
> but this don't work :/
>
> thx guys
>
> have a nice day :)
>
> --
> 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.
>
>

-- 
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