473,472 Members | 2,143 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to change a as2 quit button .as file

1 New Member
Hello, I am working in someone else's code that no longer works at our company, I am not a coder, and have been doing research to change his coding so that I can close the swf file loaded into a browser window. Can anyone help? I am very lost! thank you!!

This is what is currently in the .as file:

1st appearance of btn in code:
Expand|Select|Wrap|Line Numbers
  1. function startGame():Void
  2. {
  3.     clearContainer();
  4.     createContent(0, 0, 100, 10, "bg_main");                //create main bg at layer 10
  5.     createContent(655, 54, 100, 20, "carl2_"+area);            //create carl at layer 20
  6.     createMask();                                            //create carl mask at layer 30
  7.     createContent(20, 10, 100, 40, "title2_"+area);            //create title at layer 40
  8.     createHintText(termArr[termIndex]);                        //create hint text at layer 50
  9.     createContent(27, 380, 100, 60, "pc");                    //create pc at layer 60
  10.     createKeyborad();                                        //create key board at layer 70
  11.     createContent(818, 250, 100, 80, "feedback");            //create feedback at layer 80
  12.     createButtonNext();
  13.     createButtonSolve();
  14.     createDisplay(termArr[termIndex]);
  15.     createTryText(termArr[termIndex].times);
  16.     createButtonQuit();
  17. }
  18.  
  19. function createButtonQuit():Void 
  20. {
  21.     createContent(917, 40, 100, 130, "btn_quit");
  22.  
  23.     container.btn_quit.onRelease = function(){ 
  24.         playSound("click");
  25.         unloadMovieNum(loadLevel);
  26.     }
  27. }
  28.  
  29. //functions for creating ending page
  30. function endingPage():Void 
  31. {
  32.     clearContainer();
  33.     createContent(0, 0, 100, 10, "bg_main");                //create main bg at layer 10
  34.     createContent(90, 100, 100, 20, "text_end");            //create ending text at layer 20
  35.     createContent(20, 10, 100, 40, "title2_"+area);            //create title at layer 40
  36.     createContent(480, 80, 100, 60, "carl1_"+area);            //create intro Carl at layer 60
  37.     createButtonAgain();    //depth 70
  38.     createButtonQuit();
  39. }
Thank you for any help you can offer!! I really appreciate it!
May 23 '13 #1
0 1532

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

Similar topics

3
by: Mel | last post by:
Hi, Is there any way I can force to change button background colour when toggle button is checked? Just like button change its background colour when mouseover in MS Visual Studio.NET. I hope I...
4
by: acord | last post by:
Hi, I want to change the name of Browse to Add... How can I modify the followoing html code? <form name="iform" action="" method="post" enctype="multipart/form-data"> <input id="file"...
0
by: james.dixon | last post by:
Hi I have been having a bit of a look at the Microsoft Logging Application Block (using .NET 1.1). I found it easy to get going, but now have struck a bit of a brick wall. I want to...
11
by: GaryDean | last post by:
We created a "File" website on XP and transferred it over to server2003. Now we want to change it to an HTTP site. Without creating a new project and importing everthing, it there a way to convert...
2
by: Rinaldo | last post by:
How to change the button text of a openfiledialog in to my own custum test?
1
by: SoNew | last post by:
I have designed a database and have used the following code to disable the standard Microsoft close button. I want my users to have to click on a Quit button on the switchboard: Private Sub...
2
by: SoNew | last post by:
I have designed a database and have used the following code to disable the standard Microsoft close button. I want my users to have to click on a Quit button on the switchboard: Private Sub...
4
by: olduncleamos | last post by:
I am trying to share one config file between multiple console apps. Is there anyway I can set the config file name for the current application? Thanks in advance.
3
by: reddevils2020 | last post by:
Hi everyone! How we can change the end of binary files?for example we have a file contains 6 recorde and each recorde is 10 byte(size of file is 60byte).I want to delete the last recorde,I want to...
7
Fary4u
by: Fary4u | last post by:
how can i change radio button into image but functionality should be like radio button ? .pic { background:url(pic.jpg) no-repeat; } <input type=radio src=pic.jpg value=1 name=1> or <input...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
1
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.