Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Component Command overridden?

Status
Not open for further replies.

rolan18

Programmer
May 11, 2006
26
CA
I made a custom component that is essentially a start/stop button. The only thing that really changes is the text when it is clicked on.

What I'm wondering is if I put the commands:
on(press){

_root.particle.startMoving();


}

on an instance of this component, will it override the on (press) function inside the component itself. Because at this moment it is not working. The command on the outermost layer will work, but the button text will not change from Start to Pause.

If the command is being overridden then is there a way in which I can bypass this so that it will work anyway?

Thanks
 
Ok, so I fixed it in a way...

I just added a mouselistener onto it and put my code there and it seems to work just fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top