ActionScript 2.0 :: Use To Detect When Flash Is Not Being Interacted With?
Jan 9, 2012
I am building a quiz for a touch screen. What code would I use to detect when the Flash is not being interacted with? So basically it times out and goes back to the beginning of the movie after say 15 seconds.
I have a slideshow I've built that uses setInterval to pause at each image. At each paused keyframe, a short animation plays (the animation is contained within an object which only exists at the single keyframe). The problem I used to have was that after the first time around (all images shown), the slideshow begins increasing in speed (not pausing for the full duration), and eventually begins sparadically skipping pauses all-together. I rearranged the code, and fixed the speed-up/skipping problem, but now my advance and goBack buttons don't work right, and they cause skipping.
I'm trying to make buttons that involve a character pointing to indicate interaction.When a button is interacted with (mouse over or down) the character's arm points to that particular button. I separated his body, so that it remains constant on the main stage, no matter which button is being interacted with.The problem is, when the user is not mousing over or clicking down on any button, the character has no arms (since only his body remains constant)!How do I resolve this?The only thing I thought of so far is if there's any way to create an up button state that includes the arm (right now I have nothing for mouse up) THAT ENDS when the next button is interacted with. Is that possible? If I put the arm in the up state (in addition to mouse over and down) it stays when the interaction is over, which poses a problem when the user interacts with the next button (the character ends up with double the arms since each button introduces a different set of arms pointing towards that particular button).
I'm wondering wether there's a Javascript way to detect wether a user has any sort of flash blocking plugin installed so i can accommodate these users properly. For example, I use 'click to flash', but sites that use SiFR to render text are littered with "click to flash" buttons, which is getting very annoying. I don't use SiFR in my designs for this reason. But if I could spot wether there's a flash blocking plugin installed, I would simply not call the SiFR function.
I'm trying to make a card game with flash. The players will be site visitors, not the computer. I searched for detecting ip (and as3 game tutorial) but I saw that flash can't detect ips.
It appears that if one has a mic available, then one can add an event listener for the StatusEvent. However, this only tells you if the mic has been allowed or disallowed.
What I'd really like to do is detect if the static Microphone.names property changes. I would have expected this property to be bindable.
If I right click and select "settings" immediately after plugging in a mic, I can see that flash has updated their list of available microphones. However, there seems to be no way in code for me to receive the same update.
The docs say "Calling Microphone.names requires an extensive examination of the hardware, and it may take several seconds to build the array." So I think polling this every few seconds is not a feasible option.
I am not able to detect the keyboard event CTRL+V on a swf using AS3 in IE. It seems to trigger the default browser behavior, and im not able to do anything.
What's the best way to add a flash detect to a html page. I have a html page with a flash element in a DIV. (but without prober flash detect). Now i'm confused about the generated code after publishing my flash file. What part of code should I put in my html file, or is it possible to link to a 'universal js file'?
my question today deals with Flash AS3 video buffering. (Streaming or Progressive) I want to be able to detect when the video is being buffered, so I can display some sort of animation letting the user know to wait just a little longer.
Currently my video will start up, hold on frame 1 for 3-4 secs then play. Kinda giving the impression that the video is paused or broken :(
Update
NetStatusEvent from livedocs. It seems to me that the key status to be working in is "NetStream.Buffer.Empty" so I added some code in there to see if this would trigger my animation or a trace statement. No luck yet, however when the Buffer is full it will trigger my code :/ Maybe my video is always somewhere between Buffer.Empty and Buffer.Full that's why it won't trigger any code when I test case for Buffer.Empty?
public function netStatusHandler(event:NetStatusEvent):void { // handles net status events
I need to check for file existence in Flash on x number of videos. I've tried LoadVars and MovieClipLoader. LoadVars works but it actually loaded the entire video before reporting its done. Without a way of knowing that its started, I can't delete it before its done. I don't what to load the entire video, i just want to check that its there. MovieClipLoader has onLoadError and onLoadStart, which works because I can unload the MovieClip right after its starts loading and know its there and if there's a load error I know it's not there. Should work, but I need to run that x number of times to check for the other videos.
I want to programmatically detect flash on a web page. From my search, I understand I need to parse the code and look for embed tags that have the attribute "application/x-shockwave-flash". Is that all? Or there are other ways to embed flash into a web page?
Let's say I had a flex application (Web, not Air), that was meant for Mass Distribution, to be included like a plug-in of sorts, at various websites. Is there any way for a particular instance of the SWF to detect it's own URL while it's running? If so, can you point me in the right direction of which ActionScript command I might google for more info?
I have downloaded SWFObject, and included it in my website. Now I want to simply get a true or false value based on whether or not Flash is installed in the users browser when they visit my site.
Can pixels be read covertly from a browser window containing flash + HTML?(Is it possible for flash or the browser to detect a screenshot being taken?)What about for other methods of capturing pixels? (Like the one described here: How to read the screen pixels?)
EDIT: (background info)
A C++ application is going to read pixels from a browser window (which happens to contain Flash and some regular HTML and JavaScript). The browser window would like, if possible, to detect the fact that it's pixels have been read. The method of getting the pixels could be any (short of taking a photo of the screen itself).
I got a working code to detect face in flash. It just detects and draws a square mark over the face displayed in flash player. Now I do need when ever a face is detected automatically a photo to be taken. How to implement this? Is there any open source project available for this?
If flash is not installed, i want to replace the flash animation with a jquery animation.BUT if flash and js are not installed, i want to display a div with a message to the user.how is it possible to check if flash is not running at the clientside without using js?
This my HTML but if the browser does not support flash then i want to replace image in flash part
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
I'm looking for a solution on how to detect when a user unlock the screen to resume an app after the device was in idle. I need an as3 solution since my app is running with AIR.
I'm (still) building a hybrid CD-ROM flash presentation, which is working out nicely. One of the reqs. is launching PDF files from the presentation. This works well on Windows, using a .bat script and should work fine on MAC using Applescript (haven't tried it yet, but have found some code). Only trouble is: how can I tell from within the Flash standalone projector which platform is being used so I can fire the appropriate script?
I am using Flash CS4 and the new 3d tool, so need to publish my SWF for Flash player 10.The problem I am having is that when I view the SWF on machines with Flash player 9 it obviously doesn't work. It would be nice if only the 3d didn't work, but none of the actionscript works, so my files loops ad infinitum.I'm sure many people have had this problem (and it seems to me a bit of a lack of foresight from Adobe).I have found some JS code to detect whether the user has flash or not and then display flash or an image, but I would like to detect if they have flash and which version it is, and then display either an image (if no flash) or a Flash 9 SWF or a Flash 10 SWF.
I have written a basic chat client that talks to an XML Socket server. When it starts it connects to the socket and works fine. However, when I close the Flash Player it is still occupying a connection to the server. I am trying to determine how I can trap the close of the Flash Player and programmatically close the connection to the server before the program exits.