createSwf() is called internally by embedSWF(), so I don't think this would be causing the issue directly.
Basically embedSwf() : - sets visibility to false on the DOM object (the replacement <div>) then sets a dom load function to: - add params, flashvars, attributes - checks if the right flash player version is available using hasPlayerVersion() (assuming it is available) - calls createSWF() - sets visibility to true on the DOM object (now the swf <object>) - calls the callback function (if any was defined) Are you setting the visibility back to true at the right time? Aran On Tue, Mar 2, 2010 at 3:11 PM, philbuilt <[email protected]> wrote: > Aran, > Yes my swf has a pre-loader I have many swfs on my site with built-in > preloaded like the one on my home page and they all works fine. when > they are loaded from my home page swfobject.embedSWF, However when i > load them via my code above swfobject.createSWF i don't see them until > they are 100% loaded? I know they are there in the div loading but i > can't see anything and i have tried every parameter i can find. I also > tried to all the css styles on the div but nothing works? I am almost > there with my site but this screws every thing up! > > On Mar 1, 10:05 pm, Aran Rhee <[email protected]> wrote: > > His specific problem was that he was loading content further down the > page, > > and was using anchor tags in order to set the correct scroll position. > This > > ended up changing the address location. It sounds like he just used some > js > > functionality to set the correct vscroll position. > > > > In regards to your question, do you have a preloader on your swf? If not, > > then nothing is going to show on stage until the flash player has > downloaded > > enough content to display at least your first frame. Flash is a > progressive > > download format by nature, so you don;t HAVE to wait until 100% of the > file > > is delivered before playback can begin, but all classes and artwork > needed > > to display your content needs to be available before the frame will be > > rendered. > > > > This is not anything to do with SWFObject actually, but just a general > Flash > > issue/concept. > > > > Aran > > > > On Tue, Mar 2, 2010 at 11:50 AM, philbuilt <[email protected]> wrote: > > > Hello everyone, > > > I found this in my search for an answer to a problem i have which by > > > the way is identical to an old post here. > > > > >http://markmail.org/message/mfv3bu3mt7xwpagw > > > > > In the post (Shawn) found the solution but i am not sure exactly what > > > he is talking about? > > > he say's: fixed, I replaced the usage of the anchor tag with > > > javascript's > > > > > I load my swfs into a div (<div id="flashcontent"></div>) > > > > > with this javascript: > > > > > function isObject(targetID){ > > > var isFound = false; > > > var el = document.getElementById(targetID); > > > if(el && (el.nodeName === "OBJECT" || el.nodeName === "EMBED")){ > > > isFound = true; > > > } > > > return isFound; > > > } > > > function replaceSwfWithEmptyDiv(targetID){ > > > var el = document.getElementById(targetID); > > > if(el){ > > > var div = document.createElement("div"); > > > el.parentNode.insertBefore(div, el); > > > swfobject.removeSWF(targetID); > > > div.setAttribute("id", targetID) > > > } > > > } > > > > > function loadSWF(url, targetID){ > > > if (swfobject.hasFlashPlayerVersion("9")){ > > > var attributes = { > > > data:url + "?" + > new > > > Date().getTime(), > > > > id:"flashcontent", > > > width:"100%", > > > height:"100%", > > > }; > > > > > var params = { > > > menu:"false", > > > quality:"best", > > > base:".", > > > bgcolor:"#000000", > > > > > allowNetworking:"all", > > > > > allowScriptAccess:"always", > > > }; > > > var obj = swfobject.createSWF(attributes, params, > targetID); > > > > > } > > > } > > > > > Any help is appreciated! > > > PhilBuilt > > > > >www.philbuilt.com > > > > > -- > > > 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]> > <swfobject%[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]<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.
