Php :: Holding The Session In Flex?
Jun 23, 2009
I am getting the session generated in Flex Application in a hidden text field, but when i refresh the page it gets back me to login page...
How can i hold the session of the page until the browser is not closed...
I am getting the session value from PHP.
View 2 Replies
Similar Posts:
Sep 13, 2011
IŽam trying to create my own custom list component in a Flex mobile Project which fires an Event when the user touches a listitem and holds the finger down for a given time.Some kind of "longTouch"-Event like its implemented on native android listitems to edit the entry for example.
I tried to listen for the MOUSE_DOWN Event to start a timer and dispatch an event when the timer finished. But this approach failed because i cant get the listitem that was pressed by the user because the List component updates the "selectedItem"-property only after the user lifts his finger from the list.
View 1 Replies
Apr 16, 2011
Am facing issue with session timeout. Say for instance, the user logs into the application and he waits for 30 mins (session timeout time) and then tries to get a service through remote object.Ideally speaking, since the session has timeout the user shouldn't be able to hit the remote object, but this is happening the other way round.
[Code]...
View 1 Replies
Dec 6, 2010
I'm developing a FLEX application which has a Java Server as back-end.
What I need:
-The FLEX app can only be used if the user it's logged;
-The FLEX app also needs to know which user it's logged, because it will shows especific content about him;
-I need to perform authentication on every webservice call;
However, the webpages are being developed using PHP, as well the login system.
After some digging, I've discovered that I can use the PHP session ID for authenticate every webservice calls, by using the php-java-bridge so both PHP and Java can share the same session.
My problem it's that I don't know how the FLEX app can get the current PHP session ID. I know that it's possible to pass it by flashvars, but I think it's not secure.
View 2 Replies
Jan 7, 2010
I have a Flex login page that uses HTTPService to communicate with server side php script. Once user's credential is verified, a session will be created and the login page will redirect to the main Flex page with that session info. I'm not sure how to implement the session logic.
View 2 Replies
Nov 17, 2010
I have a Flex application which is served via a JSP page. In this page I output the session ID using HttpSession when the page is loaded: System.out.println("Session ID: " + session.getId()); In a very simple remote object hosted in BlazeDS (called from the flex application using an AMF Channel and standard RemoteObject functionality) I also output the session ID but this time using FlexSession (which as I understand is supposed to wrap around HttpSession).
System.out.println("FlexSession ID: " + FlexContext.getFlexSession().getId()); I would expect both IDs to be the same but this is not the case. The session IDs differ which is causing problems as there is data stored in the HttpSession which I need to be able to access from my remote objects within BlazeDS. I've exhausted the reading material on BlazeDS and FlexClient/FlexSession/FlexContext but can't see why the FlexSession is not being linked to the HttpSession.
View 3 Replies
May 20, 2011
In IE, the session work, but in Firefox, it always return empty value.
I have set $_SESSION['apple']='1' in index.php
When executing a Flex 4/flash app that will allow user to browse an image file using filereference for upload to the server (this app is image uploader), the file will then pass to second.php to validate whether it is an image.
In the second.php itself, I have a function that need to retrieve $_SESSION['apple'] value which was set in index.php, it always return empty string in Firefox and Chrome but work on IE9.
Has anyone came across the same problem with $_SESSION on Firefox and Chrome?
How do I make sure the second.php can retrieve $_SESSION?
View 4 Replies
Jun 20, 2011
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?
View 1 Replies
Jul 25, 2011
my aim is to catch when the session is invalidated and send message to all destination that the FlexClient subscribed that the client wiht id .... has disconnected. I implemented a service which listens for
[Code]...
Problem is that i want to catch messageClientDestroyed and send to that destination a message that the user has disconnected.But blazeds destroys messageClient when you add a subtopic.So how to understand that if session is invalidated and all messageClient are being destroyed or the user just enter another place and add a subtopic to his consumer. I'am also open for other solutions to implement that mechanism.When user disconnected by session timeout or closed the site browser etc. i wanna catch it and send a message to subscribed destinations.
View 1 Replies
Oct 10, 2011
look im facing a problem. I have .NET + Flex application. I have a component in Flex who uploads a .XLS file to the server. This component has a Progress Barand it updates its bar and the Label with the
[Code]...
View 1 Replies
Jun 14, 2010
I am new to Flex. I am just wondering how to manage session and cookies for logging in, logging off in Flex? I am using Flex HttpService and Java servlet.
View 1 Replies
Oct 30, 2009
Any standard way to keep alive the http session as long user has open the flex app in the browser? I played around with the polling mechanism of blazeds. But it had no affect on the http session.
View 3 Replies
Jun 4, 2010
I have a java web application. When I log in to that application and navigate to a jsp which has flex chart embeded into it, the chart displayes just fine. I am using blaze ds remoting object mechanism. But when I want to navigate to a different page, it logs me out of application since the login session is lost.
View 1 Replies
Jul 21, 2010
In my Flex application, channelSet is reset on each browser refresh.If you've authenticated and refresh the page and check channelSet. authenticated, it says false, but your remoteObject calls will still work because the server session still exists.I have a service call that checks for a session on the server and can identify that one exists when a user has already authenticated and not logged out, but how can I bypass login and still set the channelSet.authenticated to true without calling channelSet.login() when they come back to the page(before a timeout occurs, of course)?The user session isn't closed if you exit the browser. Currently it does in fact make you log in again. But there is an existing session so blazeds returns a re-authentication error if you're not the user in the session, and it also allows you to login with any password if you are the user because it sees that the session has already been authenticated.So how can I make it so the session is invalidated upon closing the browser or refreshing? I could do it by automatically logging out when the app starts, but that doesn't seem very elegant.[code]
View 1 Replies
Jun 23, 2011
I have my flex object embedded to JSP page.The JSP page retrieves user information like user name and group from portal profile object and stores in http session parameters. The flex Object makes a remote call to Employee.class to perform persona based operation.
I retrieved the session id in JSP and also in the Employee.class both are same. But I am not able to retrieve the username stored in the http session from FlexSession. I read in the internet that the FelxSession will hold all httpSession information as well. It's always coming as null. Correct me if I am wrong.
[Code]...
View 1 Replies
May 26, 2011
I have a AIR for mobile pure AS3 project that saves a file on the device the first time it runs into the file.applicationStorage directory. The second and subsequent times the application launches I need it to look at that file I've saved.
My problem is that when I debug the application from Flex Builder 4.5 it wipes the application and application storage. So the application always behaves like it is running for the first time. I can't get into a debug session and step through my code as I read in that file.
Does anyone know how to connect to a debug session running on the device? My device in this case is an Android Samsung Galaxy S.
View 1 Replies
Nov 10, 2009
Is there any way to get Flex Builder to connect to an existing browser session running Flash Player Debugger? I can connect to FDB like this, but with Builder I need to click Debug and rush to close the newly opened browser window before it loads the Flash file and then go back to the session I want to connect and right click it to start the debugger.
Unfortunately this is not very reliable as I can't always beat the window opening, requiring several attempts before being able to connect to the session I am interested in. If I could just tell Builder 'Start debugging' and then have it wait for the connection, I could now calmly go over to the browser, right click, hit debug, provide the IP and voila. This would allow me to inspect variables on a hard to replicate bug on a session running on a tester's computer.
View 3 Replies
Apr 30, 2011
I'm developing a Flex application that employs BlazeDS with Tomcat on the backend. The Flex client authenticates through the ChannelSet which in turn creates an authenticated session on Tomcat. From then on, all of the client calls are authenticated transparently. However, I have a regular HttpServlet for uploading files, which does not get the session information from the BlazeDS servlets.
Is there a way that I can get the Principal object in the HttpServlet? I know that I can get the session ID from the BlazeDS servlet, pass it to the client, and then send that along with the upload request.
View 1 Replies
Mar 28, 2011
scripting for holding a button down and having the action take place once.So thing is, I have code for pressing a button (which is the up arrow button)This was suppose to show the animation for someone shooting constantly until released:
if (Key.isDown(Key.UP)){ fox.gotoAndPlay(16); deploy.gotoAndPlay(2); trace("Pressed."); }
Unfortunetly the results are:Holding down the up key places out "Pressed." constantly instead of once.fox.gotoAndPlay(16) stays on 16 rather progressing the animation (to which should come back to 16 at a repeated process)deploy.gotoAndPlay(2) plays a sound but before: the sound played constanlty rather once) recently: sound never playsI also need code that prevents the player from moving when holding down the up arrow key.So in total, I want the player to be able to hold the up key, and everything executed is played once until pressed agan after release.I heard about adding listeners:
var myListener:Object = new Object(); myListener.onKeyDown = function() { KEY = Key.getCode(); if (!this[KEY]) { trace("You pressed "+KEY); } this[KEY] = true; }; myListener.onKeyUp = function() { KEY = Key.getCode(); trace("You released a key."+KEY); this[KEY] = false; }; Key.addListener(myListener);
but I can't understand this technobabble and everytime I try to work it, it only puts error outputs.
View 7 Replies
Jan 15, 2010
How can I differentiate between these two actions in AS3? I'm working on a side-scroller,and I want to require the "attack" button to be pressed for each successive attackCurrently you can continuously attack by holding down the attack key. I'm using a standard event listener, i.e.
ActionScript Code:
private function keyDownFunc(event:KeyboardEvent)
{
[code]....
View 1 Replies
May 22, 2010
I have a mc which is a square. I want to make a grid with it. Everybody knows how a grid looks like. Heres the main issue: I want to have a full control over each single element of the grid. I want to put them all in a 2d array, so I can access them by giving a row and a column number, e.g, so as to remove a specific mc, Id write: container.removeChild[_myArray[i][j], where i and j stand for the row and the column.This is how my current method for creating the grid look like:
ActionScript Code:
private function drawGrid():void
{
var startX:uint = 0;
[code]...
It does draw a grid, but I dont have a power over it. And even if I do, I cant see any way of accessing a specific box.
View 3 Replies
Feb 1, 2010
I've created a textfield which I want to hold the time that is left of a flv being played. I also created a timer which will see to it that it gets updated.
Here is the code:
"import flash.utils.Timer;
import flash.events.TimerEvent;
var myTimer:Timer = new Timer(1000);
myTimer.addEventListener(TimerEvent.TIMER,updateCo untdown);
[Code]...
However, when i try to compile i get this error message: "1067: Implicit coercion of a value of type Number to an unrelated type String.
View 1 Replies
Apr 9, 2009
I have separated the background info on the "WHY", from the "WHAT" so that people can give me feedback on my question directly, but if they require more information, they can read my background info to understand the purpose of what I am doing.
======================================================
Background Info (the WHY):
======================================================
I am working with an actionscript structure as follows:On a specific frame exists a controlling function or "node". It contains a user defined array of "branches" or sub functions. These sub functions(branches) are of a user-defined class which can hold other code. Other programmers will be using this structure. When they work with it, they will be dynamiclly adding new "Branches" which the node will then run in whatever way they specify. I am coding the node, and creating the different execution options that the other programmers will be able to use.
One of these types of executions is for the node to LOOP through the branches (however many there may be) waiting for either a key press or a mouse click. On either input it should exit the node and continue on to the rest of the frame, and then the rest of the program.
My original structure is based on user defined Event Listeners and Dispatchers. Upon Entering the node I begin by defining:
addEventListener("BranchComplete",nextBranch); addEventListener("RepeatDone",runComplete);
runComplete executes when the node has finished, nextBranch is fired after each branch has successfully finished.
I originally fired off:
dispatchEvent(new Event("BranchComplete"));
as the last line of the Branch executing function. The problem with this was, the function "nextBranch" does not return until all that it has called/triggered has finished. "nextBranch" ends up being called recursively by the EventListener. This causes a stack overflow.
I then changed the code, by moving the 'dispatchEvent' command into the same function that added the EventListeners. This ensures the function "nextBranch" has finished and returned before the EventListener triggers it again. This prevents the recursion and the stack overflow, but creates a new problem: The 'DispatchEvent' only occurs once, as after the second time through the branch, it returns and continues on the line after the dispatch.
In order to get around this, i placed the dispatchEvent inside a do...While loop, that tracks a variable that is only set to false when the user gives Mouse or Keyboard input. Voila, problem solved, code loops forever while calling "nextBranch" and triggering "BranchComplete" events as they complete. The only problem is, user input doesnt seem to be caught, due to the infinitely repeating while loop.
To test that it does in fact work correctly, i set the While Condition to automatically turn false after 1000 iterations. This works perfectly, and exits after 1000 branches have executed, all triggered by the Dispatched events. So, I want it to loop through my Branches until Key press or Mouse click. It appears that during a while loop, Keyboard and Mouse Listeners will not trigger. Is this true, and what is the best solution for holding in a loop while waiting for an event listener to trigger?
View 5 Replies
Jul 31, 2011
I want to create flex/actionscript directory view for my files with php/mysql. I have some ideas that I want to share:
1)I am thinking of creating table (in mysql) "files" and another table "folders", when user loges in i will require all data from "files" and "folders" where Username = 'something'. But the problem is, I will create a lot of entries inside of tables. For example if I will have 100 users, and each user could create 100 entries (files or folders) it means that i will get 10000 entries inside table.
2)My second idea, and I think more safe way of doing it is creating table "users" where will be set id, username, password, ... , files, folders. In files (text format entry) will be listed information about files, and they will be dividend by "*" symbol like this:
id*file name*size(in kbytes)*path*status
example:
15*test.exe*150*/root/*private
16*test2.exe*200*/root/folder1/*public
[Code]....
Now here is only 3 file info but there can be more than 1000.
View 2 Replies
Nov 3, 2009
Having a bunch of dynamically-created MC's, what is the best way to store custom variables for each MC?Do I just make a hidden textfield inside each MC to hold the data?For example I have MC's called:-Apple1-Apple2-Apple3-etc...And inside each MC I have a variable appleEaten = X.And eventually I could use the data in an IF statement like:
View 4 Replies
Jan 24, 2006
I'm working on a project where I have Multiple instances with the same actions.
Instead of typing out
btn1._visible = false;
btn2._visible = false;
btn3._visible = false;
btn4._visible = false;
Could I store these instances in an array so that I could minimize my code to something like:
btnArray._visible = false;
I've tried to do this but it seems to read the instances as strings instead.
View 11 Replies
Apr 26, 2006
I'm working on a ACAD flash system, and one of the functions is to draw lines. Now I'd like to be able to draw vertical/horizontal lines by holding a key down (i.e. Shift). But I'm finding that the system is detecting me releasing the mouse (I'm not) while I hold another key.
Attached is a .fla file where you can click and drag a box.
Don't worry about posting "oh you should use startDrag()" and whatnot. The architecture of the actual application makes such things not feasible. This is just a test .fla.
The code is here:
ActionScript Code:
on (press) {
this.onMouseMove = function() {
trace('Mouse is moving');
[Code]....
So yeah, as you run it and drag the object around, you see a lot of "Mouse is moving", but if you press and hold any key, you'll also notice the "Mouse released" as well.
View 3 Replies
Jun 22, 2010
Having a bunch of dynamically-created MC's, what is the best way to store custom variables for each MC? Do I just make a hidden textfield inside each MC to hold the data? For example I have MC's called:
[Code]...
And inside each MC I have a variable appleEaten = X. And eventually I could use the data in an IF statement like: if appleY.appleEaten == X then do something. What is the best method, or generally common way of doing this? Maybe I'm already doing it,
View 2 Replies
Oct 19, 2010
I need to have the user click on a button, and until another button is clicked, keep that button on the "Down" state.
View 2 Replies
Oct 5, 2008
Working on an important piece at present; I need to make theimage wihtin a holder_mc go fullScreen, not the whole interface.Heres my code thus far:
masker.addEventListener(MouseEvent.CLICK, fullScreen);
function fullScreen(MouseEvent):void
{
[code].....
View 8 Replies