Benedikt Quirmbach wrote:
Hi,
some weeks ago I opened a thread here about swfc.
I am still looking for a way to find out wether a SWF is completed.
I have a swf (library-swf) made in Flash.
I want to bring some variables into this swf.
To do that I use SWFC to create a new swf with the library-swf as
background image.
In the first frame i introduce an actionscript with my varaibles.
In the library-swf is more actionscript that use this variables.
Hi Benedikt,
I'm from a background of 8 years using Flash with CGI, where our
software loads variables thousands of times a day (but please excuse me
if I've missed the point of your post).
If all you need is to pass data to php and get it (or other data) back,
then you don't need to use SWFC at all.
If you use either the loadvariables(mc,...) command or the loadvariables
object you can send changes via GET or POST and have the PHP send back
the what you need it to at the same time.
The first time in just call the loadvariables to load what you need and
have the php only save what's required when you pass it back out.
Don't be concerned that most of the documentation around loadvariables
mentions XML, we don't use any XML in our application as it wastes so
much bandwidth (5KB of data we found would be 50KB+ in XML).
Use variable=value and just escape the value.
so a typical string could be:-
&productCount=3&price0=500.00&name0=Self%20Sealing%20Stembolts&price1=25.00&name1=American%20Screwdriver&price2=0.03&name2=Screw&end=1&
If you don't use the object you need to know when all the data is loaded
the end=1 does that for you (just set end=0 before calling loadvariables
then loop over a couple of frames until end=1), you can leave that out
if you use the object, however you should always add an extra ampersand
on the end of the string so flash doesn't pick up and stray spaces or
enters that the php might output after the data.
Sorry if I've missed the point of your post, if I have then please don't
hesitate to expand your requirements and I'll help if I can!
Ian.
--
x10 via Web or Wap?
http://www.sgtwilko.f9.co.uk/bluelava/