That should work. Implement the public vars as setter functions. That way you can debug to see if they are getting hit.
In this example I am doing pretty much the same thing as you, maybe you will see what is different. http://www.cflex.net/showFileDetails.cfm?ObjectID=558 And try hardcoding the strings you are passing. Tracy ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of candysmate Sent: Thursday, September 27, 2007 6:48 PM To: [email protected] Subject: [flexcoders] Passing variables to popup window Apologies if this turns out to be a double posting, but my original posting does not appear to be listed at the time of writing, depite 45 minutes elapsing. Anyway, I'm trying to pass two variables from my main app to a popup window as below, but the data is not comping across. Can anyone please see where I'm going wrong? Main app function: public function showMessage(messageItem:String, messageDuration:int): void { var alertInstance:alertPopupDialog = alertPopupDialog(PopUpManager.createPopUp(this, alertPopupDialog, true)); //instantiate and show the title window PopUpManager.centerPopUp(alertInstance); alertInstance.messageString = messageItem alertInstance.messageDuration = messageDuration; } MXML titlewindow component alertPopupDialog.mxml: <?xml version="1.0" encoding="utf-8"?> <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> " layout="absolute" width="596" height="134" title="Attention:" titleIcon="@Embed(source='/images/alarmicon.png')" styleName="alertStyle" creationComplete="setTimer();"> <mx:Style> .alertStyle { font-family: Verdana; flashType: true; font-weight: normal; color: #000000; font-size: 18pt; background-color: #FF9999; border-color: #FF9999; roundedBottomCorners: true; cornerRadius: 15; borderStyle: solid; } </mx:Style> <mx:Script> <![CDATA[ import ssp.debugging.TraceWindow; import flash.utils.Timer; import mx.managers.*; public var timer:Timer; public var tw:TraceWindow = new TraceWindow("tw"); [Bindable] public var messageString:String; [Bindable] public var messageDuration:int; private function setTimer():void { tw.title = "String:"; tw.visible = true; tw.trace(messageString); // var stringArray:Array = messageString.split("|"); alertMessage.text = messageString; timer = new Timer((messageDuration * 1000), 1); ; timer.addEventListener(TimerEvent.TIMER, onTimer); if (timer.running) { timer.stop(); } timer.start(); } private function onTimer(event : TimerEvent):void { PopUpManager.removePopUp(this); } ]]> </mx:Script> <mx:Label x="10" y="30" textAlign="left" fontSize="18" id="alertMessage" text=""/> </mx:TitleWindow>

