tes is a movie clip.
when i click zkanada button. movie clip will appear and play from frame 1.
//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);
}
//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<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…