I have a hidden DisplayObject (myObj.visible = false;). I've provided a listener: myObj. addEventListener(MouseEvent.CLICK, myHandler);By myHandler does never fires. It seems that MouseEvent.CLICK is not delivered for hidden objects...How can I listen to MouseEvent.CLICK for my hidden object?
ive got several movie clips as buttons in a parent movie clip that i hide/show. each button has its own instance name. even when the parent movie clip is invisible the button clips still get onmouseup events. when the parent is visable i dont even need to click on the movie clip to get the event to fire. even though i put the functions on diffrent clips they all fire, here are two of them:
It seems that the onLoad method fires twice ?? I know the .load method has to come after the .onLoad function for the function to work but that doesn�t seem to be the problem in this case.
It doesn't work because "updateNumCsrLoaded" is firing 6 times (twice per image) instead of 3. I could just change the if statement to "if (numCsrLoaded == 6)" but this is not
I'm looking for a way to add an EventListener which will automatically removes itself after the first time it fires, but I can't figure a way of doing this the way I want to.[code]
I am having some trouble with MOUSE_WHEEL delta values. It seems like the event doesn't fire unless I REALLY spin the dammed wheel. Which makes sense because the only values I get range from 3-30. I was hoping to catch 1-3 as well because if I just spin a few notches, nothing triggers and the app feels sluggish.FYI every other program on my machine feels those 1-notch spins just fine so it's not the mouse.Will AS3 not fire if the delta is less than 3?Here is the code
private function handleMouseWheel(e:MouseEvent):void { trace(e.delta); // Output is always more/less than +/- 3 [code].....
I'm trying to create a Thumbnail class that extends MovieClip and have run into a "loop". When I hover a cursor over a Thumbnail instance it fires an over and an out event. That is, that happens if I add any kind of filter to the Thumbnail class in the over event, if I leave that out and trace the code it fires only the over event and waits till the cursor leaves the thumbnail. I have tried adding the GlowFilter and the ColorMatrixFilter with the same effect: premature ROLL_OUT.
Tracing the keyCode for the 'a' key (65) only works once for KEY_DOWN events and sometimes KEY_UP behaves in the same way, making development a pain when trying to do things quickly.
Clicking on the stage makes it start working, but why is it just the 'a' key that is affected?
This is on a new MBP running OSX 10.6.5, Flash version MAC 10,1,102,64
[URL]
The issue can be reproduced every time with this code:
I can just create a new project, target Flash Player 10.2 and paste this into frame code:
[Code]...
The event never fires off. I look in the reference for StageVideo and I see it's available in Flash Player 10.2. What's up with this? edit: If I target AIR for iOS, this event does fire (I have AIR3.0 overlayed).
microphone.addEventListener(SampleDataEvent.SAMPLE_DATA, gotMicData); the event gotMicData is never fired.. however i tried using dispatchEvent but that will return null byteArray.. However similar code works fine in Flashcs5...
I have a block of code that I want to execute directly after a url is known to be valid. What I mean by 'valid' is that the program has checked to see if that filepath actually exists. This could be accomplished by a COMPLETE listener, because after all, a loader couldn't finish loading its content if the referenced file didn't exist, but I want it to happen before any of the bytes begin to get sucked in. I have also tried the HTTPS_STATUS event, with a conditional saying "if the status is this [some non-error status number], then run this block of code." This would have worked great, except that different environments produce different network codes, and some even can't distinguish between errors and non-errors, just returning 0's no matter what. Because of this, I can't write a conditional that works no matter what browser....
I have created a player that loads video FLV files and plays them in a sequence. On loading the videos I retrieve the total video time by stream.client.onMetaData = ns_onMetaData;" and in an EnterFrame event I check whether the video playtime is equal the totaltime. If the video playtime is equal to the totaltime then the player loads the next video. Sometime, even if the video ends, the playtime and total time doesn't match. So to fix the issue, I decided to put an event cue point (END) at end of each video FLV. So whenever the FLV fires the END event, the player removes the current video and loads the next one.
Suppose the video total time is 44:00. The cue point is also at 44:00 in the FLV. So whenever the player gets the END event from the FLV then it loads the next one. Now the issue is, if I pause the video at 42:00 and wait for 2 sec, the player gets the END cue point and jumps to the next video. When I paused the video the timer says "42:00 of 44:00". The timer doesn't increase, that means the video has actually paused. But I still don't understand that why I'm getting the END cue point where the video has not reached the time.
When executing dataprovider.refresh() for a chart component it redraws the chart. How do I determine when the chart is redrawn? I would like to take a png screen shot of the chart when it is fully drawn.
I have a movieclip and i put an onRollOver call on it. The problem is the onrollover fires only once when the ouse is on top of the movieclip. In flash, how can i do something equivalent to the onmousemove in javascript?
Generally, I like to use onLoadInit because it gives me accurate widths and heights. But when I have an external SWF file with a video embedded in it, I find that onLoadInit always fires a second or two after the video has started playing.
Variable called "switch" has a boolean value of "false".Event.ENTER_FRAME event listener method fires, and calls method "onEnter()".Within the "onEnter()" method, the "switch" variable is set to boolean "true".My question: What is the best way to make sure "switch" variable is called, and set, only once during the ENTER_FRAME event?
Is it as simple as checking if "switch" is false, and then setting it to true... Does it matter that I would be doing the if() for every frame of the Event.ENTER_FRAME?
I had a function that occured on mouseclick called go_out. I want this function to occur when the timer fires after 5 seconds. After the 5 secons I receive this error:
flash is not my area of expertise, but I've inherited a task that deals with AS2 Basically, I have a flash document (a loader?) with the following AS 2.0 code:
[Code]...
Basically, the idea is after the movie finishes playing, you should get redirected to a new page. The problem is that sometimes the page redirects immediately (before the movie is played). The movies are being served up from a media server and this seems to happen more consistently with newly uploaded movies. Sometimes it takes several attempts to actually play the movie all the way through, but over time, the movies generally start to play problem-free.
How can I access to an object who fires an eventListener event?
Let's say I have a mc:
var element = new MovieClip();
which has an eventlistener: element.addEventListener(MouseEvent.CLICK, elementEventHandler);
[Code]....
So that is what I want to achieve... Recover the object who fired the event and then do crazy things with it (in this example, add another object in it).
pd: yes, I know I can directly use the var element in this snippet, but in the real code I'm generating the mcs in a loop, according to a xml file.
I have a Loader class which I'm using to load an image:
Code: var request:URLRequest = new URLRequest('https://some website path to .png'); var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, error); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
[Code].....
The code above works when I run it from FlashDevelop but fails when it runs from a website. The domain is protected by a crossdomain file which allows the website I'm calling it from. I've tried other https requests to the same domain using URLLoader and those work fine. This code never calls Event.COMPLETE or IO_ERROR and no alert error comes up.
I am trying to make a search interface that behaves much like searching in iTunes and Spotlight in that the list is updated instantly as the user types something in the search field. However, I would like the lines that result to be clickable and to fire actions inside flash (as opposed to launching an URL). Is this possible?I've gotten the basics down. Here's what it looks like and here's the source FLA file. The results are displayed as tabbed lines of text in a single text field. Is there any way to make these lines clickable without replacing this way of displaying the results with multiple, duplicated button/mc-intances?
With the KEY_DOWN event handler, if the user holds the key down it fires the event constantly. I want to create a KEY_DOWN event which only fires once on the initial key press, even if the user holds the key down.
what Have I done wrong! I want 'time' to return a number from the function it fires, So that it gets placed into the alphaTo Function ....> have a look
Code: blocks = 6; for(i=0;i<blocks;i++){
[code]....
So you see that I want to return a Number to 'time' ... How do I Return the Number?
I am using the VideoEvent.COMPLETE trigger to return my user to a selection screen once a video they have chosen to watch has finished... but for some reason the trigger fires 2 or so seconds into the video(45sec videos). The bug seems pretty inconsistent, sometimes it happens and sometimes not on all of my videos
I have buttons that have mouse_over, mouse_out and CLICK events. But when I click the button it takes me to another frame and the mouse_out event tried to fire.
I'm working on a project using a MVC design pattern where flvs are played form a xml playlist. I noticed something strange in the Output window. For the first flv the NetStatusEvent NetStream.Play.Start fires once, the second one fires twice, the third one three times....
Here is the part of the code where I load the video :
I have an array of loaders loading .jpgs. After the Event.COMPLETE fires, I trace the content at the current page and it tells me the content is null, BUT on testing the images appear just fine. Here's my code:
I'm making a top-down shooter game.I have keyboard input that moves the ship around and fires a laser. everything works perfect except that when the ship moves diagonal up left, or diagonal down right, the laser can't fire at the same time. It will work in any other direction, including the other diagonals.here is my code:
[AS] function captureKeys() { if (Key.isDown(Key.RIGHT) && ship.x < 355 ) { ship.x+=ship.right[code].....
It seems to be the case that the MOTION_FINISH event fires of prematurely in the Flash Tween class. I've heard that it is not the best tween engine to use, but this seems like a particularly egregious. I am using "Strong.easeOut" for the motion. What are some alternative tween engines that people like?
I have a data grid with a custom item editor that displays a DropDownList component. When I click the scroll bar in the component, it is firing a focus out event on the list, which is causing itemEditEnd to fire. Why the list is not keeping focus, or how to make it keep focus. I'm using Flex 4.