473,401 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 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 2381
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 intergrate/include it in a visual basic application(not a web...
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 efficient way. So I thought my program should read one...
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 Page.PreRender event and the beginning 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 /usr/local/php. However, when I set my "error_reporting"...
0
by: fblake | last post by:
Active Flash V1.0 http://www.activeup.com/products/components/activeflash Price - $295 Evaluation - http://dl.filekicker.com/send/file/184524-5045/ActiveFlash1.zip
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 NT. In NT, all I can do is export/import. I can...
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 left. The problem is, depending on the browser...
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 page. The html page has an iFrame too. When the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.