You've bound the TW's SWFLoader to the mainapp's DG. The SWFLoader may never actually go away and changing the DG's selectedItem may cause it to fail to load.
Binding's can be hard to clean up, so you may want to just use events or just read the property once. ________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of tonyx_788 Sent: Tuesday, June 05, 2007 11:24 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Error after loading swf this what i get Error: Unable to load ''. at mx.controls::SWFLoader/::loadContent() at mx.controls::SWFLoader/load() at mx.controls::SWFLoader/mx.controls:SWFLoader::commitProperties() at mx.core::UIComponent/validateProperties() at mx.managers::LayoutManager/::validateProperties() at mx.managers::LayoutManager/::doPhasedInstantiation() at Function/http://adobe.com/AS3/2006/builtin::apply <http://adobe.com/AS3/2006/builtin::apply> () at mx.core::UIComponent/::callLaterDispatcher2() at mx.core::UIComponent/::callLaterDispatcher() at flash.utils::Timer/flash.utils:Timer::_timerDispatch() --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Alex Harui" <[EMAIL PROTECTED]> wrote: > > Are you sure the SWF loaded? You might want to add trace statements to the loaded swf or build a debug version of it to see where it is getting stuck. > > > > ________________________________ > > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] On Behalf Of tonyx_788 > Sent: Tuesday, June 05, 2007 8:21 AM > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > Subject: [flexcoders] Error after loading swf > > > > Hi all, i get this error Error: Unable to load ''. after loading a swf > and my app just stops working > here is part of my code. > > *****************************main mxml > > private function ShowPano():void > { > var SWFLoaderInstance:Panoramica2 = > Panoramica2(PopUpManager.createPopUp(this,Panoramica2,true));// > instantiate and show the title window > > PopUpManager.centerPopUp(SWFLoaderInstance); > SWFLoaderInstance.mainAppPano = this //Reference to the main app > scope > } > > *******************************Panoramica2 > > <?xml version="1.0" encoding="utf-8"?> > <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml > <http://www.adobe.com/2006/mxml> <http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> > " > creationComplete="doInt()" > cornerRadius="10" width="600" height="450"> > <mx:Script><![CDATA[ > import mx.controls.PopUpMenuButton; > import mx.managers.PopUpManager; > import mx.collections.ArrayCollection; > import mx.controls.Button; > > [Bindable]public var mainAppPano:Object = null; > //called by the close event raised byclicking the close button > private function closeWindow():void > { > PopUpManager.removePopUp(this); > }//closeWindow > private function doInt():void > { > PopUpManager.centerPopUp(this); > } > ]]> > </mx:Script> > <mx:TitleWindow layout="absolute" right="10" left="10" > showCloseButton="true" > close="closeWindow()" top="10" bottom="10"> > <mx:SWFLoader > source="{mainAppPano.datagrid.selectedItem.pano..src}" > scaleContent="false" > horizontalCenter="0" verticalCenter="0"/> > </mx:TitleWindow> > > </mx:Canvas> > > ********************************xml structure > <catalog> > > <book> > <name><![CDATA[<b>Biblioteca Central </b> ]]></name> > <desc><![CDATA[Se inauguró el 20 de noviembre de 1978 > ]]></desc> > <imagen>FOTOS/est/Biblioteca Central Manuel Bartlett > Bautista.jpeg</ > imagen> > <pano nombrePano="Biblioteca Central Bautista"> > <src>FOTOS/Panoramicas/PanoZoom642007.swf</src> > </pano> > <ico>BOTONES/gifs/video.gif</ico> > <video nombreVid="Biblioteca Manuel Bartlet"> > <src>VIDEOS/Biblioteca Manuel Bartlet.flv</src> > </video> > <audio/> > <pie>Biblioteca Central Manuel Bartlett Bautista</pie> > </book> > > </catalog> >