# Help.... calling variable from scene to movie clip

**URL:** <https://forum.kirupa.com/t/help-calling-variable-from-scene-to-movie-clip/326380>\
**Category:** Uncategorized\
**Created:** [December 10, 2011, 4:17am UTC](https://forum.kirupa.com/t/help-calling-variable-from-scene-to-movie-clip/326380 "2011-12-10T04:17:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Suradi](https://avatars.discourse-cdn.com/v4/letter/s/c67d28/32.png) [@Suradi](https://forum.kirupa.com/u/Suradi)\
**Post date:** [December 10, 2011, 4:17am UTC](https://forum.kirupa.com/t/help-calling-variable-from-scene-to-movie-clip/326380/1 "2011-12-10T04:17:16Z")

</div>

tes is a movie clip.  
when i click zkanada button. movie clip will appear and play from frame 1.

```auto

//scene 1
var detail_temp:String=null;
var foo=root;
zkanada.addEventListener(MouseEvent.CLICK,detail);
zkanada.addEventListener(MouseEvent.CLICK, detail2);
function detail2(event:MouseEvent):void
{
------detail_temp ="amut01";
}
function detail (Event:MouseEvent):void{
------tes.visible=true;
------tes.gotoAndPlay(1);
}

```

```auto

//code movie clip
trace(foo.detail_temp);
var pHeight:Number = 100;
var pWidth:Number = 200;
var flagLoader:Loader = new Loader();
var listDetail:URLLoader = new URLLoader( new URLRequest("db/benua.xml") );
listDetail.addEventListener(Event.COMPLETE, gotDetail);
function gotDetail(evt:Event):void {
------var xmlData:XML = XML(listDetail.data);
------for(var d:Number=0;d&lt;xmlData.ListItem.length();d++)
------{
------------var kode_negara:String = xmlData.ListItem.kode_negara.toString();
********* if(kode_negara==detail_temp){
-------------------var nama_negara:String = xmlData.ListItem.nama_negara.toString();
-------------------var flag:String = xmlData.ListItem.flag.toString();
-------------------flagLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, gotflag);
-------------------flagLoader.load(new URLRequest(flag));
       -------------------function gotflag(evt:Event):void {
--------------------------var thisBmp:Bitmap = Bitmap(evt.target.content);
--------------------------thisBmp.x = 650;
--------------------------thisBmp.y = 150;
--------------------------var thisWidth:Number = thisBmp.width;
--------------------------var thisHeight:Number = thisBmp.height;
--------------------------thisBmp.scaleX = pWidth/thisWidth;
--------------------------thisBmp.scaleY = pHeight/thisHeight;
--------------------------addChild(thisBmp);
--------------------}
-------------}
--------------else{
-------------------break;
--------------}
--------}
}

```

the code should be error…  
Symbol ‘detail’, Layer ‘Actions’, Frame 10, Line 18 1120: Access of undefined property detail\_temp.  
how to send variable from scene 1 to movie clip?  
please… help my problem…

the \* is the main logic… i want to use as strcmp to show the database…
