While this approach might be good to just 'enumerate' your Flashvars. loosely coupling application functionality to generally unknown variables is a train wreck waiting to happen. In Dennis's example 'woo' is the value of the url. which could change if the value is being streamed into the wrapper at runtime (very common). This would exacerbated data handling proportionately to the number of Flashvars. Given this - I would recommend the following.
var urlFragment:String = "[ some default ]"; if ( Application.application.parameters.url == "" ) urlFragment = Application.application.parameters.url; Storing more than a few items in Flashvars isn't a good idea. the more unknowns you include the more introspection you will be required to do. Acquiring the value of parameters by name is preferred and allows you to fallback - and keep your application from es-ploding (e.g. if the name is unknown and the value is variable what's the point?) Rick Winscot From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jari.huuskonen Sent: Wednesday, April 02, 2008 4:50 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: flashvars hate me This is what I did to use flashvars: AS for (var i:String in Application.application.parameters) { if (i=='woo') woo=Application.application.parameters[i]; } html AC_FL_RunContent( ... "flashvars",'woo=jabadabaduu&historyUrl=history.htm%3F&lconid=' + lc_id + '', ... ) --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Dennis Falling" <[EMAIL PROTECTED]> wrote: > > No, I'm doing it with the template html file. I've double-checked the html > source in my browser after running and they're all there. I've added the > url=woo code in four places: the AC_FL function, the embed > src="...swf?url=woo", the <param "flashvars" value="url=woo...", and the > FlashVars="url=woo". > > I'm sure it's probably not supposed to be in that many places, but I kept > seeing different instructions and none of them have worked as of yet. I'm > using Flex 3. > > > > On Wed, Apr 2, 2008 at 12:35 PM, Tracy Spratt <[EMAIL PROTECTED]> wrote: > > > It looks like you are doing this manually. I always start with a > > wrapper generated by FlexBuilder, and edit the AC_FL_RunContent function as > > Rick suggests. I have never had any problems. > > > > Tracy > > > > > > ------------------------------ > > > > *From:* flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] *On > > Behalf Of *dfalling > > *Sent:* Wednesday, April 02, 2008 1:10 AM > > *To:* flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > > *Subject:* [flexcoders] flashvars hate me > > > > > > > > I can't get flashvars to work... It seems pretty basic, but no mater > > what I do they don't seem to show up in flex. > > > > AS: > > woo = Application.application.parameters.url; > > > > HTML: > > <param name="FlashVars" value="url=woo" /> > > > > <embed ... > > flashvars="url=woo"> > > </embed> > > > > What am I missing? > > > > Thanks! > > > > > > >
<<image001.jpg>>
<<image002.jpg>>