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 upgr