PDA

View Full Version : Is it possible to Loader.contentPath from sub folders?


Dennis_gull
03-02-2007, 10:37 PM
Hello, this is my first post here. :)

Anyways im trying to load my movies dynamically from php but I have some problems with the path when using IE (works in FF), I read the macromedia files and they said its only supposed to work if you store them in the same folder anyways this is a part of the code im using:
From the .swf
ns.play(contentPath = file);
From php:
<param name="movie" value="playervideo.swf" />
<param name="FlashVars" value="file=folder/movie.flv"/>
<embed src="playervideo.swf" FlashVars="file=folder/movie.flv"

So as the title says: Is it possible to use Loader.contentPath from sub folders?

Dennis_gull
03-03-2007, 01:59 PM
It wasnt anything wrong with the code, the problem was in the ieupdate.js (click here to activate workaround)

I changed it to :

//ediy v2
n=navigator.userAgent;
w=n.indexOf("MSIE");
if((w>0)&&(parseInt(n.charAt(w+5))>5)){
T=["object","embed","applet"];
for(j=0;j<3;j++){
E=document.getElementsByTagName(T[j]);
for(i=0;i<E.length;i++){
P=E[i].parentNode;
H=P.innerHTML;
P.removeChild(E[i]);
P.innerHTML=H;
}}}

instead of:
objects = document.getElementsByTagName("object");
for (var i = 0; i < objects.length; i++)
{
objects[i].outerHTML = objects[i].outerHTML;
}

And now everything seems to work.