header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
muky
Points:10
Posts:0

9/20/2010 6:59:56 AM

Title: How can I use the event name as const also in the Metadata?


is there a way to use a constant for the event name?
the event name is later on use for creation of event and then dispatch it.
write the string again in several places is an open to bugs.

<mx:Metadata>
[Event(name="EventName", type="mx.events.ItemClickEvent")]
</mx:Metadata>

...
...
<![CDATA[
var clickedEvent:ItemClickEvent = new ItemClickEvent("EventName");
dispatchEvent(clickedEvent);
]]>



1
Veer
Points: 480
Posts:0
9/20/2010 10:52:44 PM



Hello,

As fas as metadata concern i think we can't use constant for event name.

But by creation custom event we can use constant for event name.

Regards,
Virat Patel


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 1+1 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions