Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

My class extends or inherits from MovieClip. When I make an instance of it in Flash, why doesn it show up on the stage?

0
Posted

My class extends or inherits from MovieClip. When I make an instance of it in Flash, why doesn it show up on the stage?

0

The Quick: Instantiation of MovieClip instances (and subclasses of MovieClip) are are not handled through the new keyword. Instead, instantiation is automatic as a result of the movie clip representing that class being created in your scene, either through placement on the timeline or through attachMovie()/duplicateMovieClip(). The Details: The way Flash handles class instances with movie clips is a little non-intuitive and contradicts how classes and visual elements work in other programming languages such as Java. Because MovieClip instances have this inherent connection with a visual element (a movie clip) within the Flash document, basic class instantiation through the use of the new keyword won’t cut it since creating new instances in this manner only creates instances in memory that have no association with the timeline other than a variable returned from the constructor used to access the object created. Creating movie clips requires another level of instantiation that, through

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123