-
[F8] How to make onPress event trigger method within Class?
Hello all,
Sorry for the double post I was trying to use the TAB key to indent my sample code below and it tabbed to the Save Changes button instead and before I knew what had happened it posted my unfinished message twice
I have a custom class. Within that class, in one of my methods, I want to trigger another method in response to the pressing of a button. I have been unable to figure out how to do this after messing around with it for hours
Here is an condensed example of what I want to do:
class CustomClass {
//various variables defined here
private function handleButtonPress() {
_level0.Submit_btn.onPress = function() {
trace("submit button has been pressed after entering text"); //Trace WORKS
testingFunction(); //this function call DOES NOT WORK
}
}
private function testingFunction() {
trace("test function has been successfully called"); // Trace NEVER APPEARS
}
}
The button path definition is correct. I have several other method functions in the class and they all work fine. This is the only part that will NOT work. The problem is directly tied to trying to trigger an event based upon the pressing of a button WITHIN my custom Class. This is EXTREMELY easy to do on the Main Timeline..but within a Class I am unable to get it to work...
Any help would be most appreciated!
Steve
Last edited by Flashpowder; 10-31-2007 at 02:39 AM.
Reason: accidental posting of message twice before it was finished
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|