Reputation: 5074
I am adding a widget to someone elses movieclip.
On stage is another movieclip which has an action inside the movieclip (getting to this by pressing F9 in Flash).
function onClicked()
{
parent.onOldBtnClick("go");
}
What I need to do is to get rid of this behaviour and add my own action.
How can I override this action?
Upvotes: 0
Views: 96
Reputation: 754
To override, just delete that line in the onClicked function and write your own. Care must be taken while writing your block of codes, mainly scope. Because your are writing the code inside the movieclip, if you are trying to access the another movieclip in stage(withour specifying parent or root or its actual scope) then it will throw error.
Upvotes: 0
Reputation: 21
If it's ActionScript3, just removeEventListiner
on the MovieClip
, that triggers onClicked()
and addEventListener
for your own action. If you don't know the exact listener, you can trace it with hasEventListener
. For more info on Events and how they work, you can read on ActionScript3 referance
Upvotes: 1