|
-
v6 Mediaplayer fd display
I must be confused...
How do you tell the mediaplayer component to include the fd graphic created with Mr. Brandt's FD creator? I have them in the same directory as the mp3s, and the selector box asks if I want to include the fd files...
What am I missing?
Chipal
-
If you have chosen a skin that supports fd display and selected the box you mention, it should work 
Just like the mp3 files the fd files stay external so you have to upload them to your server into the same directory the mp3 files are in. They are not integrated into the generated swf file.
-
Directory fix
Just to follow up on this aspect for any others experiencing this situation:
My solution was to move ALL the files to the main directory of the site. Koolmoves (or Flash) will read the MP3 files from a subdirectory but (seemingly) not the FD files, even if they're in the same subdirectory.
It's working now. Is this a bug or a limitation of Flash? It does tend to clutter up the main directory...
Thanks, Chipal
-
The next version wil allow you to specify a subdirectory for the swf and loaded files.
If you want to do this on your own, see this link
http://www.adobe.com/cfusion/knowled...fm?id=tn_04157. This does not explain how to use a relative subdirectory; I have a working example if you want.
-
Thick as a Brick
I'd like to take a look at that. Some of my sites have a lot of .mp3 files, and I'd like to keep them in a separate directory.
Bob Godwin

-
If your site supports php, it's also possible to let a php file scan a directory with all its subdirectories and generate an external playlist dynamicly. That way you can maintain the subdirectory structure. If you wish, I can post such a php file.
-
Thick as a Brick
Wow. That was quick. Post it!
Bob Godwin

-
It's a php5 file so I hope your server supports that.
Code:
<?
$dir = "./";
function mp_scan ($dir){
$dh = opendir($dir);
while (false !== ($fn = readdir($dh))) if ($fn != '.' && $fn != '..'){
$fn = $dir.'/'.$fn;
if (is_dir($fn)){
foreach (mp_scan($fn) as $fn) $files[] = $fn;
} else {
$ext = substr($fn,-4);
$ext_lc = strtolower($ext);
$label = substr($fn,0,-4);
if ($ext_lc == '.mp3'){
$fd = $label.'.fd';
if ($ext == $ext_lc && file_exists($fd)) $fn = $fd;
}
if ($ext_lc == '.mp3' || $ext_lc == '.flv'){
$files[] = array('label'=>str_replace('_',' ',basename($label)), 'file'=>$fn);
}
}
}
return $files;
}
if (substr($dir,-1)=='/') $dir = substr($dir,0,-1);
$files = mp_scan($dir);
sort($files);
foreach ($files as $f) echo $f['label'].' | '.$f['file']."\r\n";
?>
Make sure the php file is in the same directory as the swf file. Don't set any media content using the gui but add a line of actionscript
mediaplayer1.setExternalPlaylist('myPHPfile.php',0 );
to the first frame the media player is in.
In it's current form, it scans for flv and mp3 (+fd) files starting in the directory the script is in. If all your files are stored in a subdirectory named media, you can change $dir = "./"; into the directory name to start there. It will recursively search through all underlying directories.
-
Thick as a Brick
Can't get it to work. All I get is the text of the .php file where the song list should be. I Have .mp3 files in a directory called "media", I changed $dir = "./"; to $dir = "./media"; with no luck. Is that the only place the directory needs to be changed?
Also, I got the media player working from a media directory using the method Bob posted, but only if the media player is in main timeline. It won't load into the main movie nor will any other .swf files that don't access the media directory.
Bob Godwin

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|