RE: [flexcoders] Re: flashvars hate me
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=jabadabaduuhistoryUrl=history.htm%3Flconid=' + 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.jpgimage002.jpg
Re: [flexcoders] Re: flashvars hate me
Ok, I checked that page again (saw it during my current hunt) and think I'm doing everything in it. I'm sure there's something stupid that I'm missing, but this is my typical flex problem: something really basic takes me hours to do because I can't figure out the exact syntax. On Wed, Apr 2, 2008 at 12:21 AM, Alexander Tsoukias [EMAIL PROTECTED] wrote: I've had similar issues but this post had helped me a lot: http://thanksmister.com/?p=27 thanks Alexander --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, dfalling [EMAIL PROTECTED] wrote: 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!
[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=jabadabaduuhistoryUrl=history.htm%3Flconid=' + lc_id + '', ... ) --- In flexcoders@yahoogroups.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:[EMAIL PROTECTED] *On Behalf Of *dfalling *Sent:* Wednesday, April 02, 2008 1:10 AM *To:* flexcoders@yahoogroups.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!
[flexcoders] Re: flashvars hate me
I've had similar issues but this post had helped me a lot: http://thanksmister.com/?p=27 thanks Alexander --- In flexcoders@yahoogroups.com, dfalling [EMAIL PROTECTED] wrote: 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!