ActionScript 2.0 :: Hit Return With The Keypress Code It Wipes The .swf File And Goes Blank?
Oct 22, 2007
I have code on my flash that allows the user to tab to certain buttons and press enter to enter it... but when ever I hit return with the keypress code it wipes the .swf file and goes blank... is this something to do with refreshing?
Code:
var EscapeListener:Object = new Object();
EscapeListener.onKeyDown = function() {
if (Key.getCode() == 27) {[code]....
View 1 Replies
Similar Posts:
Feb 13, 2006
I am trying to make a game where if you press down on a letter key, it fires a bullet. How do i assign the fuction to the keypress?[code]90 is the key number for key "z".fireBullet(); is the function to fire the bullet. It is working.
View 7 Replies
Jan 28, 2009
[code]It works fine when I press the button but not when I press the enter key.Just to set the context I want users to be able to use enter to enter an answer into a grid before moving on to the next cell. My cells are all labelled A1, A2 etc so that I didn't get confused. As I am and will always be a newbie I couldn't figure out a function to do what I wanted so came up with what is probably a long winded way around: store the textfield instance name in an array and then call the item in the array in conjunction with setFocus - like I say it works when I click the button (which I intend to hide off screen).
View 10 Replies
Sep 30, 2004
is there a code that will disable key press all together or to focus on just the input box so that i can type with the space key (space is used to pick objects up in game not in use when this menu is open anyway).
View 4 Replies
Jun 23, 2009
I've got a text field pulling XML and its CSS. The XML has a few long lines of text it uses as links. The links are long enough to word-wrap in the text field. Now, if you were to select the text, it would only select the words. However, the blank area to the right of the wrapping link is still an active hotspot for the link somehow. I wouldn't consider this a problem if clicking the blank area didn't return the text field to the top (it is scrolling text). It gets very distracting and hard to track where you are in the text.
View 3 Replies
Dec 13, 2011
I was editing a very basic mobile Flex project, and after I debugged the master (application) mxml file, Design View stopped working (blank screen displayed, no Design View errors) for all files. Creating new projects, either mobile or else, or testing old, working projects, doesn't work either. Out of the related issues I've found info on, most concern earlier versions of the IDE, and deal with either Design View errors (got none), use of certain functions or custom components (I get the error even on a new project), or are solved by changing styles back-and-forth (tried already, to no avail).
I can't drag and drop components to the design area, either (a "prohibited" symbol appears and nothing happens when I drop); so I'm pretty sure it's not code-related or a bug, but probably something stupid, like a configuration issue, so I definitely need someone to take a fresh look at it.
View 1 Replies
Sep 24, 2010
This is one of those projects I've been nursing for a while to help better myself with as3, but I've hit a point in the code where I'm just going around in circles now and can't seem to figure out how to get out of it. This project still has a few more problems after that, but I'll deal with those, for now, the situation is, here is a compressed file of my files
it contains:
the flash file which just targets the main .as file
assets -> packages -> and three .as files
music.xml
to save space I left out the 2 .mp3 files, for testing purposes if you really need them, I'll host them up, but otherwise if you need to test it and you have some .mp3's lying around, the <fsong> in the xml file is the mp3 file name.
so here's the issue: What I'm building is a flash audio player and virtualizer that will feed off of the music.xml, parse the data into info at the bottom, and eventually those song links will actually be active and choose the song, but that is something I'll figure out later.Right now, if I hard code in the song title "currently symptoms is hard coded in" it plays fine no problems, however what I want it to read is the first [fsong] in the xml file, so that I don't have to mainly change the as files, and that's where I've been going around in a circle.if you look at LoadSongXML.as at the top inside the public class LoadSongXML extends Sprite .there is public var initSong:String = "symptoms"; and public const SOUND_URL:String = initSong + ".mp3"; to control what gets called and played initially.
in public funciton completeListener(event:Event){
I have var initSong:String = songFile[1]; I can trace that value as you see in the line below just fine, but when I try to return the value so I can actually use it, I can't seem to access it, and I don't know how to get that function to return the value up so that I can actually access it.I've tried moving the various xml arrays out of the function so that they are in the same level, but that ends up breaking it.I originally had the public const SOUND_URL:String = initSong + ".mp3"; line in SpectrumDisplay.as and tried to pull the data to that, but to no avail, even tried adding the xml parser to that actionscript, but that ends up breaking over there as well.
View 1 Replies
Sep 10, 2009
I need code that makes a button gotoAndPlay (211) which is a movie in an FLVPlayer that I "imported" as an external file that will play as a progressive file, and then, when that movie clip has finished playing, I need code to make it go back to frame 210, which has the menu with all the buttons on it that will launch other documents and movies on 212 and 213. The big problem is getting Flash to know to go back to my menu page when the video stops playing...All in ActionScript 3. If I can get working code by 8am tomorrow - Thurs 9/10/09, I will pay for the first posted that works. Say, $150. call the button button1 and the video video1.
View 9 Replies
Mar 16, 2010
I am trying to find out how to make one .as file code interact with another .as file's code.like, if I had one .as file that specified options of movies and then when the user clicks on a movie (loaded through xml) it uses code from another .as file to load the correct movie.
View 5 Replies
Jun 23, 2011
I looked at building this Weather widget from: [URL]..It works perfectly when i preview the file in flash but when i add the file to my web site it is blank... like it is not requesting or getting data... any reason why that would be?
View 10 Replies
Aug 28, 2009
I am trying to read some values from an external text file (combobox1.txt) into Flash, to populate my combobox1.
tmpArr1 = [];
myVars1 = new LoadVars();
myVars1.load("combobox3.txt");
[Code].....
This works just fine on my PC; but won't work online after uploading the files (freehostia), the combobox will stay emty. After openinig the text file (link) on my browser I only see a blank screen. So I tried the same file on a diferente server and now I can see the data now on in my browser (link) and my local swf, but still nothing on my online swf.
View 0 Replies
Oct 1, 2004
I'm using Flash MX 2004, and using the loadMovie() function to draw an external .swf file into a blank movieclip. My question is how the browser (let's assume Internet Explorer) caches this information. I know that after a Flash movie is loaded within an HTML page, the browser caches it, so that on the next load the movie appears nearly instantly from the cache. However, does it also cache the movie loaded using loadMovie(), or does it always redownload that external movie regardless?
View 2 Replies
Dec 27, 2010
Is there a way to make code on the timeline and code in a separate AS file communicate with each other?I have two buttons, a yes button and a no button.I have a confirm box which is a movie clip. In the movie clip I have the two buttons on it and code so that every time one of the buttons is clicked it runs a function.I have the rest of my code for the movie (so the code to make the confirm box appear) on a separate AS file.Is there a way I can define the functions on the movie clip and run the functions with the separate AS file?
View 7 Replies
Jul 29, 2009
In what combination of as2 code would instruct a preloader to recieve bytes loaded and bytes total in addition to loading a external swf file into a blank movie clip? I've seen countless issues regarding the same problem but still haven't goten a clear answer. I dont want to use the video player component standard on Flash. I want a preloader to preload a external swf file and play it inside a movieclip.
View 5 Replies
Oct 24, 2010
I have been trying to get sIFR 3 rev.436 working on my site but I stuck at publishing the movie. I did everything the instruction had told me to but when I published the movie and double clicked it to test, it failed, the movie was blank with the following error. Someone said the Action Scripts should be in the same folder as the sifr.fla, it was but it didn't help at all.
Scene=Scene 1, layer=code, frame=1, Line 19
The class or interface 'sIFR' could not be loaded.I was puzzled and after hours of looping in the situation I downloaded rev.432 and tested it out. To my delight, everything turned out right and I published the movie successfully!
View 2 Replies
Oct 1, 2009
When am importing the xfl type file to flash Many blank Static text box is appering. Is there anyways to remove the blank static text box without selecting one by one. Check by Ctrl+A
View 2 Replies
Jan 28, 2003
1)I was able to load an external .swf file into a blank movie clip (A TARGET CLIP WHICH I CREATED using createEmptyMovieClip) 2)Also by placing a button on the stage I was able to remove the movie clip
BUT I WOULD LIKE TO BE ABLE TO KEEP ALL MY CODE IN THE FIRST FRAME. I would like to Remove the Movie without putting the code on the button. But it didn't work.
Here is the code on the button that Does work
[Code]...
View 4 Replies
Feb 4, 2010
I am trying to write a class file using a .as file instead of writing code into the script tab of a .fla file.When I write stage.addChild(img); I get an error that stage is null. When I take out stage, and just write addChild(img); the code runs fine, but nothing appears on stage. Do I need to do something to set a stage active?
Is this because I don't have a Main class? My class is named after the file and I don't have a file named Main.Here is the code. As it is, it runs and I get the two trace outputs, but no graphic on my screen.
package { import flash.display.DisplayObject; import flash.display.Sprite; import flash.display.Loader; import flash.events.*; import flash.net.*; public class HelloWorldImage extends Sprite { private var background:DisplayObject, foreground:DisplayObject; private var url:String = "hw_jpg.jpg"; private var loader:Loader = new Loader( ); public function
[code].....
View 7 Replies
Mar 30, 2010
I'm working with timeline actionscript. I want to create a function that loads my xmlfile and returns an xmlobject with the file's content.[code]...
View 7 Replies
Feb 8, 2010
For For some reason, I'm not getting any result returned to me when uploading a file to my server. I'm using a php script, the file gets sent, gets uploaded, but I can't get the return result.
I am firing these event listeners:
fileRef.addEventListener(ProgressEvent.PROGRESS, fileRef_progress);
fileRef.addEventListener(Event.COMPLETE, fileRef_complete);
[code].....
View 1 Replies
Aug 16, 2004
I trying to populate a combobox from a .php file and return the values of the selection. I have the .php set up to where it outputs something like
&artists=anartist,anartist2,anartist3, etc..they have names..I already have the combobox set up to where it displays
anartist
anartist2
anartist3
after you click the dropdown arrow..How would I get it to return a the numerical value for the artist (ex: anartist would be "0" since it is first in the list) and put it into a variable so that when it is selected it could be placed into an eval() function to create a variable such as "albumcover0" to be loaded through a function. I have been reading tutorials for hours to no avail.I want a single function to produce the number from the selected artist and place it into a variable, then go through all of the loadImage(for the "album image") etc functions..they will be functions that I have made already previously and call all of them with the number in the called fuctions (ex: loadImage(0)) where "0" is the number derived from the variable out of the combo box.Ive tried tons of tutorials, I think that it has something to do with me using flash mx 2004, and as2 turned on.
View 9 Replies
Nov 6, 2010
after archive and install procedure (osx 10.5.8 Intel) I see a blank File Info panel (Photoshop CS5 and all CS5 applications).. I must force exit, how could be solved?I have used it before archive and install procedure without trouble, should repair some permission about flash panels or someother??
I have same troubles with Illustrator, Fireworks and Indesign... only into File -> File Info panel, I have trouble also with "fast view" (space bar) into all FLV files, they cannot preview nothing, just i see a - com.adobe.flv.. The reason why panels did not work properly was a missing Flash trust file for that user location. Without such a trust file the embedded flash player refuses to "play" .. but what mean?? I dont understand this.
View 1 Replies
Feb 14, 2007
I have this java script and want it to work in a blank flash file when i open it in a html page.
[Code]...
View 14 Replies
Jan 11, 2011
I have just started using external AS3 files to try wean myself off using code in the main time line.I am importing an XML file using an external as3 file, but cant return the values to the main timelineIt worked when I used the trace option, but I need these values to dynamicly populate a movieclip on stage (another problem I cant add movie clip to stage even though I have the linkage etc)AS3 Code ----------------------------------
package com.teamSelection
{
import flash.display.DisplayObjectContainer;
[code].....
View 4 Replies
Oct 26, 2009
Can the clickTAG code in a flash banner be changed if you only have the .swf file and not the .fla file?
View 1 Replies
Sep 19, 2010
I have trouble passing a variable from HTML to Flash.I use swf-object2.2.how to code the variable in the html-file and how to receive it in the as-file?Its a simple shopId = 110
View 3 Replies
May 24, 2010
So I have this code which loads an xml file
[Code].....
I want to have several buttons however load a different xml file, not just use one file. Would this mean I would have to recreate the above code for every button, or is there anyway I could reuse it?
View 1 Replies
Aug 12, 2009
I need the main.asc file to return the current directory listing to a flash application.
[Code]...
View 1 Replies
Mar 1, 2011
I have one designign query in need the code of Swf file so first i need to convert it to fla then i need a script code of it.but didnt fine it on internet.
View 1 Replies
Oct 15, 2009
I have an xml file (externally saved) that is similar to the following:
[root]
[main]
[title]...[/title]
[Code]....
What I like to do is to get what's in [title] tag using HTTPservice, import it into Flex, and save it as array objects, and do the same thing for [content]. This way I can later refer the array object saying title[0] or content[2].
View 1 Replies