472,334 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,334 software developers and data experts.

I unload a flash file...but key presses from previous file are still active

My problem is that I'm wrestling to make the LoadMovie and UnloadMovie functions work for me. Here is the layout of my flash file: I've got several seperate flash files and I can jump to any one of them by pressing a specific key to load another flash file. Here is the code I'm using for this bit:

keylistener = new Object();
keylistener.onKeyDown = function() {
if (Key.getAscii() == 51)
loadMovie("tap.swf", "_level1");
};
Key.addListener(keylistener);
Now when the next flash file is loaded, I use this bit of code to get rid of the previous flash file.

unloadMovie("_level0");
Now this does work in getting rid of the previous flash file in a visual sense; it dissapears, but the code still remains active. See, I have several other keypress functions in each flash file, so I need to disable/remove/unload the programmed keypresses of the previous scene. Because at the moment I'm getting stuff like this: I'll press a key and move from flash file "tip" to flash file "top," but then I press the Q key, which is meant to make a character pop up in the flash file "top," but it ends up taking me back to the flash file "tip," because that also has coding attached to the Q key.

Phew, hopes this makes sense. I've found out that people can get around this problem when working with buttons and making the buttons disabled...but can you do a similar thing with key presses? Is there perhaps another way to open flash files in the time line other than the LoadMovie code?

Oh, and I'm working in Flash MX Professional 2004

Cheers,
Kyle
Sep 15 '07 #1
1 2328
All is well, I found a solution on another forum!
Odd, but it seems that unloadMovie("_level1"); has problems that unloadMovieNum(1); doesn't.
Although it seems I have to be careful not to unload level 0 - if you unload that everything dissapears!
Sep 16 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: jack belue | last post by:
HI all. I am a beginner with visual basic having had a couple college courses is all. I am wanting to do some annimation with flash and...
40
by: googler | last post by:
I'm trying to read from an input text file and print it out. I can do this by reading each character, but I want to implement it in a more...
1
by: Mariella Bakker | last post by:
Hi All, In an ASP.NET project I am trying to improve performance. As it is now there seems to be a huge bottleneck between the end of the...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to...
0
by: fblake | last post by:
Active Flash V1.0 http://www.activeup.com/products/components/activeflash Price - $295 Evaluation -...
11
by: Timofmars | last post by:
I'm try to Unload DB2 data from a table into a record sequential file on NT. I can an unload on Mainframe, but it doesn't seem to be an option in...
3
by: bdbeames | last post by:
I have a menu on the right side of my page and a flash object in the center. When a certain option in the menu is select a sub menu pops and floats...
1
by: Sura | last post by:
Hi I have a flash interactive window which has html links and this appears on an html page. This window can be moved with the mouse on the html...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.