There must be something else going wrong with your code. This works fine for me, you can paste it straight into a new project and test it:
import flash.net.URLRequest; import flash.display.Loader; import flash.events.MouseEvent; var url:String = "http://www.gogo-tennis.com/images/Tennis%20Balls_small.jpg"; var req:URLRequest = new URLRequest(url); var ldr:Loader = new Loader(); ldr.addEventListener(MouseEvent.ROLL_OVER, rollOverListener); ldr.load(req); addChild(ldr); function rollOverListener(e:MouseEvent):void { // trace("hit!"); } On 11 June 2012 23:40, Karl DeSaulniers <[email protected]> wrote: > Maybe load the image into a empty MC and put the rollover on the MC? > > Best, > Karl > > > On Jun 11, 2012, at 12:32 PM, Kerry Thompson wrote: > >> I've never tried to get a mouse event on a loader. Do you have a >> progress bar? I would add a MouseEvent listener to the progress bar, >> not the loader itself. If that doesn't work, add a movie clip with a 0 >> alpha on top of the loader, and attach the mouse listener to that. You >> could use a standard Flash shape like a rectangle, and lengthen it in >> sequence with the progress bar, You would want something like this to >> keep it in sequence: >> >> progBar.addEventListener(ProgressEvent.PROGRESS, progressHandler); >> >> and, in your progressHanler function, set its length and height to >> that of the progress bar. >> >> Cordially, >> >> Kerry Thompson >> >> On Mon, Jun 11, 2012 at 1:08 PM, Ted Lehr <[email protected]> wrote: >>> >>> So I have a Loader that is loading an image: >>> >>> var Img:Loader = new Loader(); >>> var urlReq:URLRequest = new URLRequest("http://www.someurl.com"); >>> >>> img.load(urlReq); >>> >>> >>> and I am trying: >>> >>> img.addEventListener(MouseEvent.ROLL_OVER,xxxxx); >>> >>> >>> >>> this does not seem to work - does that make sense? and if so, how can I >>> get a mouse event on the loader - do I need to load it in another mc? >>> >>> >>> Thanks! >>> >>> _______________________________________________ >>> Flashcoders mailing list >>> [email protected] >>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders >>> >> _______________________________________________ >> Flashcoders mailing list >> [email protected] >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > Karl DeSaulniers > Design Drumm > http://designdrumm.com > > > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- David Hunter www.davidhunterdesign.com +44 (0) 7869 104 906 _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

