PDA

View Full Version : Dynamic Directory Buttons via Php


yubin
03-11-2004, 10:35 PM
I'm doing a dynamic mc slideshow. I created a separate swf for each folder. I have 3 folders. I want to create a movie that reads the directory via PHP. i.e...
folder1
folder2
folder3

and puts those into a duplicated mcButton.
Basically I want load the folder name to the mcButton.text,
and link the mc onRelease to getURL("myVars/myswf.swf")
here's my PHP....
<?php
$folders=glob(".");
$dirs=count($folders);
$vars="dirs=$dirs";
for($i=0;$i<$pics;$i++){
$n=$i+1;
$vars="$vars&dirs$n=$folders[$i]";
}
echo $vars;
?>

I'm not sure how to load the vars into and duplicate the mcButton
and parse the vars to each button. I hope I've explained this enough.

Also... How would I load the 3 swf's inside of this movie in a specific spot?


Thanks,
Yubin

xxlm
03-15-2004, 04:49 PM
ok first when you are doing an echo for flash you need to do this:
"&yourvar=yourvalue&yourvar2=youvalue2&...&"

This is it :) :)

Then check this thread dealing with loadVars:
http://www.actionscript.org/forums/showthread.php3?threadid=43329

Use only the load (instead of sendAndLoad) method for your case.
Then in it get the var you want and set up your button and link :)

C ya