# ReferenceError: Error #1069

**URL:** <https://forum.kirupa.com/t/referenceerror-error-1069/255784>\
**Category:** flash\
**Created:** [March 26, 2008, 10:25pm UTC](https://forum.kirupa.com/t/referenceerror-error-1069/255784 "2008-03-26T22:25:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anujsharma181](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@anujsharma181](https://forum.kirupa.com/u/anujsharma181)\
**Post date:** [March 26, 2008, 10:25pm UTC](https://forum.kirupa.com/t/referenceerror-error-1069/255784/1 "2008-03-26T22:25:30Z")

</div>

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&gt;BoundedX) && (CameraStartDrag.y&gt;BoundedY1) &&(CameraStartDrag.y&lt;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&lt;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);
        
        }
        }
    }
```
