473,385 Members | 1,492 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,385 software developers and data experts.

ActionScript for Flash Lite 2.0 problem!

Hi.. I am currently developing an Infotainment application for my school project on mobile applications. My problem is, from my main menu i have 3 buttons each supposing to link to 3 different pages. however, when i do the coding for one of the buttons, i realized that when testing on the device, all 3 buttons go to that particular page which is wrong. And if I am to do the coding for the 2nd button, den everything will take the state of this 2nd button. All buttons links to the page of the 2nd button when pressed. I understand there's a need to implement if else statement but I am unsure how.

Expand|Select|Wrap|Line Numbers
  1.  
  2. stop ();
  3. _focusrect = true;
  4. fscommand2 ("SetSoftKeys", "Select", "Exit");
  5. fscommand2 ("SetQuality", "high");
  6. fscommand2 ("Fullscreen", "true");
  7.  
  8. var location_so:SharedObject;
  9.  
  10. if (selectedItem == null)
  11. {
  12.     Selection.setFocus (egypt_btn);
  13. }
  14. else
  15. {
  16.     Selection.setFocus (selectedItem);
  17. }
  18. egypt_btn.onPress = function ()
  19. {
  20.     selectedItem = this;
  21.     gotoAndStop ("egypt");
  22. };
  23. england_btn.onPress = function ()
  24. {
  25.     selectedItem = this;
  26.     gotoAndStop ("england");
  27. };
  28. russia_btn.onPress = function ()
  29. {
  30.     selectedItem = this;
  31.     gotoAndStop ("russia");
  32. };
  33. Key.removeListener(myListener);
  34.  
  35. var myListener:Object = new Object();
  36. myListener.onKeyDown = function()
  37. {
  38.     var keyCode = Key.getCode();
  39.     if(keyCode == ExtendedKey.SOFT1)
  40.     {
  41.         gotoAndStop("egypt");
  42.     }
  43.     else if(keyCode == ExtendedKey.SOFT2)
  44.     {
  45.         gotoAndStop("home");
  46.     }
  47. };
  48. Key.addListener(myListener);
  49.  
  50.  
Please help me.. its urgent.. as my project is due very soon.. thanks so much..
Jul 14 '07 #1
0 1406

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

Similar topics

0
by: Matt | last post by:
Hello, I am attempting to get a software prototype UI/demo built in Flash to talk with existing C++ (so I can exchange data and commands between the application-software already developed in the...
1
by: Nexus | last post by:
I've heard people saying that it can be done (Integrating Flash actionscript into ASP .Net apps ???) - does anyone have a lead on where I might find a coding sample or additional info
1
by: paolazi | last post by:
HI I have a flash templates..that uses php as well now I have a problem with my contact page as follows: the user enter his name, email and message into flash input whose Var are: your_name,...
1
by: karin nguyen | last post by:
Hi, i am a new user for flash / actionscript. Now our lecturer asked us to do research for actionscript together with the flash file as example but I only can find the actionscript without flash...
3
by: paolazi | last post by:
Hello I have a problem: I have a database(mysql) with the following fields: test, descr, title I want to display them into a flash file. Now my php file called list.php (which collect the...
1
by: itsthefocusman | last post by:
Hi everyone my name is Daniel, I would like some help. I am using Flash 8 to build a website. I have built the whole site within one flash movie by building the different sections of the site...
1
by: Adam Chapman | last post by:
Hello, I am trying to make an application with a flash interface which does calcultaions in the more powerful c++. Basically I want to be able to draw a shape in flash and do some structural...
1
by: deluxmilkman | last post by:
What is the major difference between Flash 5 actionscript and Flash 6 actionscript ? I am trying to downgrade Flash 6 site to Flash 5. It doesn't give me error, but it's not working. Thanks
4
nathj
by: nathj | last post by:
Hi, Well the title of the thread is the question. I have tried searching for this and after several days of getting nowhere with it I decided I would ask. So here's the deal. I am using Flash...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.