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?
Check the name of the function ‘video02_scrubBar_hitarea_onRelease’, it must be it.
If I remove the word ‘stage.’ it works. Why?
- Exclusive Author
- Item was Featured
- Author was Featured
- Author had a File in an Envato Bundle
- Has been a member for 4-5 years
- Sold between 100 000 and 250 000 dollars
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- India
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- Exclusive Author
- Item was Featured
- Author was Featured
- Author had a File in an Envato Bundle
- Has been a member for 4-5 years
- Sold between 100 000 and 250 000 dollars
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- India
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.
the stage is only avaible on the root, you can send it from there though
- Community Superstar
- Item was Featured
- Author was Featured
- Has been a member for 5-6 years
- Won a Competition
- Sold between 50 000 and 100 000 dollars
- Bought between 10 and 49 items
- Referred between 50 and 99 users
- Europe
this.stage.addEventListener(...) .. or... some_clip.stage.addEventListener(...
Still no luck. Remember that it’s in a package.
