Imagine a Flex application which contains spam/eggs.as:
package spam {
public var eggs:Eggs = new Eggs();
}
At what point in the process of loading the .swf file will Eggs be instantiated?
Then, assume there is also spam/ham.as:
package spam {
public var ham:Ham = new Ham();
}
What which of the two – eggs or ham – will be loaded first?
If both of those are on the same frame in the SWF then I’m not sure there is any guarantee in order. But if you put them on different frames then you can dictate order. However, I’m not sure there is any easy way to tell the Flex compiler which frames to put those on. Typically a Flex app has only two frames. The first is the preloader and it’s dependencies and the second is everything else in the app.