BTA Flexing

My passion RIAs…………..Shardul Singh Bartwal

Archive for April 16th, 2009

Passing variable from outside into a popup window

Posted by shardulbartwal on April 16, 2009

If we are require to pass any variable from outside into a popup window in flex,the way
is slightly different then creating Popup in a classic way.Actully its not the different
instead there is a type casting into the same class which we are going to display in popup.
Let suppose you want to pass a string value into the popup then inside the popup you need
to create a public varible, like I am creating ‘urlValue’ string type variable inside the popup.

Now pass the value inside the popup as below:-

var myPopUp:MyPopup= MyPopup(PopUpManager.createPopUp(this, MyPopup, true));

myPopUp.move(((Application.application.width/2)-(myPopUp.width/2)),((Application.application.h

eight/2)-(myPopUp.height/2)));

myPopUp.urlValue = “value from outside”;

Here the MyPopUp is the class which we are going to show in popup.

Hope it will be helpfull for you.

Posted in ActionScript 3.0, Flex | Leave a Comment »