I find that sometimes if the font for the dynamic text isnt embedded
it can cause weird mouseover issues, where the mouse is affected by
the dynamic text, even if I set mouseChildren and mouseEnabled to
false.
2ยข...
.m
On Tue, Sep 23, 2008 at 10:58 AM, Lord, Susan, CTR, DSS
<[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I am programming a drag and drop using a instance array. The problem I
> am having is that the instances have dynamic text within them. I am
> trying to track what symbol the user clicked so that I can drag that
> instance. Well... sometimes, the program registers the button name, and
> sometimes it registers the text within the button. Is there a clean way
> to prevent this from happening?
>
> Any help you can provide is appreciated!
>
> Thanks!
> Susan
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> var aButtons:Array = new Array(b0, b1, b2, b3);
> aButtons[0].txDrag.text= "Drag 1";
> aButtons[1].txDrag.text= "Drag 2";
> aButtons[2].txDrag.text= "Drag 3";
> aButtons[3].txDrag.text= "Drag 4";
>
> //var _rectangle:Sprite;
> var i:Number;
>
>
> for (i= 0; i < aButtons.length; i++) {
> aButtons[i].addEventListener(MouseEvent.MOUSE_DOWN,
> startDragging);
> aButtons[i].addEventListener(MouseEvent.MOUSE_UP, stopDragging);
>
> }
>
>
>
> function startDragging(event:MouseEvent):void {
> var count:Number = aButtons.length;
> var index:Number;
> trace(event.target.name)
> for (i = 0; i < count; i++) {
> if (evt.target.name == aButtons[i].name ) {
> //drag code to be added...
> aButtons[i].startDrag();
> }
>
>
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders