# Php & fflash newbie hell

**URL:** <https://forum.kirupa.com/t/php-fflash-newbie-hell/1013>\
**Category:** Uncategorized\
**Created:** [August 6, 2002, 1:30pm UTC](https://forum.kirupa.com/t/php-fflash-newbie-hell/1013 "2002-08-06T13:30:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raynstorm](https://avatars.discourse-cdn.com/v4/letter/r/3da27b/32.png) [@Raynstorm](https://forum.kirupa.com/u/Raynstorm)\
**Post date:** [August 6, 2002, 1:30pm UTC](https://forum.kirupa.com/t/php-fflash-newbie-hell/1013/1 "2002-08-06T13:30:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 6, 2002, 1:42pm UTC](https://forum.kirupa.com/t/php-fflash-newbie-hell/1013/2 "2002-08-06T13:42:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 6, 2002, 1:46pm UTC](https://forum.kirupa.com/t/php-fflash-newbie-hell/1013/3 "2002-08-06T13:46:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 6, 2002, 8:40pm UTC](https://forum.kirupa.com/t/php-fflash-newbie-hell/1013/4 "2002-08-06T20:40:08Z")

</div>

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

pom :asian:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 6, 2002, 8:41pm UTC](https://forum.kirupa.com/t/php-fflash-newbie-hell/1013/5 "2002-08-06T20:41:29Z")

</div>

… and that PHP variables have a $ in front…

pom :asian:
