How To Handle PHP-Sessions With Flash
A problem many should have run into already but which to I can´t really find an easy solution.
I have a site with login tracking users via sessions, all written in php, buzzword: "session_start()". As far as I know, the tracking is done via a cookie or, if cookies are disabled, via SID in the URL.
My question is thus, is there a way for flash also to use this to keep track of the user, or in other words, how can I use cookies to tell flash who has logged in and is navigating my site.
I stumbled upon several things that seemed either insecure, inappropriate or way too complicated like ".swf?SID=<mySID>", ExternalInterface, URLRequest and manageCookies...
Maybe someone can point me to the right direction.
Thanks a lot!
FlashKit > Flash Help > Actionscript 3.0
Posted on: 11-14-2007, 10:53 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
ASP SESSIONS W/ Flash
Does anyone have an example or tutorial of how to call a variable from an asp session into a flash button?
Please help i've looked every where I can think of.
Thank you,
Quince Wyss
quince@quincewyss.com
Using Sessions With Flash?
Is there anyway to use PHP sessions with flash, in order to preserve the variables in a flash movie when it reloads with the page???
i have a flash mp3 player i built on a php page.
The problem is that when i go to another page on the site, the flash
mp3 player is reloaded and the music stops.
if you have any ideas (and i don't want to build the page in frames, or put the flash player on another window)
Using Sessions With Flash?
Is there anyway to use PHP sessions with flash, in order to preserve the variables in a flash movie when it reloads with the page???
i have a flash mp3 player i built on a php page.
The problem is that when i go to another page on the site, the flash
mp3 player is reloaded and the music stops.
if you have any ideas (and i don't want to build the page in frames, or put the flash player on another window)
Flash And Sessions
Hi
I am developing a backend in Java and using Flash as the front end. The Flash application requires that the user logs in. To do this I get the session info and store it in the flash and pass is back as JSESSIONID=xxxxx to each url that is loaded. THis works fine in a browser window. Howe if I need to debug in the FLASH ide this doesn't workas the browser seems to ignore the session info being passed.
Is there a way to get around this?
Benon
Sessions In Flash
Hi,
I am developing a flash presentation which has different areas. I will be uploading that on Web and want to know that how many users are on any area. Or say i want to create a monthly report and would like to know which area is liked most.
I think this can be done by sessions. I did these types of reports in PHP, ASP earlier but don't know how to do that in Flash MX2004.
Any ideas would be helpful.. I think there is something called session array in Flash MX but no use of that as i can't get any info abt that anywhere on web.
Thanks in advance for all your help.
Regards
PHP Sessions W/ FLASH
Please, I'm sure someone has tried to tackle this, how can I set up so that PHP can maintain sessionsIDs when the user is seeing a flash front end? If I can't truly use sessions variables, then can I atleast simulate them in some way? Please any help or workarounds for this.
PHP Sessions W/ FLASH
Please, I'm sure someone has tried to tackle this, how can I set up so that PHP can maintain sessionsIDs when the user is seeing a flash front end? If I can't truly use sessions variables, then can I atleast simulate them in some way? Please any help or workarounds for this.
Flash, PHP & Sessions
I'm working on a site that will include a members section, which in order to reach, the user must create an account and log in. The general section of the site is HTML, however the Member's section is all Flash. I am familiar with PHP & Sessions, but can not figure out how to use Sessions in conjunture with Flash. I've been unable to find any tutorials or help searching online. If anyone knows of any good tutorials or can point me in the right direction I would greatly appreciate it.
Flash, Php And Sessions
hey guys, for example, im processing a large image using bitmap data, extracting colors for its every pixel, now the resulting string would be very long (even with rle encoding),
can i somehow pass this data to php, through certain intervals, and just use sessions to keep the already passed data?
ASP Sessions And Flash
Hi. I am in the process of building a Flash website. The static elements of the site are built and running smoothly.
I intend - but have not yet done - to allow the users to logon to the site. All user credentials are stored in a SQL Server database which the SWF file must query. I think i might know how to do this. I haven't done it yet, but i suspect the answer is to create an ASP page that does the querying, then pass the results (success or fail) back to flash.
However, whilst this will work (i am sure) what happens if the user refreshes their page? the variable that states they have logged on, will be reset right? Thinking about it a bit more deeply, I suspect the way to do this is to have the ASP page write a session cookie. Which brings me onto my question. How can i make Flash see session cookies? I could have ASP read the session cookie, and pass that back to Flash, but because different users have different privilages, that would mean making confidential information (username etc), visible in the code. Or would it?
Does anyone have any advise/ideas, or a good tutorial to do what is is i need? I have spent so much time working out the specifics, that i am now so confused, i don't really know where to start.
Thanks
Scrollbar Handle Won't Release When Mouse Is Off The Handle
Hi Everyone,
I am having a problem in that my scrollbar is working but when I try leave it, it still thinks that it is attached to scrollbar handle. How can I make sure that it detaches itself.
I have now tried the this:
PHP Code:
on (press) {
startDrag (_root.i_about_mc.slider, false, _root.i_about_mc.path._x, _root.i_about_mc.path._y+210, _root.i_about_mc.path._x, _root.i_about_mc.path._y);
}
on (release) {
stopDrag();
}
//just added this but had no success
on (rollOut) {
stopDrag();
}
Thanks...
Flash Vars To Php In Sessions
Hi
I am building a flash5 + PHP site with interactive clothing design functions, i need to transfer the vars to a php to list selections on a html page (printable) at which stage the user can - ADD another item(back to flash movie @ start) - EDIT each item(back to flash movie with all selections put back into place(if /else if - tell targets) - confirmed(send email with all items listed).
I have started the code but I really need a simple way to:
( in flash5 )
- send vars and go ( i think - getURL + POST )
- recieve vars back in ( i think - loadVariablesNum + POST )
( in php )
- stay in session
- identify ids of new item/s added - same or similar vars each time
Any help would be most appreciated!!!
Using Flash To Load Vnc Sessions
Hello everyone
Ok i use a program called vnc to access other users terminals. i need to have a flash page so that i can type in text into a text box, then click on a button to launch the vnc program with the text specified as the host terminal to connect to.
Please can anyone help me
Nick
Flash With Asp >> Tracking Sessions
I have a set of buttons I created in flash and want to use them on a clients webstore. This store is using asp and in the url it tracks the session/shopper with a unique ID. When I link to different pages of the store I use the following string to keep the session intact:
ww.aaa.com/stores_app/store.asp?url_string&page_id=11
the url_string is a variable that tracks the shopper id and the store id..this is what the url looks like when it resolves the page
ww.aaa.com/stores_app/store.asp?store_id=144&Shopper_ID=8031120592480&pa ge_id=11
In flash i am using the getURL action one of the buttons to test it but have had no luck...the session is broken.
here is the action :
on (release) {
getURL("register.asp?url_string&page_id=11", "_blank", "GET");
}
I have aslo tried to use POST but no changes...I have read up on this at a few sites and some say to use LoadVariablesNUM instead of getURL but it looks like they need to declare some variables before the action...can you tell what i am missing by looking at this?
[CS3] Passing .asp Sessions To Flash
Hi everyone...
Just out of interest - is this possible...
I have a flash login form sitting on a .asp page
What i have is when the user enters the wrong password, the user goes back to the same login page with an error message and has to re-enter their email address and password.
What i'd like is to pass the asp session to flash so that the email address which the user entered is still there on the page, and so all they have to do is re-enter their password.
Is this possible at all?
Thanks in advance!
Does Flash Destroy PHP Sessions?
I think I need to ask it more simply....my other post was confusing. Does Flash destroy PHP sessions right away? I'm having Flash and PHP Session issues...the session seems to be getting destroyed quickly after its made. Any ideas?
Flash Php - Sessions? Advice Please
Hey all,
Ok, I'm making a flash quiz type thing. I want the user just to type in a username (no password protection etc) and then to do the quiz. The username and the users' answers to each question should be stored in a database so they can later be retrieved and emailed to me.
I'm going to use php and mysql, I'm ok with passing all the data back and forth. My question is, do I need to worry about sessions? around 70 people will be doing the quiz at the same time, so I need to make sure the answers sent to the db at each stage are inserted against the correct user. I think using sessions is the best way to do this but I don't know much about them and especially how to use them with flash.
If someone could explain basically how it would all work, and/or point me in the direction of a simple tutorial it would be very much appreciated!
Thanks
PHP Sessions With Flash Buttons?
I have an ecommerce website that is mainly php. I have a cool nav bar with flash animations I would like to use, but I don't know how to script my movies for php sessions. Is this even possible?
Leaving And Re-entering Flash Sessions
Hi, I see on some flash app web sites, they prompt the user to verify their intent on leaving the flash app before it leaves. Any ideas on how this can be accomplished?
To be more complete, I would also like to save some of the current states before the flash app leaves and re-load them when the user re-enters the flash app? I was thinking about saving the current states on the server under the user's ip address so that when they return I would know where to find the state file. Does anyone know if I can directly obtain the ip address from within actionscript?
Flash CDROM & Saved Sessions?
Hi All,
I'm looking into whether we might use Flash to create an interactive CDRom on HIV/AIDS for distribution throughout Viet Nam.
One of the requirements is that users be able to customize their use of the CD with things like an avatar, and that they be able to be recognized and continue previous sessions if they need to leave and come back to it.
This would require I presume storing this sort of session info on the users' hard drive.
Is this something that one can accomplish using Flash?
Thanks in advance for any advice,
Ben
www.pathfind.org
Flash CDROM Sessions Saved/Continued?
Hi All,
I'm looking into whether we might use Flash to create an interactive CDRom on HIV/AIDS for distribution throughout Viet Nam.
One of the requirements is that users be able to customize their use of the CD with things like an avatar, and that they be able to be recognized and continue previous sessions if they need to leave and come back to it.
This would require I presume storing this sort of session info on the users' hard drive.
Is this something that one can accomplish using Flash?
Thanks in advance for any advice,
:)Ben
www.pathfind.org
Flash Remoting + PHP : Authentication? ( Sessions - AMFPHP )
hi there,
I'm using Flash Remoting + AMFPHP + PHP.
I need to login users... which is normally done in PHP buy using sessions (which use cookies). The problem is that with Flash I don't have any cookies! I imagine this is a common problem... here are 3 of the solutions I can think of.
- Forget all about cookies and use Flash Remoting setCredentials() authentication. However I don't feel like storing real username - passwords on the client side and having them posted and validated with every remote request.
- Forget all about cookies and use setCredentials(), but this time with the username and a hash (calculated at login time). The hash can then be matched against the username by a simple function on the server side and validated this way. The hash could be seeded with some variable parameter... like the date for example, which would make a login valid only for one day.
I really like this idea hehe, sounds great...
Don't forget that you read it here first
- Use the setCredentials() to pass the session_id and restore the session in the server side with PHP.... but how can I restore a session by manually entering a session_id?? And... if I already have a stateful client with flash, why the heck would I use server side sessions....
Any comments and ideas more than welcome!
Can I Handle Textboxes Like I Handle An Array?
Hi everyone!!!
I'm a C++ programmer, and I like arrays very much, so, my question is very simple, can I handle textboxes (it includes input and output of values inside the code) like I handle an array?
Thanx!!!
Alejandro
Help Me Handle XML Into Flash
I am trying to make a flash catalog that loads data via XML... taking it step by step as I am a newbie.
So, if you guys can help me out with the codes and help me understand, thatd be great...
I have attached a draft picture of what a catalog page would look like. Now, there will be several pages, but for now, I would like to at least figure out how to load that data with 1 page, for a start!
I have an empty movie clip to diplay a jpg, 3 dynamic text fields to display the name of the product, description and some external HTML-formatted text.
I also have three buttons (b1, b2, b3) that are supposed to load a different HTML text each.
Also, when the page is displayed, I would like the html txt attached to b1 to be displayed.
First thing first, I have come up with an XML file, which code is below:
Quote:
<catalog>
<item>
<name>Product 1</name>
<description>Description goes here</description>
<HTMLtxt>
<txtfile href="txt1.html"/>
<txtfile href="txt2.html"/>
<txtfile href="txt3.html"/>
</HTMLtxt>
<image>photo.jpg</image>
</item>
</catalog>
I don't know if there is a better way to arrange my items of information, but it looks pretty clear to me?
Then for my actionscript... er, I followed a couple of tutorials, understood how to proceed then, but I don't know how to adapt what I learned to my needs. So this is where your help is most crucial! LOL
I guess I should put the mere start of a script that I have below:
ActionScript Code:
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoaded);
var xml:XML;
function onLoaded(e:Event):void
{
xml = new XML(e.target.data);
}
loader.load(new URLRequest("catalog.xml"))
Handle Gradients In Flash
what if want a square, with a gradient from blue to white, starting from the upper left corner?
i can do this with fireworks, corel, photoshop, freehand..........how do i do this with flash (MX or 5)?
How Much Video Can Flash Really Handle?
I'm creating projector files in MX 6.0 for an interactive CD project. Many of the swfs that are called onto level 1 of a basic template with loadMovie actions contain embedded video clips of 8 - 25 seconds. For the entire CD, there will be probably be a total of 25 video clips loaded from the various swfs.
I know that Director is much better suited for this purpose than Flash, however the learning curve to learn Director from scratch, plus the fact that you need two versions to do both Mac and PC versions is a major deterrent. My question is can Flash MX 6 projectors handle this kind/amount of content? Opinions?
Thanks.
Handle All Clicks From Flash
Hi,
I'm looking for a flash that will load other movies (.swf on the same site)
but I want to make sure I control the clicks by myself.
let's say I have container.swf that loads sub.swf,
I don't have the source code of sub.swf,
I want all clicks to go to counter.php (even if there are other buttons in sub.swf)
loadMovie(...) and
_root.onMouseDown=function(){
//_root is a reference to the main timeline
getURL("...")
but here is the thing, if there's a button in the sub movie, it still goes to the button location ...
any idea ?
thanks in advance
Complexity In Flash - What Can It Handle?
This sort of a follow up to an older question I had: Does anyone have examples of some really complex, meaning visually intensive and taxing on the processor, examples in Flash for me to look at? Or good tutorials on memory management?
I'm going to start work on an interface that will involve displaying 90 thumbnails at once (maybe even as high as 180!); and a lot of tweening of these depending on user actions. I have a feeling that this may be extremely hard on processors. I'm at the initial stages of designing this and I'm trying to think ahead, any advice on speed issues in displaying a huge quantity of visuals at once would be so helpful!!
Thanks!
The Gradient Handle In Flash MX
I did a search, but I'm probably just not using the right search terms.
When I select the gradient handle, sometimes it seems to inexplicably take up almost half of the page. How can I fix this?
Handle Tabs In Flash Using XML
Hello,
I have a flash template in which i want to create my menus using tab system and iwant to take text from XML so i want to handle this but each time i want to keep my header part where my menus are kept will same mean they will never change but according to clicking on menu the particulat menu will become active tab and rest will inactive.
So please help me.
Flash 7 - How Do I Handle Prototypes?
I have set up a couple of prototypes to handle programatic control of movie clip animation. I am in a position where I need to publish to Flash 7. The prototype code no longer works when I publish up. Some of my 'other' prototype code works in Flash 7 but not the following:
ActionScript Code:
Movieclip.prototype.elasticMoveY = function(targety, accely, converty) {
stepy = (stepy*accely)+(targety-this._y)*converty;
this._y += stepy;
};
Movieclip.prototype.elasticMoveX = function(targetx, accelx, convertx) {
stepx = (stepx*accelx)+(targetx-this._x)*convertx;
this._x += stepx;
};
Any suggestions?
cheers,
scott
How Do I Handle An Enormous Flash Site?
I am building a large site for a prof. at the University of Denver. It's a "Birth of Rock" site (as a core music history class). The professor recently decided he would rather have the site built in Flash rather than html...the trouble is he has chosen, for content, about 200 mp3s and 40 video clips (both the video and the mp3 average around 3 minutes). All together, it was a gigabyte of content, though I have had success in reducing the 500MB of mp3 down to 220MB with not much loss in quality. (God bless mpeg.) I'm still working on the video. (Any tips there would be appreciated....)
But anyway, here's the real issue. The professor wants there to be an individual "page" for each artist featured on the site (approx. 150). He won't reduce the level of content, either.
Please help! Is there a way I can script the pages to dynamically insert a photo and links to movie clips and songs? I feel that there has to be a better way of doing this than splitting up my timeline 150 times or building 150 swfs that load and unload from the main site. And how about playing that many mp3s from within Flash? Can scripting help....or do I have a whole lot of gruntwork ahead of me? (I do not have any co-workers on this, I am flying solo, and they want this as soon as possible---like, in two weeks.) Am I crazy or just ambitious...
Help How Does Flash 5 Handle Streaming And Compression?
I'm Kind of new to flash and wondering how flash 5 handles compression and streaming. I have looked through several books and websites but I haven't found a lot of useful information.
Most of the flash work I have done so far was targeted at broadband users so size wasn't a real big deal as long as I had a decent preloader. Now I have a client who wants an image gallery with several large images done in flash. The target is 28.8-56K modem users and the images are pushing my file up around 900+ K way too big for any modem user to wait for.
I'm looking for any tips on flash 5 compression. Should I use an image compression program like Adobe ImageReady or let flash handle it? Also what kind of theory is there behind streaming in flash? How does flash load things in the background while playing another and what loads when?
Any tips/tricks or just general information would be helpful.
Thanks in advance for any help
Bryce
How Many Type Faces Can Flash Handle?
I have a client who wants to use loads of font faces maybe even up to 700 different ones.
I have never seen this many fonts in a Flash movie, but then again I have not heard anything about any limits to how many fonts a flash movie can have.
Does anybody have any experiences with huge amounts of fonts in flash movies??
thanks in advance
Flash Player 6 Can't Handle Sound. Help
Whenever I try to play a movie that includes sound, my player just locks up. I go to macromedia.com to install the latest player, but nothing happens, because I already have the latest player.
The player is running in IE 6.0.2 on Windows 2000 Professional. It doesn't matter whether I am viewing movies over the Web, or my own movies stored locally on my machine, I have the same issue.
Anyone know why this is happening???
How Much Video Can Flash Projectors Really Handle?
I'm creating projector files in MX 6.0 for an interactive CD project. Many of the swfs that are called onto level 1 of a basic template with loadMovie actions contain embedded video clips of 8 - 25 seconds. For the entire CD, there will be probably be a total of 25 video clips loaded from the various swfs.
I know that Director is much better suited for this purpose than Flash, however the learning curve to learn Director from scratch, plus the fact that you need two versions to do both Mac and PC versions is a major deterrent. My question is can Flash MX 6 projectors handle this kind/amount of content? Opinions?
Thanks.
How To Handle 'HTTP Cookies' In Flash
Hi All,
Is there any way to handle the server returned 'Http Cookies' in Flash using AS1 ?
Now, my scenario is like this, I have a flash movie (AS1) where I am calling some URL as...
loadVariables("http://servrename.subdomain.someJavaApp","handler_mc,"POS T" ;
I wrote the onClipEvent(data) method for the 'handler_mc' where in which I am just trying to trace the server response.
As the referred 'http://servrename.subdomain.someJavaApp' server application returns some 'Persitent HTTP Cookie',
the onClipEvent(data) handler method is invoking but its not able to trace any response. Is that HTTP Cookie an object ?
if so, how to handle that in flash ? any ideas / thoughts welcome please.
Have a nice time,
Pandu
Netscape 4.7 Does Not Handle Flash Player 7.0.19
I created a Flash file in Flash MX, exported it as Flash 6. I created a sniffer, exported in Flash 6. Here is the code:
with (_root) { // v 5.0 or higher
a = getVersion();
a = String(a);
s = a.charAt(4);
if (a.charAt(4)>5) {
getURL("flash.htm");
stop();
} else {
getURL("noflash.htm");
stop();
}
}
Here is the page: http://users.adelphia.net/~paruby/arts/
The code is placed in my index.htm page. Also on that page is the following to redirect if Flash is not found at all:
<meta http-equiv="refresh" content="5;URL=noflash.htm">
IE 6 works fine. Netscape 4.7 on the other hand... (Macromedia does state that the plugin will run on Netscape 4.7) First, it loads index.htm, then the page goes blank, then redirects to noflash.htm. So I went and installed the v7 r19 Flash player. Netscape still does the same thing. In the plugin's page, it lists the correct version. Also, if i just load the flash.htm page, the SWF plays fine.
So here are my questions:
1. Why does Netscape give me a blank page before it redirects to noflash.htm?
2. Why doesn't Netscape redirect to flash.htm when it should??
Thanx,
Pete
Too Complex Flash Game To Handle
I`m making a flash based game with my friend and in that game you can make your own levels. Of course there are a single player mode witch has 10 missions. There are multiplayer mode too. Everything is password secured.
But we can do everything I just said but should I write down everything before starting. I mean it will be very large flash game so I need to think about everything before starting.
How could I start? Should I write down everything what is happening in the game? Please! Tips and tricks could be useful now!
How Many HitTests The Flash Player Can Handle
I want to know...how many hitTests the flash player can handle
I mean, in each frame,so that this amount dont make him loose performance
I am trying to make a file to test it, but i dont know if i am doing rigth
in the test movieClip it goes:
this.onPress = function(){
numberOfHits += 1;
}
this.onEnterFrame = function(){
for(a=1;a<=numberOfHits;a++){
this.hitTest(2,3,true);
}
}
Just want to make sure if this way can show some real result...
Flash CMS Help Needed To Handle The Bugs
Hi, I'm working on a flash CMS.
It works by now but still has some bugs.
It's a flash html editor that loads and saves to plain .html files. The .html files can be read by a flash site and google also.
Some bugs are:
f.e. some times buggy image support. , HTML saving does not always work perfect. (getHTML issue with parsing links), google optimizing could be better,
some text editing bugs,...
Are their any good AS programmers voluntaring to help me out?
I will make this commercial later, and willing to participate in the profit of it.
If you think your AS skills are not so good, please don't react. I still had lots of people looking at it, but never capable of doing things better than me.
And I'm a louzy programmer :-)
Please leave a message or contact me of you're interrested.
How Does Flash Handle Movieclip Width?
This is more a general question than a problem I'm having. I have two movie clips. One of the movie clips is set to stay beside the other (clip2._x = clip1._x + clip1._width/2 + clip2._width/2). The code works and keeps clip 2 right beside clip 1. I tweened the width of clip 1 on the timeline and it still worked fine, clip 2 stayed right beside clip 1.
Where I started running into problems is when I tweened the width of clip 1 from inside clip 1 and not from the main timeline (I converted the object inside clip 1 to a graphic so I was still using a motion tween and not a shape tween). Clip 2 still moved with clip 1, but it no longer stayed right beside it, there was now a big gap between the two. I eventually fixed it by subtracting an arbitrary number from the end of the equation. I got the number by simple trial and error; I just kept increasing it until the boxes touched.
My question is simply, why did the width value change depending on whether the movie clip was bieng tweened on the main timeline or from inside the clip?
How To Detect / Handle Flash Disabled?
I am working on a site with a couple of small Flash animations.
I provide static images by default. If there’s Javascript and the right Flash version (using Geoff Stearns detection code), I clear the static images and write out the appropriate object code.
This works great...unless Flash is disabled. Then, the static images get cleared but no Flash displays, leaving a nice empy area. Super.
So: Is there any means of detecting when the plug-in is present, but disabled or blocked? An example would be terrific.
I’m not trying to bypass the block, just stopping the Javascript from hiding the static images. I’m sing Flash MX 2004, files saved as v.6.
TaliaJ
How Best To Handle Large Flash Movie
Hi -
This is my first post to this forum. I am in the process of constructing a large continuous Flash animation with no interactivity (i.e., the experience will be more like watching video than Flash) - it will be about 1:30 - 2:00 minutes with lots of audio (music and voice over). My problem is that I'm crashing a lot. I'm hesitant to try calling up various SWFs in the process of playing the movie because it should play continuously and seamlessly once it begins. Is there a good (meaning fast and reliable) way to do a large project like this in several individual FLAs and then assemble them later?
BTW, I'm on a Mac. Thanks in advance for any advice.
|