[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Swftools-common] wait for SWF to be ready

From: Benedikt Quirmbach
Subject: [Swftools-common] wait for SWF to be ready
Date: Fri, 23 Jan 2009 18:06:16 +0100


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.

This is the workflow (in Flex and PHP):

1. From Flex call a php script that uses SWFC to create the SWF. When I call it the first time the script uses standard-data for the variables.
2. Flex loads the new swf.
3. In Flex you can change the data in the variables.
4. After changing the variables Flex calls the same php-script to create a new swf with the new data as variables.
5. Flex loads the new swf again.
6. Step 3 to 5 can be repeated several times.

What I get it:
The first swf (with the standard dat) is created without faults.
The following swfs are created without faults but when they are loaded into the Flex application, the new variable data are not inside the swf.
When I download the newly created swf everything is OK.

I think this is a timing problem.
After some experimenting I think the newly created swfs will be loaded bevor they are ready.

The php script sends the verbose output of SWFC to the Flex application.
My Flex application waits for this message. After receiving the message it tries to load the new swf.

It looks like the SWFC output is there bevor the swf is ready.

My question is now:
How can my php script figure out when the swf is completed?
Can SWFC lockk the swf it is creating until it is completed? How?
Are there any other solutions?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]