Search the web
Sign In
New User? Sign Up
ydn-flash · Yahoo! Flash Developer Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Sprite added to HBoxPane do not recieve mouse events.   Topic List   < Prev Topic  |  Next Topic >
Reply | Forward  |  Next Message > 
Re: Sprite added to HBoxPane do not recieve mouse events.

If you set autosize as true then you will see the mouse events dont work.

--- In ydn-flash@yahoogroups.com, Josh Tynjala <joshtynjala@...> wrote:
>
> Perhaps you're not properly associating your custom class with a symbol in
> your library, or maybe you're setting mouseEnabled or mouseChildren to false
> somewhere. The following code worked correctly for me:
>
> var sprite:Sprite = new Sprite();
> sprite.graphics.beginFill(0xff0000);
> sprite.graphics.drawRect(0, 0, 50, 50);
> sprite.graphics.endFill();
>
> hbox.addChild(sprite);
>
> sprite.addEventListener(MouseEvent.CLICK, sprite_clickHandler);
>
> function sprite_clickHandler(event:MouseEvent):void
> {
> trace("clicked");
> }
>
> hbox is an HBoxPane I dragged to the stage.
>
> - Josh
>
> On Fri, Oct 23, 2009 at 3:28 AM, rajdeeprath <rajdeeprath@...> wrote:
>
> >
> >
> > There seem to be a problem with HBoxPane component.
> >
> > I have attached a custom object which extends sprite into the HboxPane.
> > within my custom class, i have:
> >
> > this.addEventListener(MouseEvent.CLICK, onClick);
> >
> > function onClick(me:MouseEvent)
> > {
> > trace("here");
> > }
> >
> > Ite dosent seem to trigger, no matter what
> >
> >
> >
>





Sun Nov 8, 2009 3:20 am

rajdeeprath
Offline Offline
Send Email Send Email

Forward
 |  Next Message > 
Expand Messages Author Sort by Date

There seem to be a problem with HBoxPane component. I have attached a custom object which extends sprite into the HboxPane. within my custom class, i have: ...
rajdeeprath
Offline Send Email
Oct 23, 2009
10:28 am

Perhaps you're not properly associating your custom class with a symbol in your library, or maybe you're setting mouseEnabled or mouseChildren to false ...
Josh Tynjala
joshtynjala
Offline Send Email
Oct 23, 2009
2:53 pm

First fun is this (joshtynjala@...) Gmail ahahah Do you not work for Yahoo. Like working in CocaCola and drinnking Pepsi :)))) Ok forget it. useful...
alex winx
winxalex
Offline Send Email
Oct 23, 2009
3:45 pm

If you set autosize as true then you will see the mouse events dont work....
rajdeeprath
Offline Send Email
Nov 8, 2009
3:20 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help