Hey, thanks for checking this. I am writing a class where the onRelease event of the button is handled within the class. This is so I can make a class that can be reused across re-skinned FLAs just by passing the button instance to the class (so I don't need to assign a method of the class to it). I think I may be going about this the wrong way as I am getting lots of error messages in the compiler like:
"There is no method with the name 'super'."
If someone could point me in the right direction here it would be a massive help, I'm worried I may be barking up the wrong tree or trying to do something that isn't possible (or sensible!).
Thanks guys and have a good weekend,
Ali

My class code looks like this:
/////////////Send.as
import mx.controls.Button;
class Send extends XMLSocket {
        private var sendBtn:Button;
        function setSendBtn(mySendBtn:Button) {
                trace("send button received:"+mySendBtn)
                this.sendBtn = mySendBtn;
                this.sendBtn._visible = false;
                this.sendBtn.onRelease = function() {
                        trace("-- send pressed ");
                        sendHandler()
                };
        }
        function sendHandler(){
        //send events go here
        trace("sendHandler called")
        }
}
The code in my FLA is:
////////////////////////
import Send;
var mySend:Send = new Send();
mySend.setSendBtn(my_btn)
///////////




_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to