BTA Flexing

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

Passing variable from outside into a popup window

Posted by Shardul Singh Bartwal 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.

One Response to “Passing variable from outside into a popup window”

  1. Powerpeace said

    Hey shardul when to begin to write the blog in the flex 4 let me know ,, i am waiting yarr
    i liked ur blogs
    so be hurry and get ready to write the FLEX 4:)

Leave a comment