SunQuest
           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 July 16th, 2003, 04:30 PM
skierbit skierbit is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 2 skierbit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
PHP into Flash

I am somewhat of a newb at PHP. I have dome a lot of forms and stuff like that but I am having some difficulty getting data INTO flash. Here is my problem

//I call the URL

URL'+quizid

//and I get something like this in return.


Code:
<numRows>3</numRows>
<questions id='questions'>
     <question id ='1'>
            <TYPE><![CDATA[type]]></TYPE>
            <BODY1><![CDATA[b1]]></BODY1>
     </question>
</questions>


How, how do I call that data into into flash and parse it out to the right variables?

Thanks for the help. Would you recomond any good PHP/Flash books?

Reply With Quote
  #2  
Old July 18th, 2003, 01:57 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
You might want to check out this article:
http://www.macromedia.com/devnet/mx...les/amfphp.html

Also, it is possible to get variables into flash using loadVars("phpscript.php" . . .), but its extremely tedioius, and the php has to format the varables so that they appear as so:

&var1=whatever&
&var2=somethingelse&

Don't quote me on that syntax though.

As far as books, i know the flash mx developer's guide has a few solid chapters on php.

P.S. If you want to get XML directly into php, one way to go is to buy the flash firefly components

Last edited by blatant : July 18th, 2003 at 02:03 PM.

Reply With Quote
  #3  
Old July 24th, 2003, 12:31 AM
jelofson jelofson is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 1 jelofson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
This is the simplist way I have found for getting data from php into flash. Note that loadVars requires mx, but you can do similar with loadvariables etc

my php file will produce something like this:

echo "&var1=Joe&var2=Smith&var3=Some+Place";

The flash actionscript looks like this..

myData = new LoadVars();
myData.load("http://localhost/test/dbase_flash.php", myData);

myData.onLoad = function() {
firstName = myData.var1;
lastName = myData.var2;
// etc.
trace (firstName + " " + lastName);
}

I have also done some xml stuff too. Let me know if you want some help with that.

Jon

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > PHP into 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 3 hosted by Hostway