Re: [flexcoders] Re: Problems getting started with flashvars and Application.application.paramete

2006-09-09 Thread Adam Dorritie
On 9/8/06, yaagcur [EMAIL PROTECTED] wrote:
  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 my case, I'm just starting to incorporate Flex apps into a
ColdFusion-based intranet application portal environment.  Although we
don't use much in the way of URL query variables, we do have a great
deal of information (about users, what they're doing, portal features,
etc.) that we keep in ColdFusion session, client, and
application-scoped variables.

It made sense to me to move the default Flex HTML template into a
ColdFusion template and to modify it so that I can dynamically pass in
a variety of information from the portal to the Flex applcation.
Creating dynamic FlashVars seemed the easiest way to do this.  You
could easily pull in URL or Form variables the same way.  I would
assume it's just as easy to do this useing ASP or PHP to produce the
dynamic FlashVars list.

In any case, my CF template (which I haven't finished) looks like this:

!--- Create the FlashVars string.  createFlashVars() returns name/value
   pairs separated by  ---
cfset flashVarObject = createObject
(component,components.utilities.flashUtils)
cfset request.flashVars = flashVarObject.createFlashVars (foo)
...
} else if (hasRequestedVersion) {
   // if we've detected an acceptable version
   // embed the Flash Content SWF when all tests are passed
   AC_FL_RunContent(
 src, #myFlexAppSource#,
 width, 100%,
 height, 100%,
 align, middle,
 id, #myFlexAppID#,
 quality, high,
 bgcolor, ##ff,
 name, #myFlexAppName#,
 flashvars,'historyUrl=history.htm%3Flconid=' + lc_id + '',
 cfif isDefined
(request.flashVars)flashvars,'#request.flashVars#',/cfif
 allowScriptAccess,sameDomain,
 type, application/x-shockwave-flash,
 pluginspage, http://www.adobe.com/go/getflashplayer;
   );

createFlashVars() pulls an application-specific list of variable
values to include int he FlashVars list.  I also have logic that uses
request-scoped variables to determin which swf to load.  I haven't
finished this process yet, thus the lack of CF code.  I'm setting many
of the values manually in the template until I have time to autmoate
more of the process.

All that said, I'm new to Flex so I don't know if there is an easier
way to pull dynamically-selected environmental values form Flex.  This
way seemed easy to me.

Adam


--
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/

* 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/
 





[flexcoders] Re: Problems getting started with flashvars and Application.application.paramete

2006-09-08 Thread yaagcur
--- In flexcoders@yahoogroups.com, Adam Dorritie [EMAIL PROTECTED] wrote:

 On 9/8/06, yaagcur [EMAIL PROTECTED] wrote:
  I'm trying to get started with passing paramaters to a flex project
 
   initially based on livedocs
   Using the Application.application.parameters object and
   Using flashVars as source
 
 You might try reading the thread here:
 
 http://tech.groups.yahoo.com/group/flexcoders/message/49376

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






--
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/
 





RE: [flexcoders] Re: Problems getting started with flashvars and Application.application.paramete

2006-09-08 Thread Franck de Bruijn












I just did this myself today, so here is
my solution:



In the file html-template/index.template.html
in the section else if (hasReqestedVersion) I modified the line
with flashVars as follows:



flashvars,'historyUrl=history.htm?lconid='
+ lc_id +'' + 'wsPrefix=' + wsPrefix +
'',



The bold part is what I added. wsPrefix
is a variable I initialized in the script a little bit above myself.



HTH,

Franck









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











--- In [EMAIL PROTECTED]ups.com,
Adam Dorritie [EMAIL PROTECTED].. wrote:

 On 9/8/06, yaagcur [EMAIL PROTECTED] wrote:
  I'm trying to get started with passing paramaters to a flex project
 
  initially based on livedocs
  Using the Application.application.parameters object and
  Using flashVars as source
 
 You might try reading the thread here:
 
 http://tech.groups.yahoo.com/group/flexcoders/message/49376

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






__._,_.___





--
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
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___






Re: [flexcoders] Re: Problems getting started with flashvars and Application.application.paramete

2006-09-08 Thread Adam Dorritie
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, #ff,
name, myFlexAppName,
flashvars,'historyUrl=history.htm%3Flconid=' + lc_id 
+ '',
- Add something like this...
flashvars,'myVar1=foomyVar2=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 
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/
 




[flexcoders] Re: Problems getting started with flashvars and Application.application.paramete

2006-09-08 Thread yaagcur
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 flexcoders@yahoogroups.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, #ff,
   name, myFlexAppName,
   flashvars,'historyUrl=history.htm%3Flconid=' + lc_id 
 + '',
 - Add something like this...
   flashvars,'myVar1=foomyVar2=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 
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/
 




RE: [flexcoders] Re: Problems getting started with flashvars and Application.application.paramete

2006-09-08 Thread Franck de Bruijn












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, #ff,
 name, myFlexAppName,
 flashvars,'historyUrl=history.htm%3Flconid='
+ lc_id + '',
 - Add something like this...
 flashvars,'myVar1=foomyVar2=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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___






RE: [flexcoders] Re: Problems getting started with flashvars and Application.application.paramete

2006-09-08 Thread Franck de Bruijn












I tried it, and it works nice. Thanks for
the tip. It keeps the page cleaner.











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











On
9/8/06, yaagcur [EMAIL PROTECTED]com
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, #ff,
name, myFlexAppName,
flashvars,'historyUrl=history.htm%3Flconid='
+ lc_id + '',
- Add something like this...
flashvars,'myVar1=foomyVar2=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
  

   
  






  
  Your email settings: Individual Email|Traditional 
  Change settings via the Web (Yahoo! ID required) 
  Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured 
   
Visit Your Group 
   |
  
Yahoo! Groups Terms of Use
   |
  
   Unsubscribe 
   
 

  




__,_._,___