ActionScript 3.0 :: Passing A Cookie With URL Call?
Aug 1, 2011Is it possible to pass a cookie with a url call?
View 3 RepliesIs it possible to pass a cookie with a url call?
View 3 RepliesI have a set of RESTful web services. These services are protected on a Glassfish server by OpenSSO. When I attempt to call the RESTful services directly from a browser, OpenSSO intercepts the request, then forwards the request to the REST service once the user's credentials are authenticated. OpenSSO utilizes a session cookie on subsequent requests (until the session is invalidated) . I'm sure this piece is working correctly.We'd like to call these services from a Flex client. In order to enable PUT and DELETE operations, we set up BlazeDS to proxy the RESTful requests from the flex client to the REST service. When security to the RESTful services is disabled, this piece works great.
Now we're trying to secure the entire application. We've placed the Flex SWF into a war and deploy to Glassfish. We've placed security around this resource and when a user attempts to download the SWF (through an HTML link in the war), OpenSSO intercepts the request, then forwards to the application on successful authorization (just like it does for the RESTful web services).The problem is - the RESTful calls made by the Flex application (via BlazeDS) are failing. OpenSSO seems to be intercepting these requests as well and again asking for the users credentials. It doesn't seem the authentication cookies are being passed to (or maybe by) the BlazeDS proxy.
I need to save email-id in my login form through the cookies. if I use shared object I am able to save but my requirement is need to save in cookies. How can I save? I got sample code from net. Attaching that code `package com {
import flash.external.ExternalInterface;
/**
* The Cookie class provides a simple way to create or access
* cookies in the embedding HTML document of the application.
[Code].....
I want to pass these two parameters to js function 'eventaction':
Code:
name: 'go'
params: {}
[code].....
Is there any way to pass an argument to a function being called by a ContextMenuItem?The effect I want would be what one might expect from this pseudocode:
Code:
var cm = new ContextMenuItem("Start Alt", set_row_style('start_alt_here'), separatorBefore=true, enabled=true, visible=true);
Which obviously doesn't work, or I wouldn't be asking.So far I've tried using the captions as a basis for a switch condition, which works.
Code:
function set_row_style(obj, cm) {
switch (cm.caption) {
case 'start_alt_here' :
...
But I'd rather not use an arbitrary string as part of a function.The only other option I see is using a listener for each ContextMenuItem, then calling the function with its arguments from there.Is there any more direct a way to pass an argument to a function from a ContextMenuItem?
have an xml doc that is being import into an AS3 file and then with .htmlText, appending it to a movie clip. An example of what this looks like is:
<abstract><![CDATA[<p><strong>AEO Times Square</strong> Store Wins Prestigious SEGD Merit Award for Dynamic Environments <a href='event:OpenArticle1'>View Article</a></p>]]></abstract>
What I'd like to have happen is when I click that view article link that I can call a function passing in "OpenArticle1".
i have some actionscript that makes a
ExternalInterface.call('someFunction');
call.is it possible to reference the html object that made the call to someFunction directly using the ExternalInterface.call call?
Assume that the object that makes the call also has some Callbacks (via ExternalInterface.addCallback) that are accessible via javascript.
Currently:
Actionscript source
ExternalInterface.call("someFunction");
ExternalInterface.addCallback("someCallback",someASfunction);
[code]....
I'm developing a video player using WPF and AxShockwaveFlash.
It has following steps:
find video from a web service. it acquires information of each video. pass video information to AxShockwaveFlash and embedded flash video player. embedded flash video player starts streaming download from web service.
I have a problem on step 4. Step 1-3 shares a cookie (CookieContainer), but step 4 can not. How can I pass its cookie to embedded flash video player?
I made a blog widget in flex. I need manipulate cookie in my widget which is added to my user's blog. But under some circumstance, some blog hosts forbid accessing to javascript, so i can not access cookie in flex by externalInterface. Does anyone know how to access cookie in this context?
View 3 RepliesI have a question that I cant quite start.I have a web site that record some cookies: name, age, sex, etc.
I would like to know if it is possible to create a flash banner that display this information, like: hello [name], how are you doing today?
I was searching online and everything that I found needs something outside flash to work.
Is that a way to create a flash that can read cookie's values and show then?
I already tested SharedObject class in native actionscript trying to get the arbitrary name of cookie from local system but it doesn't work.For your information, I am working with cookie returned from user's browsing sites (not my own sites). That's is to get some cookie values resulting from browsing of site A from user in order to work with my own application.
View 0 RepliesLong time leecher, decided to join in and ask a question. I have a video auto play on a site i am working on [URL].. Issue is, it auto plays every time the page loads...
Is there a way for me to set a cookie that flash could look for and either choose a welcome back video or not auto play video?
EDIT: SharedObject is awesome. Ignore this i did it.
I have developed a flash application with .NET. That application is something like image cropping. That is user can upload any image from anywhere. after he cropped that image we save that particular cropped image in .NET. The problem is the cookie set into the Temporary internet files. That is If I have uploaded a image for cropping then I have to save that cropped image. Once again I have upload the new image for cropping. But in flash that new uploaded image file is not displays. It always displays the image file which I was uploaded at first time. This was occurred in both IE & Firefox browsers.
View 1 RepliesHow can I retrieve a session cookie inside Flash ? ($_SESSION['member'])
(I am using Flash 8 and ActionScript 2.0)
I have been at this for 5 hours and I'm about to pull all my hair out.I have a seemingly very simple problem that I can NOT find any reason for why it's happening.I built a simple flash doc that has three distinct pieces in it (2 frames):
1) A FLVplayback component on frame 1 - (working)
2) An AS listener that checks for end of Video and progresses to 2nd frame - (working)
3) a cookie script that checks to see if the video has been played and if it has skips frame 1 and goes to frame 2 (also working)
The video successfully plays the first time and moves to the 2nd frame. But, when the document is reloaded it checks the cookie (finds it) skips the 1st frame, moves to the 2nd BUT it does NOT display ANY of the elements in the 2nd frame. NOTHING!! There is a simple graphic and button that allows the users to replay the video (by simply clearing the cookie and going back to Frame 1) but they do not show up. (However, they DO show up if the video plays first and moves to frame 2 via the listener, just not via the cookie).I have placed traces in each frame to show if it is indeed arriving on frame 2. It is, but NOTHING shows.I have rebuilt the FLA step by step testing each time and have found that it works perfectly, right up until the FLV Component is dropped in. Then it moves to the 2nd frame and shows NONE of the 2nd frame elements. URl...
I remember that in flash 8 you needed to read the cookie via php script to get it into flash. Has that changed in CS4? Is it possible to read the cookie directly from the swf now? If not how does one go about getting cookie information into flash CS4?
View 1 RepliesI have js all set up and tested to check for cookie. If cookie set I ant to disable the swf.
The code in my AS is as follows::
import fl.video.*;import fl.video.MetadataEvent;import flash.external.ExternalInterface;import flash.system.fscommand;//-----------------------------------------function
[Code]....
and have this in the init() called by page load it does not work. I was going to use the play variable to kill the loading of the swf but can't figure out how best to make that work.
So, my questions:
Best way to facilitate this action:
1. In AS by calling the function by:
a. Timeline
b. AS callback from <body onLoad
2. Using js to call the fucntion in the external js and then blocking loading of the swf in the html page.
I don't want to spend anymore time exploring alternatives as this is very frustrating. I am assuming that 1.b is the best route.
my login form in flex when I login I have created a cookie in jsp like this name setValueCookie.jsp [code]through the httpservice value i am getting but if i open a new window or any new tab cookie value is not getting how can i solve this?
View 1 RepliesHow can I distinguish different users with actionscript, or is that possible?
View 1 RepliesWe have a flash video that was created for our project, we dont the source so we have to work around the compiled flash file. We are going to host the video on our domain and the video creates a sol cookie (flash cookie) file to store how far the user has proceeded though the video. So my plan is to access this cookie to see how far the user has progressed and then fire an event when they have finished the movie.
I have been googling for some help but haven't found to much. I have found out that its possible to do in javascript and I have found some .net sol file viewers but haven't seen any examples I can get my mind around.
I have watched the traffic that gets created with fiddler and every time the next button is clicked a new request is fired with the swt file that is being accessed. I would also be happy with tracking every time one of these swt files has been accessed as well.
I'm hoping to get pointed in the right direction here. The problem I'm having is trying to figure out how to read an HTML created cookie in Flash. I have a video player that should autoplay once in a 24hour period, the next day it should autoplay again for the end-user.This is what the script on the HTML page looks like that displays the Flash player and the cookie:[code]I did some searching and found this Have a HTML page play Flash movie only once (not when revisited...) but again this is just a Flash function which never allows for a restart in a certain time period.how do I read that var x(cookie) in Flash?
View 3 Repliesi have a flash application connected with a script on a remote server(X)different from the server hosting the website(Y)the application on server X needs to get some user information so i need to identify the user by what i have in the cookie
remote server X will get those informations from server Y is there any way i can get the user name or user id from the CAKEPHP cookie var?the authentication is the one found on cakephp website
[flash]----request---->[server X]----request---->[server Y]----response---->[server Y]...
I use an application which uses flash cookie to store some important information. This information is critical and should not be deleted. But I have observed that the flash cookie or the shared local object is getting deleted under the following situations. When the local history(including cookies) are deleted by the browser. When flash is upgraded in the system.
This is adversely affecting my application. Please let me know, if there is a way to forcefully retain the 'shared local object' by placing some kind of lock on it. It will be better if this can done programmatically.
I am working to add a transparent flash video to a site of a person walking out. The problem is that I don't want the video to play every time the home page is loaded, so I set a 24hr cookie that if detected the div containing the video is set to hide. This works perfectly in Google Chrome and FF, the problem is in IE the div is apparently hidden because you cannot see the video but the audio of the video is still heard. Perhaps there is a different way to do this then the way I am going about it and maybe even a way to do a remove instead of hide?[code]...
View 1 RepliesI am trying to pass a cookie with multiple name/value pairs into flash and I would like to know if someone know how I can do this. I know that I need to pass the vars from the cookie to my Flash Params but I am not sure how I would do that, given that this is a multiple array cookie.
View 0 RepliesI'm working on a website based on flash. The first time you visit the site there will be asked to fill in your name (for example: George) and then you continue to the next 'page' in the flash. The next time you visit the site, i want that the site automaticly forwards to the last page, and there is a text 'hi, *name*' (hi, George)
View 1 RepliesI want to write a Flash application which need to access my browser(Internet Explorer)cookie. My program work well in all browser except Internet Explorer. This is part of my code:
Quote:
function test()
{
ExternalInterface.call("eval","alert(document.cook ie)");
}
I've just started out working with cookies in flash and looked at the poms tutorials [URL]Is there a list of commands that could get the users browser software etc for example?
View 2 RepliesHow can I retrieve a session cookie inside Flash ?
($_SESSION['member'])
(I am using Flash 8 and ActionScript 2.0)
How do you transfer a cookie from another website in flash? I am trying to figure it out and I keep running into brick wall. I am using cs1 and cs3.
View 1 Replies