Hi guys
I am getting reference error which is breaking my code. In my code i have
drag gable movieclip which when crossed some coordinates is going to call
external UIloader (containing external SWF) on the main stage. I can create
multiple instances of UIloader  by dragging same movie multiple times.(I am
providing the option of dragging and dropping movieClip as well as UIloader
too). Now when i am trying to drop movieclip on already created UIloader I
am getting this error which is breaking my code. "ReferenceError: Error
#1069: Property index not found on flash.display.Stage and there is no
default value."

Actually I have 2 drag and drop functions(on mousedown and mouse up) in my
program. One for movieClip drag& drop and other for UILoader drag & drop. It
seems like when i am dropping my movieclip on already existing UIloader,
drop function of UIloader ( instead of MovieClip) has been called . I am not
sure how to fix that.
Any help will be highly appreciated.
I have made everything in AS 3.0 without my custom classes. Attached is the
code to make things little clear.
Thanks
Anuj
/*Code for movieDrop*/

function CamStopDragTN(event:MouseEvent):void
        {
            var CameraStartDrag=event.currentTarget;


            if ((CameraStartDrag.x>BoundedX) && (CameraStartDrag.y>BoundedY1)
&&(CameraStartDrag.y<BoundedY2) &&
                (CameraStartDrag!=null) )

            {

                CameraStartDrag.stopDrag();
                var UIcontainer:DisplayObject=CreateUILoaderObject(num);
                UIcontainer.x=mouseX-UIcontainer.width/2;
                UIcontainer.y=mouseY-UIcontainer.height/2;


                CameraStartDrag.x=x1;
                CameraStartDrag.y=y1;

            }
/*Code for UILoader Drop
function dropUILoader(e:MouseEvent):void
        {

            if(e.target is UILoader)
            {
                if(mouseY<746)
                {

                var myUILoader:UILoader = e.target as UILoader;


                myUILoader.stopDrag();
                myUILoader.mouseChildren=false;

                myUILoader.x=mouseX-myUILoader.width/2-23;
                myUILoader.y=mouseY-myUILoader.height/2-42;



            else
            {
                myUILoader.unload();
                container.removeChild(myUILoader);

            }
            }
        }
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to