In my case, the parameter I add to my Flex app is simply calculated in the HTML wrapper page.

 

If it needs to be more dynamic (as you point out), my recipe would be something like this (I use basic J2EE stuff):

  • Somehow the server would receive an HttpServletRequest containing all information that you need to determine the Flex variables
  • Render a JSP that is similar the the HTML wrapper page, with the exception that you add some parameters dynamically to the flashvars section.

 

That should do the trick.

 

Cheers,

Franck

 


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of yaagcur
Sent: Friday, September 08, 2006 10:21 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Problems getting started with flashvars and Application.application.paramete

 

Thanks very much Franck and Adam - that solution worked fine

As you can probably imagine that was a baby step towards a more
dynamic solution so i was intrigued by your Cold Fusion reference, Adam
What I would like to do is be able to launch the Flex page based on
the paramaters chosen .e.g. name/hometown both from clicking on, say,
a datagrid row in another Flex project - presumably via URLRequest and
navigateToURL - or a standard link within an HTML page

Looking at the documentation it appears as though either Flex data
services(which I was not planning to use) or HttpServletRequest( which
i have no experience with) might be required. Is there another way via
ColdFusion?

--- In [EMAIL PROTECTED]ups.com, "Adam Dorritie" <[EMAIL PROTECTED]..> wrote:
>
> On 9/8/06, yaagcur <[EMAIL PROTECTED]> wrote:
> > Thanks Adam - remarkably similar:) Not sure if that thread sorted
Kyle
> > out but I'm not quite clear how my HTML is falling short. How
does the
> > javascipt AC_FL_RunContent section need amending? The "src" and
> > "flashvars" are already included
>
> Franck already provided the answer, but I'll say this much. The HTML
> <object> and <embed> are within the noscript portion of the page, in
> other words the portion of the page which will be executed if
> _javascript_ is not available. The normal path for processing is to run
> the _javascript_
> AC_FL_RunContent() function.
>
> The reason you need to modify this is to include your own FlashVars,
> in addition to the ones already passed by the default template. In my
> case I use ColdFusion to dynamically insert FlashVars based upon the
> Flex application which is running, but all you really have to do is
> add your own variables. For example:
>
> } else if (hasRequestedVersion) {
> // if we've detected an acceptable version
> // embed the Flash Content SWF when all tests are passed
> AC_FL_RunContent(
> "src", "myFlexAppName",
> "width", "100%",
> "height", "100%",
> "align", "middle",
> "id", "myFlexAppName",
> "quality", "high",
> "bgcolor", "#ffffff",
> "name", "myFlexAppName",
> "flashvars",'historyUrl=history.htm%3F&lconid=' + lc_id + '',
> -----> Add something like this...
> "flashvars",'myVar1=foo&myVar2=bar',
> ---->
> "allowScriptAccess","sameDomain",
> "type", "application/x-shockwave-flash",
> "pluginspage", "http://www.adobe.com/go/getflashplayer"
>

__._,_.___

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





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to