The idea was born from a topic in the FlepStudio’s forum in which a user was in difficulty using the logic of my tutorial about the preloader with Flash CS3 .
The difficulty was mainly due to this situation:
- the preloader.fla has a Document Class Loading.as
- prova.fla creates prova.swf. Inside the library of prova.fla we have a MovieClip (clip_mc) associated to a class (Clip.as) and inside this MovieClip, we have another MovieClip named ‘tavola_mc’.
- Loading.as loads prova.swf and once the loading complete, creates an instance of a class Chiama_Clip.as which itself an attachMovie of ‘clip_mc’ placed in library of prova.fla (therefore using the associated class: Clip).
Once understood the logic of the tutorial about the preloader of FlepStudio, it is not difficult to call that MovieClip and create an instance of it.
But only if this MovieClip does not contain any other object.
Trying to insert another MovieClip (tavola_mc) Flash returns an error and says that it is not able to assign a new property to Clip. As child MovieClips are properties of the parent MoveClip and since Clip.as extends the MovieClip class, the Flash error has left me surprised. The MovieClip class is dynamic and it can create properties in runtime. But Flash tells me the contrary.
Therefore, we will see in this example how to arrive to attach on stage ‘clip_mc’ but we will also see how to resolve this annoying error given by Flash.
Let us look at it…







{ 0 comments… add one now }