Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 4th, 2004, 09:43 PM
absolutemonkey's Avatar
absolutemonkey absolutemonkey is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Boston
Posts: 116 absolutemonkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 59 m 40 sec
Reputation Power: 5
Send a message via MSN to absolutemonkey Send a message via Yahoo to absolutemonkey
PHP to Flash

HI,
Is there a way to write a subfunction in a PHP page that when it's called it tells a Flash movie that is in the PHP page to do something, like run one of it's subfunctions?

Thanks,
Travis
__________________
Travis

Reply With Quote
  #2  
Old February 5th, 2004, 03:56 AM
viga viga is offline
Troublemaker
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: In bar under table
Posts: 10 viga User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
You want to control an SWF in a php page?

Reply With Quote
  #3  
Old February 5th, 2004, 02:28 PM
absolutemonkey's Avatar
absolutemonkey absolutemonkey is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Boston
Posts: 116 absolutemonkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 59 m 40 sec
Reputation Power: 5
Send a message via MSN to absolutemonkey Send a message via Yahoo to absolutemonkey
Yea, like have a function written in the swf that runs an update, and have a submit on the php page with select choices and when the select choice gets changed it runs a subfunction in the php or maybe directly to the swf that tells it to run the update subfunction coded in the swf.

Reply With Quote
  #4  
Old February 5th, 2004, 09:11 PM
viga viga is offline
Troublemaker
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: In bar under table
Posts: 10 viga User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
You should take a look at the loadVars class. Just press F1 in flash and search for it.

Reply With Quote
  #5  
Old February 6th, 2004, 01:37 AM
absolutemonkey's Avatar
absolutemonkey absolutemonkey is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Boston
Posts: 116 absolutemonkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 59 m 40 sec
Reputation Power: 5
Send a message via MSN to absolutemonkey Send a message via Yahoo to absolutemonkey
Right, I know how to do that. I want the PHP page that the swf is in to tell the swf do stuff when certain things happen.

Reply With Quote
  #6  
Old February 6th, 2004, 01:46 AM
viga viga is offline
Troublemaker
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: In bar under table
Posts: 10 viga User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
For a php-script to be executed you have to reload the page right? Is that what you want to accomplish?

Reply With Quote
  #7  
Old February 6th, 2004, 01:34 PM
absolutemonkey's Avatar
absolutemonkey absolutemonkey is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Boston
Posts: 116 absolutemonkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 59 m 40 sec
Reputation Power: 5
Send a message via MSN to absolutemonkey Send a message via Yahoo to absolutemonkey
Nope, when you have a java select form you can write into it "onChange" so when it changes it runs a subfunction in the PHP script. I want that subfunction to activate the swf.

Reply With Quote
  #8  
Old February 6th, 2004, 04:31 PM
blatant's Avatar
blatant blatant is offline
World Domination
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: San Diego
Posts: 126 blatant User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 47 m 17 sec
Reputation Power: 6
Send a message via AIM to blatant
Quote:
Nope, when you have a java select form you can write into it "onChange" so when it changes it runs a subfunction in the PHP script. I want that subfunction to activate the swf.
I think that viga is correct, javascript cannot directly call a php function, since php is server-side and the onChange javascript would be client side. In order for any php to be executed, you're going to have to hit the server.

I've seen some posts about passing variables to the swf using the attributes tag, and you could certianly do it that way. Perhaps you could have the javascript change the attributes of the swf object tag client side though.

P.S. See this post: http://forums.devshed.com/t119579/s...882543af48.html

Last edited by blatant : February 6th, 2004 at 05:05 PM.

Reply With Quote
  #9  
Old February 6th, 2004, 08:33 PM
absolutemonkey's Avatar
absolutemonkey absolutemonkey is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Location: Boston
Posts: 116 absolutemonkey User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 59 m 40 sec
Reputation Power: 5
Send a message via MSN to absolutemonkey Send a message via Yahoo to absolutemonkey
That might work, I'll test it out.
Thanks

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > PHP to Flash


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT