Python :: Pass Values To Flex App?
Jan 29, 2011I am calling Python script from flex using HTTP service. How can I send back some values from python to flex app?
View 3 RepliesI am calling Python script from flex using HTTP service. How can I send back some values from python to flex app?
View 3 RepliesI 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:
[Code]...
I have a simple site made with python (django). User registers, inputs some basic info and it stores it to mysql. User then is able to log in with his username/password which he created...
Now i want to add a flex application which will run once the user is logged in, but i dont want the user to have to log in twice (once into django, once into flex app). For the sake of learning i just want the flex app to also load some information from the mysql database, like the users firstname or something.
how would i go about passing session information into the flex app?
I have created a flex application in the Python Gae sdk and I got the error 2048, so I put a crossdomain.xml under the static folder.
The crossdomain.xml is following:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy> [code].....
However, I still got the error 2048. Therefore, I would like to know is anything I need to configure or miss in my case and how to fix the error.
I want to send some text value to my custom popup window when it pops up from main application which is having some text input and also I want to know how to retrieve data(of text input) which entered by a user in popup window.
View 2 RepliesI'm trying to find out if there is a way I could embed a Python back-end into an AIR application? I'm looking to employ an approach similar to the one outlined here to implement the business logic for my application, but additionally, I would like to provide the user with a single binary which they can load. I don't want the user to have to fire up a seperate server process to make this work.
View 3 RepliesI have a mxml component with a datagrid listing project names and code versions. I have the selected projects from the datagrid binded to a public variable named "selectedProjects". But how to access this variable in another mxml component. I want the selected project's name in that component's text area. I even created an instance of the first component and using that called the selectedProjects variable. But I do not get the value updated in the text area.
This is the code for the first component where I get the selected projects name in a variable:
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="handleCreationComplete();"
width="800" height="600">
[Code].....
I was trying to update the value of the selected projects in the text area of Id "projDocs", But I do not get it..
Is there anyway where I can pass the Array values (not the array collection values) to the Bar charts or column charts using flex 3.5...
here is the thing i want:::
I have array values like this,,
array1 = [23, 49, 40, 239, 20, 80, 39,49,120, 24, 31,41];
and i want to show these values on the Yaxis and months on Xaxis....
I have two Qns,
1) how can I pass this array to Bar chart or column chart.
2) how do I need to show months on Xaxis. beacuse I'm asking this regarding, I have kept a filters that even if we want to see some months or a particular months or perticalar span of months... there on Xaxis it need to change the months dynamically depending on the filters..... (for ex, on Xaxis the values should be (Jan, Apr, Jun,Oct) if i select the 3 months period filter....)
I have written a logic to collect the values of those particular months into an array, but not understading how to pass this array to Bar chart,, beacuse there I don't know what Xfield and Yfield to be given....
I experience strange behavior of sockets in Python (3.2). Client connects to my application using Flash. Most of the time there is nothing unusual but sometimes python crashes in a way that should not have taken place - enter into infinite loops. Below I attach to the loop code and error message in the log. Python hang on bytesRecived = sock.recv(64) and receive b'' witch is visible in log.
code:
try:
buff = ''
[code].........
Does Adobe Flash expose any Automation or hosting interfaces through COM or a DLL in %systemroot%system32? I'm working with Python and wxWidgets to host a flash application to monitor lunar phases.
View 1 Repliesi develop one project on python and upload on google app can i use swf file to import in python web application?
View 1 RepliesI use a popup loaded from different MXML file:[code]The problem is I don't know how to pass text values from text inputs to the main component after buttonOK is clicked in the popup. I tried custom events, but it didn't work.url...
View 1 Repliesi need a simple python lib that check the uploaded files to my webserver are flash media (FLV), by reading the flv header (metadata) and not the mimetype extension.
View 1 RepliesIf swf file is embedded in html it is easy to call ActionScript methods via ExternalInterface using JavaScript. Now I want to use the swf file outside of a browser and still be able to access its methods, but now I want to use Python to call ActionScript. Is it possible? There is so little information about it in the Internet. Probably I can use AMF (pyAmf) for this, can I?
View 2 RepliesI am a middle school teacher and a newbie in Flash Actionscript. I am trying to create a countdown timer for use in my class during tests. The start and pause functions work as required, but not the pause button. When I click on the pause button, the timer is reset to 0:00:00.[code]
View 1 RepliesMy example imports XML and has an object rotating on stage. The rotating object is called enemy corresponds to ENEMY in the XML. How do I set the rotation variable to receive values from XML?
REASON: It seems more difficult to set up variables using external data. I want to understand it better.
rotation.fla
//LOAD XML
var myXML:XML;
var myLoader:URLLoader = new URLLoader();[code]......
My timer has three variables that I can trace to the output window,but don't know how to pass them to the timer. How to I pass the XML values to my timer? I want to test with an XML document, before I try connecting it to an XML socket.[code]
View 1 RepliesThis is driving me nuts... Based on my research I should be able to pass QueryString parameters directly to a swf object like so: [URL] In the mxml oncreationcomplete method I have tried the following:
[Code]....
I need to ask your advice, I am developing a site where music is uploaded by unsigned bands.I would like the player to be developed in flash.I would want an area where you can search for music and also would like the user to be able to generate play lists when they are logged in.I was going to put the filenames into the database and use PHP to grab them and display them and then use JavaScript to pass the values into the flash player.But I think this will not work on the play list.So should I get the list of tracks using PHP and use Flash to display them?Or should I be using XML and not put the filenames in the database or even both.I have spent a bit of time Googling this and thinking about how I am going to attack this so my question to you guys is what would be the most efficient way of doing this.
View 2 RepliesI have a game with 3 levels and a reward page. I want to display the number of tries on the reward page. The levels and reward page have their own label within the main timeline. How can I pass the info from a level, to the main timeline and how do I retrieve it on the reward screen?
View 7 RepliesHow can I send a .png file using python cgi to a flex application?
View 1 RepliesI've created some dynamic movieclips. When I click and hold on one of them, I'd like a different library linked MC to appear, and the new MC to be draggable.
I can make the new MC appear, and I can make it draggable. However, I'm a little lost when it comes to telling Flash to forget about the old clip, and make the new one the 'live' one.
In other words - after a click-hold, I want the new movieclip to be movable without the user having to mouse up and then click again.
How do I pass values by reference inside a for each construct in AS3? Basically, I want something equivalent to the following code in PHP:
foreach ($array as &$v) {
$v = $v + 1;
}
This would allow me to change all elements of the collection $array through a single loop.
I am wondering if it's better to pass an instance of a whole class to another class or just specific properties of that class. For example if I want the height property of class A in class B do I pass just the height value into class B or the whole instance of the class and use classA.height in class B?
View 3 RepliesHow to pass the values SWF file to HTML Page?
forexample:
i type the user name and Password in Swf file. the username and Password is
shown in Html page. how to send the username and password in Html page?
HOW can I have a value shared between multiple classes? For example.
Code:
public var test:int = 3;
This works fine for the "main" class, but in the "animal" class, it can't access this variable. So if I wanted to set a rate of movement for an object, say animal, and I want to change it later in a different function, well, how? Any good guides to passing variables between functions and classes that are easy to understand? HOW can I pass values to ENTER_FRAME events, err...any events really. Example.
Code:
public class animal extends MovieClip{
public function animal(){
trace('crazy stuff happening');[code]....
Lets say I wanted to pass the Y value from the main class and not from within the animal function.
How do you pass variable values between functions where the addEventListener is in the first function? I am trying to get the color value passed into my event handler. [code]...
View 6 RepliesI am making a simple Python CGI script that collects data(in xml format) from a flex application and I want to insert it into the mysql database . In perl The script is looks like the following...
my @samplexml=$cgi->param("Items");
my $data=$xml->XMLin("@samplexml");
foreach my $e(@{$data->{Group}})
[code].....
I'm having a problem converting a regular expression from Python into Flex. My string is something like this:
SELECT "col", othercol,
othercol3" FROM doesn'tmatter...
Python matches just fine:
>>> re.search('select(.*?)from', 'SELECT "col", othercol,
[Code]..
match always ends up null. What am I doing wrong? I'm sure it's obvious to a seasoned Flex programmer...
I have created a small banner for the homepage of a website for a company. The problem is that when they load the banner to their website the link no longer works. I have tested it myself and it works fine on my website. have the banner be clicked and open up in the same browser to another page on this website."define a way to pass link URL values into a flash object as a parameter."
"We need the functionality ASAP so can you start by working on this and creating a sample. It shouldn�t be too difficult as it is a fairly common requirement. Can you put together a basic example (it doesn�t need good graphics) that shows this idea working over " [URL]