Sometimes it is necessary just to kill focus (e.g. from the TextField instance). But I found no ways to do that. The only solutions is to set focus on another instance that handles mouse events.
In Flash (AS3) I am creating a contact form in that I have taken one " Submit Button" , one " Reset Button", four input text fields "Name, Email, Subject, Message" with instance names " contact_name, contact_email, contact_subject, contact_message". I am confused about setFocus and killFocus.
In AS3, I have given contact_name.text = "Name"; contact_email.text= "Email"; contact_subject.text = "Sub"; contact_message.text = "Message";
Now when I publish this file, bydefault the input text field shows with text "Name, Email, Sub, Message". Now my requirement is if I click on Name Field so the text "Name" should get disappear so that I can enter my name, after that I click on Email field the text "Email" should get disappear at the same time I don't want to lose my Name which is entered in Name Field. If I click in Subject text Field the text "Sub" should get disappear but not to lose the Name and Email data entered by me. If I click in Message text Field the text "Message" should get disappear but I don't want to lose the data which was entered in remaining text fields.
when i have this line active(the red one) it gives me automatic focus, so no clicking to be able to detect key input so i got that going for me which is nice BUT when i have it active(not commented out) i get this big yellow line which goes away when i click it(seeBelow)
I have a main.swf file and it will load an external swf file.I have this code in the external swf file:[code]So when the external swf file loaded in the main.swf, the color_picker is visible in the main.swf.Everything works just fine but I just need to know how to remove (Kill the onEnterFrame) when the external swf file has been unloaded or replaced with another external swf file?
This if statement is checked by compiler 10 times but I only need once(i.e. when i==0).So once it has been executed or say the statement condition is true,can I kill it. Meaning that this statement won't read by compiler or ignored.
I need to add several copies of a movieclip at random times. When each clip plays out I need it to be removed. What I'm trying is the following:
var list:Array = [] addEventListener(Event.ENTER_FRAME, function(e:Event){[code]............
The first script is working but the last one is not. How should a movie clip instance remove itself?I'm used to AS2 where it just requires this.removeMovieClip(). I've tried to search for an equivalent in AS3 but can't find
I have figured out how to use loader to bring external .swf files into my project, but I have lots of buttons bringing lots of different swf files in and I want to have a home button that will kill them all no matter what order they have been loaded in. Here is my code so far.... returns errors (but it still works) and will cause trouble as I get more .swf's loading. I would really like to keep track of the last loader loaded and be able to move forward and backward through the order and also kill them all at once?
sub var Gstar1:Boolean = false; var Gload1:Boolean = false; var gs_ProLoader:ProLoader; var gl_ProLoader:ProLoader; [Code] .....
I use the setTimeout() function through my application but when its time to garbage collect. the method still runs and calls on a function. How do I stop it from calling on a certain function. I tried setting it to null but it doesnt work
I am writing a custom video player as a class. I have it all working great, play, pause, stop, etc. I can instantiate that class either on main timeline or another class and all is well. The problem I have is removing it. if I have a sprite container called locContainer instantiate my class ActionScript Code:
I am using addChild() to add a movieclip from the library... the movieclip being added has some functions inside of it. When I do a removeChild on the movieclip .. the functions are still running even though the movieclip is gone. how to kill everything in the movieclip once it is removed?
I just started playing around with exporting some of my older Flash projects as android apps. I have one in particular that is a music player. It works great but the back button on my android device just backrounds the app. This is actually what i want since its a music player but would still like to be able to kill the app completely with a button on the stage. I dont know if anyone has seen the siriusXM app. When you hit the back button it asks if you want to exit the app (kill it) or just minimize. I sorta want to do the same thing but simpler by just having a kill app button the stage. I cant seem to find how to do this. I created a button called exit_app. Im assuming I need to make an event listener of some sort and create a function that runs when the button is pushed. I found this snippet that refers to the back button killing the app. Id like to modify it to perform the same action when I press my kill app button.
function handleKeys(event:KeyboardEvent):void{if(event.keyCode == Keyboard.BACK) NativeApplication.nativeApplication.exit();
I have a dynamic textbox which is being assigned a variable. The textbox is set to render as HTML and all fonts are loaded.The following variables appear fine in my textbox:
varText = "This is <b>bold</b>"; varText ="Two is > One."; but this one
I'm getting problem to my preloader.... when I load my first swf, its load fine.. in the loading progress if I click the 2nd button to load the 2nd swf its also load fine but my loader go static.. never remove.
Here is my Code... import flash.events.Event; import flash.net.URLRequest;
I have the following program to play a .flv movie on a webpage made by myself:
var Xpos:Number=0; var Ypos:Number=0; var swf:MovieClip;
[Code].....
When I publish the preview, it works well and I can unload it and kill its sound by clicking on the close button. When I publish the page on the website and load the movie through "loader_btn", it works well, and when I click the close button, the image disappears but the sound is continued.
I needed a way to invoke softkeyboard in android platforms, and i got to know how to do it form here Flash APIs for Android Platform. Now i need to kill the keyboard, basically there is a button which i want to use to toggle the keyboard. Flash has provided a way to invoke the keyboard but not to kill it.(never understood how they work). One more issue is that when i click the down button on softkeyboard which is located on bottom left of the screen, the Softkeyboard_Deactivate event is not fired. It seems its fired only when the focus shifts from one object to another.
I am building a video wall sort of thing. I am wondering whether to use a jpg to preview content of each video or load the video's directly with only loading the first 5 frames running a loop then killing the download on the rest of the movie till requested to start again by the user. Is this possible?
I have a small aplication with two inputTextFields and a button, when the button is pressed it triggers a function that calculates the value in the two text fields, and everything is fine but when the textFileds are empty which is the default value and the button is press I get an error (Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.)how can I detect if the inputTextFileds are empty and some how kill the main function ?
function Name: calculate Input Text Field 1: partL_txt Input Text Field 2: partW_txt Button Name: enterBtn
I noticed that in the new version of flash (CS5) that if I accidently send my program into a infinite loop spewing out the same error over and over again just clicking the 'x' on the flash file doesn't end it any more. Is there a keyboard short-cut that kills the flash file so I don't have to restart flash every time it happens?
I've currently got a flash site written in AS3, into which i'm loading an AS2 SWF that plays audio.The AS2 SWF is loaded into a container movieclip at Frame 10, when a specific navigation button is pressed, the playhead advances to this frame, and calls the SWF. When the user navigates away from this frame, SoundMixer.stopAll(); is called to kill the audio from the loaded AS2 SWF.
This works fine inside of Flash however, when deployed to the browser, the audio playing in the loaded AS2 SWF carries on playing.I've tried loading a new blank SWF in it's place to kill the audio, as well as a blank SWF with stopAll(), all of these solutions work within the Flash IDE (CS4) however the audio always persists in the browser.
Code: var swfLoader:Loader = new Loader(); holderMC.addChild(swfLoader); var bgURL:URLRequest = new URLRequest("ytPlayer.swf");
The code below is a simple add and save program. You press the addButton to add content to the canvas and than press the exportButton to save an image of the canvas in its current state to your desktop. This code works fine when I add circle objects to the canvas that are drawn to the canvas. The problem lies when I try to load a .png into the canvas. Once the loaded content is added to the canvas the exportButton stops working all together and no longer responds. What is causing the loaded content to break the code?
I would like to use an XML-driven menu on my site and everything works fine so far, but the XML is connected to a CMS, meaning new menu items can be created through the CMS and added to the Flash menu. That's works, too. Here is the problem: Browsers usually caches XML files,to modify the line where Flash retrieves the XML file:e.g. instead of getting: 'menu.xml'. It should more look like this: menu.xml?'+Math.random(),(or whatever is the exact syntax for a random number is in AS. This would kill the cache, correct?Here is the AS code:
// declare the package package com { // import the needed AS packages