ActionScript 3.0 :: Disable Swf Based On Cookie
Mar 17, 2011
I 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.
View 3 Replies
Similar Posts:
Jul 6, 2011
As the title indicates the question is in regards to the service layer of a flex application. Specifically in a test case class. To call the services the user must first authenticate through an html/CF based page. Once that's done and the authentication has occurred the user is directed to the html page with the flex application embedded in. Once authenticated the server side CF code writes a cookie to the users computer. This cookie is then read by the flex app and is required for the flex app to make calls to the CF services.
The question is: how should this be handled in a test case class for the service class in the flex app? The following steps need to basically take place: use some account data to hit the server and authenticate, the cookie then needs to be written (which it will already), then the test case needs to pick up the session id from the cookie and pass it to the service call within the test case. That just all seems like too much for a test case class.
So, how is this type of thing usually handled. From what I gather it's typical for web service calls to require a session id like this.
View 1 Replies
May 3, 2011
I've got a web site up and running that allows the user to choose a dark or light color scheme
But on the project detail pages, there are Flash videos that also change slightly based on which color scheme is selected.
[URL]
If you start playing the video, and change color schemes, the flash player will change to the right color, but on refreshing, it doesn't remember that change. How do I modify to code below so that the Flash player reads the correct color scheme and takes action?
Pertinant code is here (full JS file is here: http://www.centerline.net/lib/js/site-unmin.js):
//Switches color of Flash Video player on detail pages
function updateColor(color) {
[Code].....
View 1 Replies
Sep 20, 2011
this is insanely annoying problem: AS3 full screen application based on ADOBE FLEX 4, text field. User types something in text field, and then starts clicking backspace many many times to remove what he just wrote, and for some reason, instead of removing characters from text field it tells browser to GO BACK and user navigates away.
View 2 Replies
May 18, 2010
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].....
View 1 Replies
Dec 12, 2009
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?
View 2 Replies
Aug 9, 2010
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 Replies
Dec 15, 2011
I 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?
View 2 Replies
Jan 9, 2011
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 Replies
Mar 15, 2011
Long 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.
View 0 Replies
Mar 5, 2009
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 Replies
May 13, 2009
How can I retrieve a session cookie inside Flash ? ($_SESSION['member'])
(I am using Flash 8 and ActionScript 2.0)
View 3 Replies
Aug 30, 2009
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...
View 1 Replies
Feb 22, 2010
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 Replies
Aug 1, 2011
Is it possible to pass a cookie with a url call?
View 3 Replies
May 31, 2010
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 Replies
Jul 25, 2010
How can I distinguish different users with actionscript, or is that possible?
View 1 Replies
Oct 27, 2010
We 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.
View 1 Replies
Dec 6, 2010
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 Replies
Dec 12, 2010
i 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]...
View 1 Replies
Jul 10, 2011
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.
View 1 Replies
Aug 29, 2011
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 Replies
May 6, 2010
I 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 Replies
Mar 18, 2011
I'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 Replies
Mar 10, 2012
I 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)");
}
View 0 Replies
Jan 18, 2006
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 Replies
May 13, 2009
How can I retrieve a session cookie inside Flash ?
($_SESSION['member'])
(I am using Flash 8 and ActionScript 2.0)
View 2 Replies
Feb 19, 2009
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
May 7, 2010
I've got a page that has a flash banner on it with a small animation. In fact, I've got four versions of this banner, and I'd like to be able to load a different version each time someone visits the site. Can someone please help this rank amateur devise a script that will allow me to do this? It has four different .swf files, and I need to load them such that the same person doesn't see the same .swf file on consecutive visits. Normally, I'd do this with cookies, but I just don't see how to get it done with Flash CS5 and/or Actionscript 3.
View 3 Replies
Nov 16, 2010
I have a very simple php script that I'm using to check and set a cookie. I'm running this script from a Flash file, but it's not working properly. If I enter the direct URL to the php file in my browser, it works perfectly. However, if I access it through Flash it doesn't seem to recognise that the cookie has been set.
Here is my php code:
<?
$expiry = date("U", mktime(0, 0, 0, date("m"), date("d") + 1, date("y")));
[code]......
View 3 Replies