all groups > flash actionscript > august 2005 >
You're in the

flash actionscript

group:

How to make my AS talk to my PHP variables?


Re: How to make my AS talk to my PHP variables? M
8/7/2005 12:00:00 AM
flash actionscript:
Watch for PHPObject from ghostwire.com
It's a good way to deal with PHP from Flash.


"ian27" <webforumsuser@macromedia.com> ha scritto nel messaggio
news:dd51cb$nm9$1@forums.macromedia.com...
[quoted text, click to view]

Re: How to make my AS talk to my PHP variables? M
8/7/2005 12:00:00 AM
Look also for amfphp.org
It's almost out.


"M" <thinice80@hotmail.com> ha scritto nel messaggio
news:dd53o2$qii$1@forums.macromedia.com...
[quoted text, click to view]

Re: How to make my AS talk to my PHP variables? David Powers
8/7/2005 12:00:00 AM
[quoted text, click to view]

You cannot use a PHP variable in ActionScript like that. Your PHP script
needs to output a name/value pair, which ActionScript then treats as a
property of a LoadVars instance. If you go to my website at
http://computerbookshelf.com/php5flash/ and follow the link for the
sample chapter, that will give you a fully worked tutorial in sending
and receiving data between Flash and PHP. You should then be able to
adapt your script to work correctly.


--
David Powers
Author, "Foundation PHP 5 for Flash" (friends of ED)
Co-author "PHP Web Development with DW MX 2004" (Apress)
How to make my AS talk to my PHP variables? ian27
8/7/2005 1:12:43 PM
Hey guys,

This is probably a straightforward question which I am struggling to find the
answer to. I have started creating a flash video player to the top of this page
<http://www.360scenes.tv/redesign_html/>. You can probably see the player at
the top of the page and the first buttoned to the right of it is currently
called "snail" - this information is feeding from the database. But the problem
occurs when I click the button and want the movie (.flv format) to load into
the movie container, nothing happens. I've currently attached this actionscript
to the button:

on(release) {
var myLV:LoadVars = new LoadVars();
myLV.onLoad = function(success) {
if (success) {
myNS.play($file0);
}
}
myLV.load("videoTRT.txt");
initializeSound ();
}

When I define the actual filename of the .flv such as:

on(release) {
var myLV:LoadVars = new LoadVars();
myLV.onLoad = function(success) {
if (success) {
myNS.play("my_video_file.flv");
}
}
myLV.load("videoTRT.txt");
initializeSound ();
}

This works fine...

The problem is occurring when I'm trying to play the $file0 php variable (this
refers to a video filename which has been uploaded)... Any suggestions?

I hope this makes some sense to somebody. Please feel free to ask me to send
any further information if I've not given enough here.

Thank you in advance.

Ian
AddThis Social Bookmark Button