Embeded SWF loading event
well... I know this place has pretty much been killed by the admins and is in it's death throes but oh well.
I'm trying to use Embed SWFs in a project for storage of vector animations. each frame in the SWF has a different animation set for a character. They are, because they have to be, embedded as classes.
When these swfs are due to appear, they set added to a movieclip. As they don't necessary want to load the initial animation each time they are called, the number of the frame they need to go to needs to be set. As there is always a minor delay in loading, It's not possible to add the 'gotoandStop' command for changing the frame after adding it to a scene. So I try to add an event listener to check when it's loaded.
first issue, there is no 'Load' event. So what are the options.. well. 'Complete' and 'enterframe' both jump out as possible. but both of them play automatically the moment the listener is added and basically leads to errors like:
"Error #2007: Parameter listener must be non-null"
It mostly comes to that fact that the swf hasn't fully loaded, despite being embeded and kinda loaded anyway..
So all I can really think, due to checking 'load complete' isn't possible (it appears) is:
1) Cut the swfs to be one animation per swf, so a character wouldn't have all animations as different timeline frames but as different swfs. therefore it would just load the swf for that animation
2) Having the swf as external files, so instead of embedding them, it uses a url load, but that is kinda really don't want to do and would take longer and be a little bit more complex (in my view) and might even come into the same issue with loading.
3) I did think about in fact having the swf with the animation itself but due to the problem of referencing I have mooted that idea completely.