471,336 Members | 1,297 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,336 software developers and data experts.

php vars to flash

anfetienne
424 256MB
how can i post my $random_digit var to flash so that it can be used within flash actionscript?
Mar 10 '09 #1
6 1434
TheServant
1,168 Expert 1GB
Don't really use flash so can't help, but PHP can only output text, so you would need something like:
Expand|Select|Wrap|Line Numbers
  1. [flash]"random_var = <?php echo( $random_digit ); ?> "[/flash]
Mar 11 '09 #2
Markus
6,050 Expert 4TB
@TheServant
You're correct, but PHP is not run within flash. You have to pass the variable to the SWF file though flashvars - or something like. Flash is great :D Try it out.
Mar 11 '09 #3
anfetienne
424 256MB
lol i know php is not run in flash.....i know how to get my flash variables to php.....ive made plenty of contact forms, my fav being one that sends a receipt of what was entered into the form to the user.

but going from php to flash is harder than flash to php and as I am a newbie at programming php outside of contact forms and mysql databases i wouldn't know where to start lol

i appreciate all your help guys......thanks
Mar 11 '09 #4
Markus
6,050 Expert 4TB
So, as a conclusion (so I don't have to merge the thread from the flash forum - yawn):
PHP will not directly interact with flash, nor can it be used within flash. You can however output from PHP into a variable, be it <param>, etc., and have flash read that.
Thread on how to pass the vars here.
Mar 11 '09 #5
TheServant
1,168 Expert 1GB
lol, I was thinking that, but wan't sure cos I never use it... It is next on my list once I have OOP done ;)
Mar 11 '09 #6
Markus
6,050 Expert 4TB
@TheServant
It's a long and dubious road, OOP. I'd say I'm about 3/4 way to understanding it and being able to use it consistently. That's enough off-topic for now :D
Mar 11 '09 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Drisco | last post: by
2 posts views Thread by xeo | last post: by
6 posts views Thread by Ws | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.