Php & fflash newbie hell

Hi,

I’ve tried several tutorials on the web, including the one on this site, but I can’t get it going. I’m using Flash MX and want to play sounds in my flash file and load the filename of the MP3 from a php script. Any ideas (please step by step)…

thank you!

Raynstorm

Okay, this is what I come up with… it doesn’t work at all, but it could be something small (and stupid)… I added the flash action script, the php file and the debug output
in flash:


loadVariablesNum (“r.php”, 0);

_root:soundPlayer = new Sound();
_root:soundPlayer.loadSound(mp3file,true);
_root:soundPlayer.setVolume(100);
_root:soundPlayer.start();

and r.php:


<?
print ‘mp3file = “001.mp3”’;
?>

and the debug contents:


Level #0:
Variable _level0.$version = “WIN 6,0,21,0”
Variable _level0.soundPlayer = [object #1, class ‘Sound’] {
duration:[getter/setter] 0,
position:[getter/setter] 0
}
Variable _level0.<?

print ‘_root:var mp3file = " 001.mp3’;
?>

"
Edit Text: Target="_level0.msg"
variable = “msg”,
text = “_level0.msg”,
htmlText = “_level0.msg”,
html = false, textWidth = 117, textHeight = 18, maxChars = null,
borderColor = 0x000000, backgroundColor = 0xFFFFFF, textColor = 0x000000, border = false,
background = false, wordWrap = false, password = false, multiline = false,
selectable = true, scroll = 1, hscroll = 0, maxscroll = 1,
maxhscroll = 0, bottomScroll = 1,
type = “dynamic”,
embedFonts = false, restrict = null, length = 11, tabIndex = undefined,
autoSize = “none”,
condenseWhite = false

without going through the whole thing, I would say you’re definitely missing the “GET” or “POST” from your loadvariables statement.

… and that it’s _root., not _root:

pom :asian:

… and that PHP variables have a $ in front…

pom :asian: