Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 630193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T19:49:44+00:00 2026-05-13T19:49:44+00:00

I am using python and webapp framework in app engine for backend and flex

  • 0

I am using python and webapp framework in app engine for backend and flex 4 for front end.
I would like to pass a string form backend to front end, so i write the following code in the main.py:

class MainPage(webapp.RequestHandler):

 def get(self):

  userVO = "test"

  template_values = {
   'url': self.request.uri,
   'userVO': userVO,

  }
  self.response.out.write(template.render("templates/index.html", template_values))

And in the flex 4, I have the following code:

var user:String = FlexGlobals.topLevelApplication.parameters['userVO'];

However, I receive null value.

Please advice how to correct it. Thanks.

Edit: 25 Feb.

Thanks for the people who answer my question. For my question, I am try to figure out how the python app engine pass data to flex app when it render the html file that include the swf file. Maybe, there is something I can set in the main.py, swfobject.js or the index.html to do my task.

I know how to use Pyamf as a gateway to serve the flex app, I am thinking how to make the app more simple.

Thanks.

Edit: 28 Feb.

Robert, the index.html is the standard file created by flash builder 4. Wish you can give me some hints how to modify it. The following is the file:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0014)about:internet -->  

<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> 
<!-- 
Smart developers always View Source. 

This application was built using Adobe Flex, an open source framework
for building rich Internet applications that get delivered via the
Flash Player or to desktops via Adobe AIR. 

Learn more about Flex at http://flex.org 
// -->
   <head>
   <title></title>         
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

html, body { height:100%; }
body { margin:0; padding:0; overflow:hidden; text-align:center; }
#flashContent { display:none; }

    <script type="text/javascript" src="/js/swfobject.js"></script>
    <script type="text/javascript">
        <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. --> 
        var swfVersionStr = "10.0.0";
        <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
        var xiSwfUrlStr = "/swfs/playerProductInstall.swf";
        var flashvars = {};
        var params = {};
        params.quality = "high";
        params.bgcolor = "#ffffff";
        params.allowscriptaccess = "sameDomain";
        var attributes = {};
        attributes.id = "index";
        attributes.name = "index";
        attributes.align = "middle";
        swfobject.embedSWF(
            "/swfs/index.swf", "flashContent", 
            "100%", "100%", 
            swfVersionStr, xiSwfUrlStr, 
            flashvars, params, attributes);

swfobject.createCSS(“#flashContent”, “display:block;text-align:left;”);

To view this page ensure that Adobe Flash Player version
10.0.0 or greater is installed.


Get Adobe Flash Player

    <noscript>
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%" id="index">
            <param name="movie" value="index.swf" />
            <param name="quality" value="high" />
            <param name="bgcolor" value="#ffffff" />
            <param name="allowScriptAccess" value="sameDomain" />
            <!--[if !IE]>
            <object type="application/x-shockwave-flash" data="index.swf" width="100%" height="100%">
                <param name="quality" value="high" />
                <param name="bgcolor" value="#ffffff" />
                <param name="allowScriptAccess" value="sameDomain" />
            <![endif]-->
            <!--[if gte IE 6]>
             <p> 
              Either scripts and active content are not permitted to run or Adobe Flash Player version
              10.0.0 or greater is not installed.
             </p>
            <![endif]-->
                <a href="http://www.adobe.com/go/getflashplayer">
                    <img src="https://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" />
                </a>
            <!--[if !IE]>
            </object>
            <![endif]-->
        </object>
 </noscript>  

Thanks, Robert.

Edit: 7 Mar.

Robert,

Refer to http://help.adobe.com/en_US/Flex/4.0/html/WS2db454920e96a9e51e63e3d11c0bf626ae-7feb.html

Before I post the question here, I tried the following code:

In the index.html,

<%
     String user = (String) request.getParameter("userVO");
%>

and also

flashvars.userVO =  "<%= user %>"; 

The result, I get:

< user

Do you know why I can’t get the correct data. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T19:49:45+00:00Added an answer on May 13, 2026 at 7:49 pm

    Based on your comment to James Ward’s response, I wonder if you can accomplish what you need with a FlashVars param element?

    http://livedocs.adobe.com/flex/3/html/help.html?content=passingarguments_3.html

    You will probably just need to adjust the index.html template to build the FlashVars param element.

    Edit: 6 Mar

    You might try looking at:
    http://polygeek.com/801_flex_reading-flashvars-in-flex

    You need to be sure you wait until the app has been loaded to access the flashVars.

    Edit: 7 Mar

    Correct, in those examples they hard code the value. You need to edit your template so the value is set to the value of the template parameter.

    So, in index.html:
    flashvars.userVO = "{{ userVO }}"

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using python google app engine with the webapp framework, substituting jinja2 templates for
I'm using Google App Engine in Python using Google's webapp framework. I want to
I am using python and Google app engine. I would like to use the
So I have a python webapp on Google App Engine and am using the
I wrote a simple webapp using google app engine in python that allows users
I'm using App Engine python to host an application and would love to use
I am developing a tiny webapp on google app engine using python. I am
I'm using the webapp2 framework in Google App Engine (Python). In webapp2 exception handling:
Using Python I would like to find the date object for last Wednesday. I
I just started with Google App Engine using python and I was following a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.