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.

What happened to my variables and why aren my functions working (e.g. onLoad) after loadMovie?

0
Posted

What happened to my variables and why aren my functions working (e.g. onLoad) after loadMovie?

0

The Quick: When new content (swf or jpg) is loaded into a level or movie clip using loadMovie(), the level or movie clip is erased of all definitions–all functions and variables. The Details: Basically what happens is Flash completely clears or replaces an existing level or movie clip in order to make way for that which is being loaded as a result of the loadMovie command. Movie clips will actually retain their size and location and primary properties while levels are completely replaced and set back to their default location (0,0). In either case, anything you define in a level or movie clip will be deleted thanks to loadMovie. This includes any event handlers like onRelease which you’ve added to interact with the soon to be loaded content. The only exception to this is script placed directly on a movie clip in the form of on() or onClipEvent()events (applicable to movie clips only) as they inherent of the actual movie clip symbol and not something Flash interprets as an assignment w

Related Questions

What is your question?

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

Experts123