263 posts
  • Has been part of the Envato Community for over 6 years
  • Located in Antarctica
  • Has sold $100+ on Envato Market
  • Has collected 1+ items on Envato Market
+1 more
x360c says

This is the listener (AS3) I am trying to call from inside a package that is throwing a null object error:

stage.addEventListener (MouseEvent.MOUSE_UP,video02_scrubBar_hitarea_onRelease);

What is wrong?

563 posts
  • Has been part of the Envato Community for over 6 years
  • Has referred 1+ members
  • Has sold $100+ on Envato Market
  • Located in Brazil
+2 more
LuizZak says

Check the name of the function ‘video02_scrubBar_hitarea_onRelease’, it must be it.

263 posts
  • Has been part of the Envato Community for over 6 years
  • Located in Antarctica
  • Has sold $100+ on Envato Market
  • Has collected 1+ items on Envato Market
+1 more
x360c says

If I remove the word ‘stage.’ it works. Why?

6029 posts
  • Sells items exclusively on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has been part of the Envato Community for over 6 years
+8 more
VF says
If I remove the word ‘stage.’ it works. Why?

This shows that “stage” is not considered as a target name for root.

trace(stage.name); will ouptput null
6029 posts
  • Sells items exclusively on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $125,000+ on Envato Market
  • Has been part of the Envato Community for over 6 years
+8 more
VF says
If I remove the word ‘stage.’ it works. Why?

Oops, it works even if I use “stage”. It seems we need to mouseUp over an object on stage to trigger the function. If there is no object in the stage to hit, it doesn’t calls the function.

926 posts
  • Has referred 50+ members
  • Has sold $10,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Made it to the Authors' Hall of Fame
+4 more
michelsteege says

the stage is only avaible on the root, you can send it from there though

3072 posts
  • Has referred 50+ members
  • Has sold $40,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Had an item featured on Envato Market
+5 more
wickedpixel says
call the stage like this:
 this.stage.addEventListener(...)
 .. or...
 some_clip.stage.addEventListener(...
263 posts
  • Has been part of the Envato Community for over 6 years
  • Located in Antarctica
  • Has sold $100+ on Envato Market
  • Has collected 1+ items on Envato Market
+1 more
x360c says

Still no luck. Remember that it’s in a package.

by
by
by
by
by
by