ActionScript 1/2 :: Detecting Microseconds In Flash?
Dec 16, 2009I have tried searching for a solution on the net but to now joy.I can detect millisecondes in flash (getTimer()) but what I would like to do is detect microseconds.
View 1 RepliesI have tried searching for a solution on the net but to now joy.I can detect millisecondes in flash (getTimer()) but what I would like to do is detect microseconds.
View 1 Repliesis it possible to detect if flash is installed using PHP. My aim is, that if it is installed it will play a flv file, and if not it will use another player eg; quicktime?
View 5 RepliesIs there a way to detect end of Flash movie (OOTB, without using some sort of flash callback). Alternatively, is there a way to know the length of the movie? Update: IsPlaying() looked promising (periodically checking it), but as it turns out, nobody is creating straight forward swfs any more; now, the content is embedded in main layer and while the content plays, the main movie is stopped and IsPlaying is always false...
View 3 RepliesI'm trying to create a air-hockey game, in flash using AS3.At the moment, I am using an enter frame function to check the positioning of the 3 objects, 2 paddles and a ball, then it checks to see if they are in contact, if they are it then initiates a detect collision function.However it's checking every time the frame is loaded, and at 25 fps, this is quite a lot and the app lags.
View 3 RepliesI'm creating a website with Flash embedded into it. I understand that iPads do not support flash. I also have a non-flash version ready only to be used for iPad users. How do I detect the end user's device and redirect them to the version directly ?
View 1 RepliesI am bumping into a very strange behaviour on Flash.If you on the Flash IDE create a shape with a mask associated to it, save it and then export it as a swf, you cannotprogramatically know there is a mask (displayObject.mask is null)
Here's a simple test script to prove that:
//executed on enter_frame with the root object
function test(d:DisplayObject) : Void
[code]....
I'm making the simplest swf for a friend who has real problems remembering the actions of a Left and Right click with the mouse. So I would like to show text when "Right" click is detected and the same for a Left click. This at first seemed an easy project but the right mouse detection has got me baffled.
View 4 RepliesI am making the flash bit of a kiosk. The swf will be running in a exe shell. Is there a way to have the swf see what is containing it (browser, exe shell, my hand, your hand...) and if it is contained by the exe shell it will call fscommands, otherwise it wont? The exe isn't finished yet, and I'd like to test my swf without it giving me security errors. I'd also like to be able to show my boss the swf in as few clicks as possible
[Code]...
detecting bandwidth in flash?
View 4 RepliesI have created some flash banner ads for a client to put into his own website, which he can edit himself using a third party piece of software (is it Blue Martini??... or something like that). I have published my banners for player 8, and normally this is fine when used within a dreamweaver html page, in that if someone doesn't have the right version of player, they are prompted to download the latest version using javascript. Thing is, this isn't happening with the site my banners are going into, and people with version 7 player are missing elements of the banner!! I'm thinking its because of the way the swf is placed into the site??? Is there a way I can control the detection and direct to a download within my flash file only? with actionscript??
View 3 RepliesIs ActionScript 3 capable of detecting pen pressure on, for example, a Wacom tablet? I was looking at TouchEvent but it doesn't appear to work.
View 2 RepliesI have a flash game that asks the user to enter his username & password then he can start playing the game. After that the score gets saved to MySQL next to his username & password. The final step is to display his scores in the flash game. Everything works fine except for the last step which is calling back the scores from MySQL to the flash game.
I call the scores from MySQL using PHP file which sends the data to flash through XML. I can call the data from MySQL & display it in flash BUT I should enter a specific user name manually in the PHP file. The problem is that I can't make the flash game display the scores of the logged in user. for example: User A signs-in, plays the game, his/her score gets saved & then the problem occurs calling back his/her scores to the flash. In order to display User A scores in the Flash , I should replace the $username variable in the PHP file with "User A" so the scores can be displayed in the Flash file.
[Code]...
I've seen two answers: Adobe Flash Detection Kit - Javascript detect flash version JavaScript routines only:[URL] Simple questions: are the detection algorithms, described above, identical and if not - which way is better? Will they work the same for desktop and mobile browsers (both iPhone/iPad and Android)?
View 1 RepliesI'm totally at a loss as to how to detect if my instance of FLVPlayback component has been handed a source that either doesn't exist or it can't play for one reason or another.
[Code]...
There are 3 flv movie in my flash page. Is there a way to indicate in my flash page if the flv movie is already viewed on user's browser? I need to put a mark on the movie if one of them is already viewed? Am I to use Shared Object?
View 1 RepliesI was just wondering if it is possible to detect and display any or all of the following of someone visiting my site, preferably just using AS:
[Code]...
I am trying to use hitTestPoint to test whether the x/y coordinates of many circles are colliding with the pixels of another movie clip, but it is not working. It works fine when the ShapeFlag is set to FALSE, (circle detects the boundary box), but not when ShapeFlag is set to TRUE.I have spent hours trying to figure out what could be the issue, but to no avail.Class Ball - called by MAIN program multiple times to create instances of Ball and bounce them around the screen. If Ball collides with DQ (another MovieClip on stage), then it should stop moving:[code]
View 3 RepliesI'm working on an interactive animation for a university assignment. Here in this scene the user is able to turn a safe dial left and right either using on screen buttons or keyboard keys. The trouble I'm having is trying to write an IF statement to detect the angle of the safe dial so when the dial == an angle of rotation the scene goes on to play the next frame of the animation.
Code:
import flash.events.MouseEvent;
import flash.events.KeyboardEvent;
[code].....
I'm using Javascript to embed a flash file into a website which I then need to remove once it's completed playing.
Is there a way to do this in plain Javascript? Or will it require a callback type function to be added into the Flash file itself?
How do I code this? ._.
Javascript:
jQuery('body').append('<embed id="flashIntro" width="100%" height="100%" type="application/x-shockwave-flash" src="' + flashIntro + '" pluginspage="http://www.adobe.com/go/getflashplayer" />');
What's the best way to check whether there is video data (or not) in a live RTMP stream? For example, if a broadcast terminates, can I auto-detect that condition, to perform some sort of "thank you for watching" behavior?Also, how can I know if a visitor somehow gets disconnected from the Internet during the broadcast? (So I can notify the visitor of the problem, and give instruction.)
View 1 RepliesIf two movie clips instances of the same movieclip are placed on the stage and one is flipped horizontally in Flash.. Is there a way I can detect which one has been flipped horizontally in code? ScaleX seems to remain unchanged.The MovieClip has been flipped horizontally using the Flash UI (Edit->Flip Horizontal), not via code.
View 2 RepliesI am having trouble finding the right keywords to find a solution to my problem. I want to make my app size dynamic according the size of the <object> tag set in HTML. Im searching for the code like: stage.width but showing me the fixed html attribute instead.
View 9 Repliesis it possible for flash to detect when a user closes an html window with a swf embeded in it?
I want to record a user session time and need to be able to call a function and serverside script from within flash when a user closes the window...is there a way?
(I thought I might be able to do it with onUnload, but that will only work for unloading movieclips, not closing the main swf.)
correct method to do this is in here http:[url]....however, Event.MOUSE_LEAVE no longer behaves this way in FP 10.1. i read somewhere that we should now be using Event.DEACTIVATE. this has not been triggering when the mouse leaves the stage area, for me.
View 3 RepliesI am trying to build a preloader that detects the user's Flash Player version, and then loads the matching content: if the user has Flash Player 11, Stage3D content should be loaded.
The problem I'm running into is that a preloader that is compiled for Flash Player 10 can't display Flash Player 11 content, even if it is running in Flash Player 11.
Is this true? Are there solutions other than detecting the player version in JavaScript?
I am creating a tower defense game and I want to make a tower that shoots a bullet and every enemy that the bullet hits is damaged. The bullet can hurt multiple units. My problem is detecting if the bullet hits the enemies. Right now, I have the enemies in an array. With other towers, when an enemy is in range, the tower fires and when it hits its original target, it causes damage to that target.
For the tower I want to make, it will shoot the bullet the maximum range every time and I need it to damage every unit it hits on the way to that final destination.
Is it possible to detect, through flash, browser version on a user�s computer?
View 1 Repliesi'm building an projector application in AS3, as a slide show.When the right and left keys are pressed on the keyboard, the slides change.the code to change the slide:
Code:
function setup() {
stage.addEventListener(KeyboardEvent.KEY_DOWN, displayKey);
}
setup();
[code]....
Some slides have button on it, that change the slide, jumping to a chapter the user whant to see.the problem i'm having is that when the button at a slide is clicked, the key press detection does not work anymore. To make it work, I have to click somewhere on the stage.
I'm making a custom slider component. The head (the thing that you drag) is programmed like this:
head.addEventListener(MouseEvent.MOUSE_DOWN, function():void {
head.startDrag(false, new Rectangle(stubDiv,0,width - stubDiv - ((levels-maxLevel)*stubDiv),0));
[code]......
I'm loading a number of MP3 files into my Flash (the number changes dynamically). I would like to be able to say, in total, how much longer all the files will take to load.
I can do this for each individual sound.Mp3.addEventListener(ProgressEvent.PROGRESS, test_function);
But each sound is loaded by an instance of my sound loader class, how can I pass the ProgressEvent up to the parent object, and then have it calculate the total time to load?