PDA

Volledige versie bekijken : MouseEvent Listener op MovieClip met Dynamic textfield probleem


arckodrazen
%Europe/Berlin %445 %2007, 11:41
Hoi

Mijn probleemsituatie:
Ik maak dynamisch movieclips aan van data die ik binnen krijg via remoting. De bedoeling is dat mensen kunnen klikken op die movieclips om zo naar een nieuw scherm te navigeren. In deze movieclips wordt ook data geladen via een dynamic textfield. Aan deze movieclips hangt een MouseEvent Listener die dan de gewenste actie uitvoert.

Probleem dat ik al vaker ben tegen gekomen: Als ik de buttonMode van een MovieClip op true zet, dan krijg je een handje te zien, wanneer je over het textfield gaat binnen die zich binnen die movieclip bevindt, dan switcht de cursor terug naar een pijltje.

Bovendien, in de handling functie van de listener geeft de e.target een ander resultaat.

Wat zie ik over het hoofd?

Mvg
Arcko D

stefanw_nl
%Europe/Berlin %479 %2007, 12:30
zet je

tf.selectable = false;

edit: ik heb het ff na gebootst.. same here.. ik ga ff checken voor een makkelijke workaround

edit2:

buttonMode property

buttonMode:Boolean [read-write]

Language version: ActionScript 3.0
Player version: Flash Player 9


Specifies the button mode of this sprite. If true, this sprite behaves as a button, which means that it triggers the display of the hand cursor when the mouse passes over the sprite and can receive a click event if the enter or space keys are pressed when the sprite has focus. You can suppress the display of the hand cursor by setting the useHandCursor property to false, in which case the pointer is displayed.

Although it is better to use the SimpleButton class to create buttons, you can use the buttonMode property to give a sprite some button-like functionality. To include a sprite in the tab order, set the tabEnabled property (inherited from the InteractiveObject class and false by default) to true. Additionally, consider whether you want the children of your sprite to be mouse enabled. Most buttons do not enable mouse interactivity for their child objects because it confuses the event flow. To disable mouse interactivity for all child objects, you must set the mouseChildren property (inherited from the DisplayObjectContainer class) to false.

If you use the buttonMode property with the MovieClip class (which is a subclass of the Sprite class), your button might have some added functionality. If you include frames labeled _up, _over, and _down, Flash Player provides automatic state changes (functionality similar to that provided in previous versions of ActionScript for movie clips used as buttons). These automatic state changes are not available for sprites, which have no timeline, and thus no frames to label.

extend je movieclip met de SimpleButton class. Moet denk op die manier wel werken. Teminste wat ik opmaak uit deze tekst.

arckodrazen
%Europe/Berlin %800 %2007, 20:12
Het heeft gewerkt mouseChildren op false zetten. :)

Bedankt! :)