Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

button mode!

New Here ,
Jan 30, 2009 Jan 30, 2009
hello !!
I have bit issue with Button mood!
I have 2 MovieClip : "main" and "sub";
"main" ' s ButtonMode was true !
and sub is child of main !
I want the sub wont be Button !! (when the mouse rollOver that , nothing happen !! );

thanks ;
kiarash :)
TOPICS
ActionScript
2.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Jan 30, 2009 Jan 30, 2009
can you assign the buttonMode property to the 'sub' rather than the 'main'?

or is this a drop down menu? if so try assigning the property on both objects.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 02, 2009 Feb 02, 2009
Hi,

As far as I know, in AS3, buttonmode has nothing to do with interactivity.
Just put your event on your sub for it to react.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Feb 02, 2009 Feb 02, 2009
as far as i know, your statement is inaccurate - buttonMode under as 3 as with 2, controls the 'hand cursor' view - i'd say that is directly related with "interactivity"

and it is entirely unclear exactly what the OPs needs are or what event handlers are currently assigned, which is why i asked those questions.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 03, 2009 Feb 03, 2009
Hi clbleech,

I did not mean to counter what you had asked.

What I meant is that, in AS3, buttonMode=true does not mean there is interactivity (events that will cause visible action) on the object.
It might mislead a AS2 programmer at the very beginning of his AS3 debut.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Feb 03, 2009 Feb 03, 2009
cool -

it is difficult to say from the above, it seems as though the OP believes that by placing buttonMode to true, that this will cause it to be a 'button' and somehow react to what they want to do. we also have no indication that they are using AS3 (other than it being on this board) or that they know how to assign/handle an event listener, then again they have obviously been able to make it into a 'button' of some sort to get the reaction they are referring to - however it could be a simple button class instance.

but on the other hand, it seems like they would like the 'main' to be a button but the 'sub' to *not* be. so they may need to rethink their design strategy entirely.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 23, 2010 Apr 23, 2010

Similar issue here.  The original poster was nearly clear, but let me try to clarify his words.  Say you have two Sprite subclasses A and B, with B a child of A, e.g:


AAAAAAAAAAAAAAAAAAAAAAA

A                     A

A                     A

A                     A

A            BBBB     A

A            BBBB     A

A                     A

AAAAAAAAAAAAAAAAAAAAAAA



The problem is that when (A.buttonMode == true), and (B.buttonMode == false), rolling your mouse over B still shows the hand cursor.  Which seems like a bug.  In my own case, I'm using AS3, and B has just one child, an image loader with (alpha == 0.5).  Any guidance appreciated!


Thanks,

Danny

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 23, 2010 Apr 23, 2010

disable the child's useHandCursor property.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 23, 2010 Apr 23, 2010

That's already done.  No benefit.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 23, 2010 Apr 23, 2010

:

var sp1:Sprite=new Sprite();
with(sp1.graphics){
    beginFill(0xaa0000);
    drawCircle(0,0,50);
    endFill();
}
addChild(sp1);
sp1.x=sp1.y=200;

var sp2:Sprite=new Sprite();
with(sp2.graphics){
    beginFill(0x00aa00);
    drawCircle(0,0,20);
    endFill();
}
sp1.addChild(sp2);

sp1.buttonMode=true;
sp2.useHandCursor=false;

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 23, 2010 Apr 23, 2010

Thanks, I'll check it out.  Will get back to you soon.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 23, 2010 Apr 23, 2010
LATEST

ok

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines