ActionScript 2.0 :: Key Events Not Working In IE?
Sep 6, 2010i have written the code for copy(ctrl+c) in flash action script2.0. it is working fine in mozilla, but the same copy key event is not working in Internet explorer.
View 0 Repliesi have written the code for copy(ctrl+c) in flash action script2.0. it is working fine in mozilla, but the same copy key event is not working in Internet explorer.
View 0 RepliesI have an instance of FLVPlayback on my stage called amplayer. I also have buttons next to it that stop the player and change the source. Some of the buttons not only change the source, but seek to a cue point as well. I'm trying to create the function that seeks to the desired cue point once the new video source is loaded and the player is ready, but it is giving a cryptic error at compile time.Here is my code:
import fl.video.*;
//Button click handling code goes here
function readyhandler(event:VideoEvent):void {
[code].....
I am adding a key listener to my AIR application like so:
<mx:WindowedApplication
xmlns:mx="http://www.adobe.com/2006/mxml"
keyDown="onKeyDown(event)">
Yet only sometimes when I press keys does it actually invoke. I have no clue why, I thought maybe something else has focus. Well I cannot add key listeners to NativeWindow or NativeApplication, and I would assume if it is on the WindowedApplication which is the root element, that as long as my application has focus the key presses should invoke the listener.
I have the FLVPlayback component on the stage. This is the only code I have in this file:
ActionScript Code:
import fl.video.VideoEvent;
vidPlayer.addEventListener(VideoEvent.PLAYING_STATE_ENTERED, showVideo);
[Code].....
I'm doing a little website and using swfaddress for deep linking. Everything seems to be setup as it should, swfaddress is working fine when i'm setting values, like the page title or url and stuff.On the other hand, SWFAddress.onChange event is not responding at all. Has anyone got an idea or had this "bug" before ?
View 9 RepliesCan anyone help with this, I've been working on it for hours straight and I'm still having major issues.
Sometimes it works great, sliding each new status update down as it should. Most of the time it seems to have completely random positions set. I am completely at a loss. [URL]..
I think it's an event issue, specifically with line 127 trying to loop through the children and dispatch a custom event to all children. I'm not sure how to best do that.
I have a button that I want to have trigger a rollover effect when rolled over, and when clicked trigger something. I am changing the background image of the whole Flash movie. On Rollover I want it to give you a preview, and on click, I want it to goto a frame in a movieClip where that image is. Here is a pic of my timeline:For instance. I want my first button, "button1" (which is outside of this movieClip on the main timeline) to do the following:When rolled over, it needs to go to the "btn_over" frame label When Rolled out to go to the "btn_out" frame label.And when Clicked to go to frame 2.Currently My button is a movieClip symbol, because I will be doing some simple animations to it. Here is the code I have on my first button: This makes the click work. (and it does work, just not when paired with the second function for the rollover)[code]Does anyone know why the second function is overpowering the first? Or a way I can get the effect I am looking for.
View 2 RepliesI'm using Flash Pro 8 and I'm attempting to incorporate events into some of my classes and I'm having nothing but problems. After looking at lots of examples, this all seems okay, but doesn't work. First is the class code and secondly is the code on the timeline.
ActionScript Code:
import mx.events.EventDispatcher;
class iaicu.mycampus.ClassSchedule {[code].....
Keep in mind that these classes are more elaborate, so events are intended to be more useful.
I have a SWF file that uses Mouse and Keyboard Events. When I test the SWF file in the flash IDE the events work fine. When I run the SWF file stand-alone with the Flash Player, the events work fine as well. But, when I open the SWF in a browser, neither mouse clicks or key presses register. Even if I puslish the SWF as a HTML, it doesn't work either.
View 4 RepliesJust wanted to ask if there is any advantage for either using mouse click event or touch tap events, when writing apps for mobiles or tablets (for the iphone especially)?
I know that both of them should work fine, but in term of performance, is anyone better? Are there any things I should be aware of when choosing either?
By the way am using actionscript3 to implement the app.
I have an animation that I want to start when clicking on the flash window. However, I've also have some buttons on the stage. If I add an event listener for MouseEvent.CLICK on the stage, then it 'eats up' the events and the buttons don't work.
I've tried some tricks, by adding some invisible buttons on top of the real ones, and use the MOUSE_OVER event to selectively enable/disable the mouseEnabled flag for the stage, but didn't work because it complains that the property or method doesn't exist (which I find odd).
I have noticed that using the "addEventListener" and coming back into a frame, I get multiple events tied to the same component.The design I am using jumps to an "I" frame (intermediate) and then back to the "M" frame (main) when the user performs an action.I add event listeners to several components when I enter that M frame. What I notice is that the events seem to stack up for a particular component.
For instance, if I enter M frame, N number of times and addEventListener("click", handleEvent) to a radio button, I get N calls to handleEvent when the user clicks on the radio button. I guess this kinda makes sense but is not what I want. I just want one event of a particular type (in this case "click") to be associated with the a particular component. I get around this issue by removing the event(s) in the I frame. Then they get reinstalled in the M frame. Only one at a time.
So, just wondering about this behaviour. Is there a way to check for the number of events that are currently active on a particular component? Better way to handle adding events?
I am designing a music player using JavaScript (jQuery) and HTML5, with Flash AS3 to fall back. Basically what I want to do is to be able to click HTML control elements and have them interact with the flash in order to play/pause and skip tracks in the playlist (playlist JSON file read by JavaScript, passes file ID to AS3, AS3 reads another JSON file to get URL, then plays audio)
This enables me to only use the Flash to play the audio, thus creating the same user experience regardless of HTML5 browser support. I'm assuming I will have to 'listen' for events in AS3, however any pointers in how to engage these events in JS and react to the events in AS3
LinkeSetFx has its own CollectionEvent, but I don't know how to map the LinkedSetFx event to mx.events.collectionEvent(I want use it in ComboBox). LinkedSetFx is in AS3Commons-collection framework.Here is the url, choose the as3commons-collections-1.0.0.zip, you'll find LinkedSetFx in srcorgas3commonscollectionsfx
View 1 Repliesiam making a game and i almost finish except one error i couln.t get it
TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::Event@3738fb79 to flash.events.MouseEvent.
TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::Event@3738fb79 to flash.events.MouseEvent.
[code]....
I try to dispatch an error event in an AS3 application:dispatchEvent( new ErrorEvent( ErrorEvent.ERROR, false, false, "my error message"));but I get the following runtime error:
TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::ErrorEvent@2c04239 to com.adobe.protocols.dict.events.ErrorEvent.at flash.events::EventDispatcher/dispatchEventFunction()at flash.events::EventDispatcher/dispatchEvent()at my line of code..
[Code]...
When I placed this AddEventListener I got this "Type Coercion failed message"
addEventListener(Event.ENTER_FRAME,onEnterFrm);
Located above the mouse event:
addEventListener(Event.ENTER_FRAME,onEnterFrm);
[code]....
Right now all the sounds (78 of them) on my guitar play using the roll_over event but that doesn't give the user much control over what sound is played.
The actionscript im using to play my sounds is this;
for(var i:uint = 0; i < buttonArray.length; i++){
buttonArray[i].addEventListener(MouseEvent.ROLL_OVER, buttonRolledOver);
}
[Code]....
What i want to do is only play a sound with the roll_over event when the left click is held down.
package
{
import flash.display.DisplayObject;[code]....
I have a flash project, its working fine in local system, but the same file is not working in live here is the link of the site, its showing blank page, the flash contents are not loading... [URL]
View 12 RepliesI have a flash project, its working fine in local system and checked this file with uploading in someother websites, its working fine there too, but the same file is not working in live here is the link of the site, its showing blank page, the flash contents are not loading.URL...and here the same file which i have uploaded it in other server its working fine.URL...
View 2 RepliesI missing a file that needs to reside on the server to get this working?
View 1 Replies[URL]
The ad on the bottom right of the screen (the one with lightning flashing) has an invisible button in its Flash file (CS5) linking to [URL]. This file is imported as SWF in Dreamweaver CS5.
The hyperlink works in Firefox, but not in Safari. Maybe it is just my computer.
I have developed a player in AS3. It is working if i provide the IP of the website. But, it is not working when i provide the full domain name. Even, i provide the crossdomain.xml for global access.
View 1 Repliesi have a "swf" file which is picking url from xml & displaying the image, when i tested it locally it works fine, which means it picks up URL from XML & displaying corresponding image. After i uploaded it on server, it doesn't show anything.
View 2 RepliesI had a button when clicked, it would replace a different moviclip.This worked until I made the bulk of the code into a function and moved it to the layer, and then tried to call the function from the previously mentioned button. It generates no errors, but it stopped working.Hierarchy:Layer 1 > U1 > image
Original button script:
on (release) { var theDepth:Number = _parent.U1.image.getDepth(); _parent.U1.attachMovie("K3E", "image", theDepth);
[code].....
I am creating a website that has links to flash animations. i have created a folder called flash in the root folder and copied the relevant .fla, .swf and the .mp3 files into that folder. the animations are working fine but the audio isnt.it all works fine in flash itself.
View 4 RepliesI created a 9-scalled background in Flash CS5 which is working fine in Flash CS5.But when i imported it as embeded graphic in Flex, and change dimensions in runtime, 9-scalling doesnt work.Here is my code.
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"[code]....
am using bitmapdata to make me a nice lil' background image, and it works great...until it's resized. Whats happening is it's creating a new bgHolder clip on the resize, NOT resizing the current empty clip "bgHolder"Here's the code(taken from various posts)
import flash.display.BitmapData;
#include "mc_tween2.as"
Stage.align = "TL";
[code]....
I have just made a website (URL...), and I have two swf. One sound swf and one video swf but none are loading in IE? Anyone know what wrong?
View 1 Replies