| | |
help with flash and php
Thread Solved |
•
•
Join Date: Mar 2008
Posts: 46
Reputation:
Solved Threads: 0
hi all
im writing a flash game, which the "brains" is in php and the client is on flash.
i've written the board in flash and now i have a 9 same movie clip in flash.
this movie clip has 4 frames in it and they all sits on the main frame.
my problem is that:
lets say that in my php file, i randomized a movie clip(lets say that the name is b21)
now i want to use this name in my flash so i could do this:
and what ever i do, it doesnt seems to work.
i can use this name on a dynamc text and show it. but i cant use it as a movie clip name.
if someone could help
thanks!
im writing a flash game, which the "brains" is in php and the client is on flash.
i've written the board in flash and now i have a 9 same movie clip in flash.
this movie clip has 4 frames in it and they all sits on the main frame.
my problem is that:
lets say that in my php file, i randomized a movie clip(lets say that the name is b21)
now i want to use this name in my flash so i could do this:
PHP Syntax (Toggle Plain Text)
b21.gotoAndStop(3);
i can use this name on a dynamc text and show it. but i cant use it as a movie clip name.
if someone could help
thanks!
Last edited by Ezzaral; Sep 2nd, 2009 at 12:08 pm. Reason: Fixed code tags.
•
•
Join Date: Jan 2009
Posts: 16
Reputation:
Solved Threads: 3
Can you post your AS code to see what you are trying to do that isn't working? You call php, get a variable which is a name, then you try to load that movieclip correct?
My code blog: http://www.joeyrivera.com
•
•
Join Date: Mar 2008
Posts: 46
Reputation:
Solved Threads: 0
yap that correct
if my php return the value "b21"
i then want to use it as
if my php return the value "b21"
i then want to use it as
PHP Syntax (Toggle Plain Text)
b21.gotoAndStop(3);
•
•
Join Date: Jan 2009
Posts: 16
Reputation:
Solved Threads: 3
What you are trying to do is use dynamic referencing. For example, try this:
var name = 'b21'; // this value come from php
this[name].gotoAndStop(3);
This code will use the value of this[name], in this case, b21 and tell b21 to gotoAndStop. Here's more info:
http://www.nunomira.com/tutorials/dy....php#functions
var name = 'b21'; // this value come from php
this[name].gotoAndStop(3);
This code will use the value of this[name], in this case, b21 and tell b21 to gotoAndStop. Here's more info:
http://www.nunomira.com/tutorials/dy....php#functions
My code blog: http://www.joeyrivera.com
![]() |
Similar Threads
- Can i call a flash function from php? (PHP)
- Flash + PHP Sockets (PHP)
- Adding Flash in PHP file (PHP)
- Contact form Flash/PHP sends with Text Formatting (PHP)
- php socket server - can't connect from flash xml client socket (PHP)
- How to send email from flash8..using php or asp (Graphics and Multimedia)
- Professional Web design Services (Flash, PHP, SQL, HMTL, CSS) (Web Development Job Offers)
Other Threads in the PHP Forum
- Previous Thread: how to store image in a folder and mysql
- Next Thread: youtube Video in php
Views: 342 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache archive array beginner box buttons cakephp check checkbox class cms code combobox css database date directory display download dropdown drupal dynamic echo email error file files form forms functions header hosting href htaccess html image include insert integration ip java javascript joomla jquery limit link login lookup loop mail menu methods mlm mod_rewrite multiple mysql order parse password paypal php post problem query radio recursion redirect regex remote results rewrite script search select server session sessions sort source sql storage string system table update upload url user validate validation variable video web website wordpress xml zend





