The question begs.
Why would you want to use the untyped params object to pass values between swf 
applications.

why not just create a setter on the sub application and when its loaded the set 
the value on it via the parent application.
use a common interface to get the setter method signature.

Bjorn

--- In flexcoders@yahoogroups.com, "Tracy Spratt" <tspr...@...> wrote:
>
> Those traces tell me it should be working, that the embedded app is ready
> when the host app attempts to communicate with it.
> 
>  
> 
> Tracy
> 
>  
> 
>   _____  
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of Richard Rodseth
> Sent: Tuesday, March 03, 2009 6:42 PM
> To: flexcoders@yahoogroups.com
> Subject: Re: [flexcoders] Re: Passing params (flashvars) to sub-applications
> 
>  
> 
> I just did a quick trace test, and the messages were written to the console
> in the following order:
> 
> 1) SWFLoader load complete (registers listener for app complete)
> 2) embedded application creation complete handler
> 3) embedded application app complete handler
> 4) host app handler for embedded app app complete
> 
> So presumably if one is setting parameters in 4) they can't be read in 3)...
> 
> Tracy, are you following the recipe here (2nd answer)?
> 
> http://stackoverflo
> <http://stackoverflow.com/questions/407858/passing-flashvars-style->
> w.com/questions/407858/passing-flashvars-style-parameters-to-a-loaded-swf
> 
> Seems to me this could only work if the loaded app is not accessing the
> parameters until some subsequent user gesture.
> 
> 
> 
> On Tue, Mar 3, 2009 at 11:53 AM, Richard Rodseth <rrods...@gmail.
> <mailto:rrods...@...> com> wrote:
> 
> It was on creation complete. 
> 
>  
> 
> On Tue, Mar 3, 2009 at 11:17 AM, Alex Harui <aha...@adobe.
> <mailto:aha...@...> com> wrote:
> 
> Not sure when  you tried the code that didn't work, but application is not
> available right away
> 
>  
> 
> Alex Harui
> 
> Flex SDK Developer
> 
> Adobe Systems Inc. <http://www.adobe.com/> 
> 
> Blog: http://blogs. <http://blogs.adobe.com/aharui> adobe.com/aharui
> 
>  
> 
> From: flexcod...@yahoogro <mailto:flexcoders@yahoogroups.com> ups.com
> [mailto:flexcod...@yahoogro <mailto:flexcoders@yahoogroups.com> ups.com] On
> Behalf Of Richard Rodseth
> Sent: Tuesday, March 03, 2009 10:47 AM
> To: flexcod...@yahoogro <mailto:flexcoders@yahoogroups.com> ups.com
> Subject: Re: [flexcoders] Re: Passing params (flashvars) to sub-applications
> 
>  
> 
> Thanks for the example, Amy. I was able to do this (on application complete
> in the host):
> 
>                                     loadedApp = event.target.application as
> Application;
>                                     loadedApp["configid"] = "Default";
> 
> and see the value in the loaded application. 
>             
> public function set configid(id:String):void {
>                 this.config_id = id;
>  }
> 
> 
> I was also able to pass a parameter in the url, and access it in the loaded
> app's creationComplete via
> 
> this.parameters["config_id"] (not
> Application.application.parameters["config_id"]
> 
> But I have not been able to get this to work:
> 
>                                     loadedApp = event.target.application as
> Application;
>                                     if(!loadedApp) throw new Error();
>                                     loadedApp.parameters["config_id"] =
> "Default";
> 
> Loaded app's onCreationComplete()
> 
>                  this.config_id =
> Application.application.parameters["config_id"];
> 
> 
> 
> 
> 
> On Tue, Mar 3, 2009 at 6:35 AM, Amy <amyblankenship@
> <mailto:amyblankens...@...> bellsouth.net> wrote:
> 
> --- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com,
> Richard Rodseth <rrodseth@> wrote:
> >
> > I'm experimenting with loading sub applications using SWFLoader. I've 
> read
> > numerous posts about this, but for the life of me can't figure out 
> how to
> > pass flashvars to the sub application. In particular, the technique
> > described here (the second one) doesn't work for me
> > 
> > http://stackoverflo
> <http://stackoverflow.com/questions/407858/passing-flashvars-style->
> w.com/questions/407858/passing-flashvars-style-
> parameters-to-a-loaded-swf
> > 
> > Surely there's a definitive way to do this?
> 
> Have you thought about just setting up getters and setters on your base 
> class and calling those? This doesn't use getters and setters, but a 
> getter or setter is just a function, so you can see how it would work:
> 
> http://flexdiary.
> <http://flexdiary.blogspot.com/2009/01/example-of-casting-contets-of->
> blogspot.com/2009/01/example-of-casting-contets-of-
> swfloader.html
>


Reply via email to