I have an #include issue.
I have several AS files that perform setup for my movies. One loads variables, one sets styles, etc.
The problem is ActionScript doesn't wait for code to finish executing before moving on, specifically in the case of load().
So, #include "variables.as" will run and move onto #include "styles.as" before variables.as has even loaded the txt file containing the variables I want to create.
How can I make it wait programmatically?
Currently I have an onLoad call to the next AS file. BUT I don't always us the same AS file and want them to run standalone.
I could create a frame that contains stop(); #include "variables.as" and has an onLoad function do a play();
then in the next frame have a stop(); and #include "styles.as". This will most likely work... but it seems amaturish.
I want a programmatic solution, not a hard coded Timeline solution.
Can anyone help me out?
Thanks
I have several AS files that perform setup for my movies. One loads variables, one sets styles, etc.
The problem is ActionScript doesn't wait for code to finish executing before moving on, specifically in the case of load().
So, #include "variables.as" will run and move onto #include "styles.as" before variables.as has even loaded the txt file containing the variables I want to create.
How can I make it wait programmatically?
Currently I have an onLoad call to the next AS file. BUT I don't always us the same AS file and want them to run standalone.
I could create a frame that contains stop(); #include "variables.as" and has an onLoad function do a play();
then in the next frame have a stop(); and #include "styles.as". This will most likely work... but it seems amaturish.
I want a programmatic solution, not a hard coded Timeline solution.
Can anyone help me out?
Thanks