Be a Supporter!

[AS3] - Dynamic text blocks button

  • 515 Views
  • 3 Replies
New Topic Respond to this Topic
the1manwiththeplan
the1manwiththeplan
  • Member since: Jun. 10, 2008
  • Offline.
Forum Stats
Member
Level 17
Blank Slate
[AS3] - Dynamic text blocks button May. 7th, 2012 @ 05:09 AM Reply

Ok easy problem...The movieclip on the stage that I am using as a button has two layers inside it.
Bottom one vector data top one dynamic text. The button only works when I roll over the parts without dynamic text covering it.

Every other source Ive looked at tells me to set the dynamic text box to non selectable in the properties to fix it. The text box is non selectable. Ive checked multiple times.

Is there an easy fix? What Am i doing wrong? Any help appreciated.


...

ProfessorFlash
ProfessorFlash
  • Member since: Oct. 6, 2007
  • Offline.
Forum Stats
Member
Level 32
Programmer
Response to [AS3] - Dynamic text blocks button May. 7th, 2012 @ 05:17 AM Reply

At 5/7/12 05:09 AM, the1manwiththeplan wrote: Ok easy problem...The movieclip on the stage that I am using as a button has two layers inside it.
Bottom one vector data top one dynamic text. The button only works when I roll over the parts without dynamic text covering it.

Every other source Ive looked at tells me to set the dynamic text box to non selectable in the properties to fix it. The text box is non selectable. Ive checked multiple times.

Is there an easy fix? What Am i doing wrong? Any help appreciated.

Setting the textfield as non selectable only prevents users from painting the text with their mouse. The property to disable mouse interaction on an object is 'mouseEnabled', set that to false if you don't want something to interact with the mouse.


You can solve pretty much any problem you may have with AS3 by consulting the AS3 Language reference.

the1manwiththeplan
the1manwiththeplan
  • Member since: Jun. 10, 2008
  • Offline.
Forum Stats
Member
Level 17
Blank Slate
Response to [AS3] - Dynamic text blocks button May. 7th, 2012 @ 05:30 AM Reply

At 5/7/12 05:17 AM, ProfessorFlash wrote: Setting the textfield as non selectable only prevents users from painting the text with their mouse. The property to disable mouse interaction on an object is 'mouseEnabled', set that to false if you don't want something to interact with the mouse.

Yeah I thought that was the case, I only tried it out because Kirpua and a bunch of other forums claimed this was the solution. But anyway thanks for the mouseEnabled snippet it fixed all my problems =)


...

milchreis
milchreis
  • Member since: Jan. 11, 2008
  • Offline.
Forum Stats
Member
Level 26
Programmer
Response to [AS3] - Dynamic text blocks button May. 7th, 2012 @ 08:14 AM Reply

You can also set button.mouseChildren = false.