I don't see any public static constCONFIG_FILE_ EVENT:AString = "somtething" in
your custom event class...
C
From: Raymond Brown
To: "flexcoders@yahoogroups.com"
Sent: Sat, December 12, 2009 4:40:37 PM
Subject: [flexcoders] Beginner "Event" Question
I created a custom event to pass a string with, shown here:
package events
{
import flash.events. Event;
public class ConfigFileEvent extends Event
{
public var configFile:String;
public function ConfigFileEvent( type:String, configFile:String)
{
super(type);
this.configFile = configFile;
}
override public function clone():Event {
return new ConfigFileEvent( type, configFile);
}
}
}
I then have in my main class an event metadata tag, a dispatch and event
listener shown here:
http://www.adobe. com/2006/ mxml" creationComplete=
"initApp( )" >
[Event(name="ConfigFileEvent", type="event.ConfigFileEv ent")]
However Flex builder won't compile because of the error:
Access of possibly undefined property CONFIG_FILE_ EVENT through a reference
with static type Class. in the addEventListener line. Can someone provide a
better insight as to this error and what it is that I am doing wrong?