Re: [Flashcoders] Custom eventListener thread is an interesting topic but it has attached itself to the Re: [Flashcoders] Pixel precise thread
In Mozilla's Thunderbird I sort on topic and so I miss these fascinating discussions because the threads are mangled.
Does it mess up the archives when people don't start new threads? John Lehr, Ross (N-SGIS) wrote:
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 Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders