I've had some major problems implementing this type of solution --
hoping somebody might have some ideas as to why this won't work in my
situation.

I've got a multi-user application that has an application shell (a
Flex app with only an SWFLoader in it), a login page (a Flex app with
a simple login form that goes out to a servlet with an HTTPService to
authenticate a user) and the main application (a fairly large Flex app
that sits at about 550kb when compiled).

I'm doing a process identical to the one below to load the login page
in to the application shell, upon authentication success it attempts
to load the main application in to the application shell.

The problem is, I enter the login credentials, hit the service, but
the app just sits there forever essentially. At first I thought this
might be due to some type of timeout, but this even happens locally,
where a load should be pretty much instant.

I have tested the login service manually through the browser and it is
not experiencing any slowdowns or issues.

Any ideas would be appreciated.

Thanks,

Brian

--- In flexcoders@yahoogroups.com, "Vishwajit Girdhari"
<[EMAIL PROTECTED]> wrote:
>
> Hey Sam ,
> 
> Thanks for the interest show in resolving my query.
> 
> Actually I wanted to dynamically load / unload my 'sub applications'
> (compiled swf)
> but user feel should be as if only one mxml has been loaded.
> 
> Two days after making this post I figured out a simple way to
achieve this.
> Code below demonstrates the my approach.
> 
> Thanks,
> Vishwajit Girdhari
> Flexblog : http://flexiness.blogspot.com
> 
> Main.mxml
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute"
> creationComplete="init(event)" >
>  <mx:Script>
>   <![CDATA[
>    import mx.controls.Alert;
>          import flash.events.Event;
>          private function init(e:Event):void {
>           //doing nothing
>            }
>    public function loadSWF (filename : String) : void {
>           swfLoader.source=filename;
>          }
>        ]]>
>  </mx:Script>
>    <mx:SWFLoader id="swfLoader"  source="one.swf"   ></mx:SWFLoader>
> </mx:Application>
> 
> one.mxml
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute">
> <mx:Script>
>  <![CDATA[
>   import mx.controls.Alert;
>   public function handleOne ( event : Event ) :void {
>       mx.core.Application.application.loadSWF("two.swf");
>   }
> 
>  ]]>
> </mx:Script>
> <mx:Button id="btnOne" label="Button One" click="{handleOne(event)}"
> y="200"></mx:Button>
> </mx:Application>
> 
> two.mxml
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
layout="absolute">
> <mx:Script>
>  <![CDATA[
>   import flash.profiler.showRedrawRegions;
>   import mx.controls.Alert;
> 
>   public function handleTwo ( event : Event ) :void {
>    mx.core.Application.application.loadSWF("one.swf");
>   }
>  ]]>
> </mx:Script><mx:Button id="btnTwo" label="Button Two"
> click="handleTwo(event)" x="300"></mx:Button>
> </mx:Application>
> 
> 
> 
> 
> 
>   -----Original Message-----
>   From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED]
> Behalf Of Samuel Reuben
>   Sent: Tuesday, July 25, 2006 12:31 PM
>   To: flexcoders@yahoogroups.com
>   Subject: Re: [flexcoders] SWFLoader related query / challenge
> 
> 
> 
>   Do you want to interaction between the swf's? You most probably
will run
> into problems here.
>   If you don't mind what are you trying to achive?
> 
>   Thanks,
>   -sam
> 
> 
>   On 7/24/06, Vishwajit Girdhari <[EMAIL PROTECTED]> wrote:
> 
> 
>     One problem in flex...
> 
>     You have 3  .mxmls  that get compiled into   .swf  ( Say  A , B
, C  . )
> 
>     step1 You have to load B inside A
>     step2 In B there is a button on click you have to unload B from
A and
> load C
>     step3 Also in C there is a button on click you have to unload C
from A
> and load B
> 
>     ---
> 
>     My approach
> 
>     for Step1 : cool!
>          I am loading B in A using SWFLoader.
> 
>     for step2 : stuck!
>         I am not able get hold of the instance A  from which i can
change
> source property of swfLoader (instance) to "C.swf"
> 
>     for step : whatever works for step 2 :-(
> 
> 
>     --
> 
>     your thoughts please.
> 
>     thanks
>     vishwajit
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/SktRrD/hOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to