Hi
I had the same problem and my solution involved detecting the platform
that the user is detecting ad changing the path accordingly
Here is my code, you might need to change it a little
/*************************************************************
* resolveVideoURL()
* converts to the given url to the proper url depending on:
* using windows > don't do anything
* using mac and http > don't do anything
* using mac and no http > convert!
**************************************************************/
private static function resolveVideoURL(url){
var os = System.capabilities.os;
os="MacOS";
if (os!="MacOS" ) {
// not mac, don't worry
return url;
}else{
//check if using http
//using _url check if we are using http
var swfUrl = _level0._url;
var substr = swfUrl.substr(0,4);
if(substr=="http"){
//using http connection, don't worry
return url;
}else{
//if using local path return url
//look for "Volumes/"
var i = swfUrl.indexOf("/Volumes/");
if(i==-1){
//local url, don't worry
return url;
}else{
//cd rom or network drive
//at the end this needs to look like
this:
// Racing:videomac:act:3005l.flv
//convert path
//example swfUrl path
"file:///Volumes/Racing/..."
//example url path "../act/3005l.flv"
//take the "file:///Volumes" part of
swfUrl first
var sta=
String("file:///Volumes/").length;
var filePath = swfUrl.substring(sta);
//split filePath
var filePath_arr = filePath.split("/");
//get rid of the last item in filePath.
This is the *.swf
filePath_arr.splice(filePath_arr.length-1,1);
//split url
var url_arr = url.split("/");
//get rid of one level in filePath_arr
for each ".." in url
for (var a=0 ; a < url_arr.length ;
a++){
var ele = url_arr[a];
if(ele=="..") {
filePath_arr.splice(filePath_arr.length-1,1);
}else{
filePath_arr.push(ele);
}
}
//concat string
var newUrl = filePath_arr.join(":");
//trace(newUrl)
return newUrl;
}
}
}
}
On 11/30/05, Woodage, Alison <[EMAIL PROTECTED]> wrote:
> Thanks Dunc...i think that will help.
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Duncan
> Reid
> Sent: Wednesday, November 30, 2005 3:30 PM
> To: Flashcoders mailing list
> Subject: Re: [Flashcoders] .flv video problems on a Mac
>
> Hi Alison,
>
> Maybe this will help:
>
> http://www.macromedia.com/go/3121b301
>
> Dunc
>
> On 11/29/05, Woodage, Alison <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I have a file that is loading .flv files dynamically and playing them
> > back via a mediaDisplay component. The swf is packaged for flash
> player
> > 7.
> >
> > Everything works fine except when run on a mac from a cd drive or
> > network drive (it is fine from a local drive, eg desktop) when flash
> > player 7 is installed. If the player is upgraded to flash player 8
> the
> > problem is resolved.
> >
> > Any ideas as to why this might be happening under flash player 7 and
> not
> > 8. And a fix?
> >
> > This is the code I'm using to load flv:
> >
> > var netConn:NetConnection = new NetConnection();
> > netConn.connect(null);
> > var netStream:NetStream = new NetStream(netConn);
> > netStream.onStatus = function(infoObject) {
> > status_txt.text += "Status (NetStream): " + newline;
> > status_txt.text += "Level: " + infoObject.level + newline;
> > status_txt.text += "Code:" + infoObject.code + newline;
> > };
> >
> > main_movie.attachVideo(netStream);
> > netStream.setBufferTime(5);
> > videoToLoad = "../video/"+videoFileArray[videoNum];
> > netStream.play(videoToLoad);
> >
> > Thanks,
> >
> > Alison Woodage
> > Lead Educational Programmer
> > Centre for Learning Innovation
> > 51 Wentworth Ave
> > Strathfield 2135
> > 02 9715 8389
> >
> > **********************************************************************
> > This message is intended for the addressee named and may contain
> > privileged information or confidential information or both. If you
> > are not the intended recipient please delete it and notify the sender.
> > **********************************************************************
> > _______________________________________________
> > Flashcoders mailing list
> > [email protected]
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
>
> **********************************************************************
> This message is intended for the addressee named and may contain
> privileged information or confidential information or both. If you
> are not the intended recipient please delete it and notify the sender.
> **********************************************************************
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders