# \[MX\] onClipEvent(data): Opiate of the masses?

**URL:** https://forum.kirupa.com/t/mx-onclipevent-data-opiate-of-the-masses/97192
**Category:** Uncategorized
**Created:** [December 18, 2003, 9:37pm UTC](https://forum.kirupa.com/t/mx-onclipevent-data-opiate-of-the-masses/97192 "2003-12-18T21:37:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lrhb](https://avatars.discourse-cdn.com/v4/letter/l/e47774/32.png) [@lrhb](https://forum.kirupa.com/u/lrhb)
#### Post date: [December 18, 2003, 9:37pm UTC](https://forum.kirupa.com/t/mx-onclipevent-data-opiate-of-the-masses/97192/1 "2003-12-18T21:37:38Z")

</div>

Hallo!

I’m having an odd issue with this onClipEvent friend…

In the main timeline, I set a variable like so:

[AS] loadingFlag = false;[/AS]

And that is fine…

Then later, in a movie clip where I load an image, I say

[AS] \_root.loadingFlag = true;  
trace("LOADING FLAG IS: "+\_root.loadingFlag;[/AS]

And when it occurs, I get back LOADING FLAG IS: true, and that’s fine too.

Then, on the object I have the image loading into, I have the following:

[AS]onClipEvent(data){  
trace("\*\* IMAGE IS LOADED **“);  
\_root.loadingFlag = false;  
trace(”** IMAGE LOADING FLAG IS: "+\_root.loadingFlag);  
}[/AS]

And indeed, when the image loads, I get the trace statements, BUT though it traces, it does not redefine loadingFlag!

also, the second trace statement comes up as IMAGE LOADING FLAG IS: with no value afterwards…

Is there something with onClipEvent(data) where even though it’s attached to a nested movieclip, it doesn’t refer to the \_root?

Suggestions, comments, all are welcome!

thanks!

lrhb :hat:
