No, they're distinct.  Here's the code.  they're very simple.

Screen1.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
layout="absolute" backgroundGradientColors="[#0080c0, #000000]">
        <mx:Label text="1 One First Primary" y="41" color="#ffffff" 
fontWeight="bold" fontSize="12" horizontalCenter="-94"/>
</mx:Application>

Screen2.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
layout="absolute" backgroundGradientColors="[#008080, #008080]">
        <mx:Label id="lbl" text="2 Two Second Secondary" y="98" 
horizontalCenter="-24" fontSize="12" fontWeight="bold" 
color="#ffffff"/>
        <mx:Button label="change" click="lbl.text='changed'"/>
</mx:Application>

Screen3.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
layout="absolute" backgroundGradientColors="[#804040, #000000]">
        <mx:Label y="134" text="3 Three Third Tertiary" 
horizontalCenter="37" fontSize="12" fontWeight="bold" 
color="#ffffff"/>
</mx:Application>

I don't understand how we could be getting different results.  I 
thought one of the features of Flex was that it worked the same way 
on every platform.  I've tried this on two different servers both 
from a http:// call and a file:// call, and got the same result each 
time.  First one shows up correctly.  Second and third are blank 
white screens.

P.S.  Thanks for the init() shortcut.


--- In [email protected], "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> Your code worked for me. I pasted it into a new FlexBuilder 
project, and
> I made three different SWFs -- screen1.swf, screen2.swf, and 
screen3.swf
> -- and put them in the same project folder. When I ran the app I saw
> each SWF as I clicked the tabs. Perhaps all three of your SWFs are
> copies of the same SWF?
>  
> BTW, your 10-line init() method can be condensed into
> screens = new ArrayCollection(
>     [ { incSWF: "screen1.swf" }, { incSWF: "screen2.swf" }, { 
incSWF:
> "screen3.swf" } ]);
> 
> - Gordon
> 
> ________________________________
> 
> From: [email protected] 
[mailto:[EMAIL PROTECTED] On
> Behalf Of ibid049
> Sent: Wednesday, June 13, 2007 12:36 PM
> To: [email protected]
> Subject: [flexcoders] Help Request : Deferred Instantiation and 
Bound
> SWFLoader
> 
> 
> 
> Please forgive the intrusion of contacting you directly, but I saw 
> you post several times on a related topic in the flexcoders mailing 
> list, and - after not receiving a response to my own query on the 
> list, thought you might be able to save me hours of wall-to-head-
> banging with just a few seconds worth of advice.
> 
> It seems that a viewStack component that contains a SWFLoader is 
not 
> successfully loading the SWF of the second and further panes. 
> Frankly, I can't believe that's the case, because surely someone 
else 
> would have noticed this. I assume it's an elementary error on my 
> part.
> 
> The following mxml demonstrates the problem. I'm binding the 
> repeater to an ArrayCollection of filenames that should be used as 
a 
> source for SWFLoaders inside the Repeater. This only loads the 
first 
> pane, even when clicking on the second or third pane. 
> 
> I must be doing this in either a wrong or non-standard way. Is 
there 
> any way you could point to an easier way to accomplish what I'm 
> trying to do here?
> 
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
> <http://www.adobe.com/2006/mxml> " 
> layout="absolute" creationComplete="init()">
> <mx:Script>
> <![CDATA[
> import mx.controls.Alert;
> import mx.collections.ArrayCollection;
> 
> [Bindable] public var screens:ArrayCollection;
> 
> public function init():void {
> screens = new ArrayCollection();
> var firstScreen:Object = new Object();
> var secondScreen:Object = new Object
> ();
> var thirdScreen:Object = new Object();
> firstScreen.incSWF = 'screen1.swf';
> secondScreen.incSWF = 'screen2.swf';
> thirdScreen.incSWF = 'screen3.swf';
> screens.addItem(firstScreen);
> screens.addItem(secondScreen);
> screens.addItem(thirdScreen);
> }
> 
> ]]>
> </mx:Script>
> <mx:TabNavigator id="ScreenStack" top="22" left="0" 
> right="0" bottom="0">
> <mx:Repeater id="AppRepeater" 
> dataProvider="{screens}">
> <mx:Canvas id="AppCanvas" 
> width="100%" height="100%">
> <mx:SWFLoader 
> id="ScreenLoader" source="{AppRepeater.currentItem.incSWF}" 
> width="100%" height="100%"/> 
> </mx:Canvas>
> </mx:Repeater>
> </mx:TabNavigator>
> </mx:Application>
>


Reply via email to