-
[RESOLVED]Combining TextEvent with Dispatch event
Last edited by eggler; 10-14-2009 at 02:11 AM.
Reason: RESOLVED!
-
Yep. You simply need to create your TextEvent properly.
Code:
var te:TextEvent = new TextEvent(TextEvent.TEXT_INPUT, false, false, "OPTION1");
dispatchEvent(te);
In general, I'd caution against using TextEvents for things that are not truly text related. Instead, you can create your own custom event type.
-
Last edited by eggler; 10-14-2009 at 02:11 AM.
-
Is this what you're trying to do?
PHP Code:
myTextField.dispatchEvent(new TextEvent(TextEvent.LINK, false, false, 'OPTION1'));
Or are you trying to customize the events off of the inline links...like so:
PHP Code:
myTextField.htmlText = '<a href="event:OPTION1">linky</a>';
-
Last edited by eggler; 10-14-2009 at 02:11 AM.
-
Flax's example is assuming you are listening to 'this' with your eventListener...if you wanted to directly inject that event to the function you could pass it as an argument instead of going through the event structure:
PHP Code:
myHandler(new TextEvent(TextEvent.TEXT_INPUT, false, false, "OPTION1"));
-
Last edited by eggler; 10-14-2009 at 02:11 AM.
-
Last edited by eggler; 10-14-2009 at 02:10 AM.
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
|