Passing values to Window  
Author Message
amitsa





PostPosted: 2005-8-31 14:22:32 Top

flash-actionscript, Passing values to Window hi..
i am very new to flash... i am trying to open a Window at a click of a
button and attach movie to it... now i want to pass the values of the component
on the main document to a component of the movie clip... i cant figure out how
to accomplish it..:confused;
please help.... the code o have written is

on(click)
{
import mx.managers.PopUpManager
import mx.containers.Window

var my_win = PopUpManager.createPopUp(_root, Window, true, {closeButton: true,
title:"My Window"});

my_win.setSize(300,400);

my_win.attachMovie("name", "name_mc",my_win.getNextHighestDepth() , {_x:0,
_y:20}); //attaching

my_win.name_mc.name_txt.text = "Hello"; -----------------------> name_txt is a
text box in the movieclip

//////////////////////
//adding a listner to the popup window for closing
//////////////////////
windowListener = new Object();
windowListener.click = function(evt){
my_win.deletePopUp();
}
my_win.addEventListener("click", windowListener);
}