Hey All...
I'm having trouble with a custom event listener. I'm working on
experiment browser project trying to learn as3, OOP, and AIR. I
broadcasting the URL after a web page is loaded and I need a text box to
listen for it. I've added a trace to me urlLoadedEvent class and I know
the URL is getting there (so, I think it's getting broadcasted ok), but
it's not getting to the text box. I think I have my listener in the
wrong place, but not sure where to put it. I don't have my exact code
here, but below are some code snippets. Thanks for any and all help.
Ross
------ DISPACTING EVEN
In a loadComplete function urlLocation = text field for the URL string
dispatchEvent(new urlLoadEvent(urlLocation.text));
------ urlLoadEvent Class (when I trace urlLocation I am getting the URL
string)
package
{
import flash.events.*;
public class urlLoadEvent extends Event
{
public static const URL_CHANGED = "urlChanged";
public var urlLocation:String;
public function urlLoadEvent(urlL:String):void
{
super(URL_CHANGED);
urlLocation = urlL;
trace(urlLocation);
}
}
}
------ I'm not sure where to attach this.
???????.addEventListener(urlLoadEvent.URL_CHANGED, onURLChange);
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders