Flash Game Submit Score Problem
I need to modify the flash game Replay button as Submit button and to redirect to other page(gamescore.html) after clicking the Submit button. I am new to flash. I don't know how to modify the script. Please help me. Here is the total score display portion of the script where replay button is there:
//Set the total score
_totalScore = _distanceToCity + _distanceToCity * ((_obstacleCount - _obstacleHit)/_obstacleCount);
_retry.score_txt.text = _totalScore.toString();
_retry.distance_txt.selectable = false;
_retry.time_txt.selectable = false;
_retry.obstacles_txt.selectable = false;
_retry.obstaclesHit_txt.selectable = false;
_retry.score_txt.selectable = false;
_retry.buttonMode = true;
_retry.addEventListener(MouseEvent.MOUSE_UP, retry);
//Retry function, removes all platforms and reinitializes all the game's values
function retry(event:MouseEvent):void
try
event.currentTarget.removeEventListener(MouseEvent.MOUSE_UP, retry);
removeChild(MovieClip(event.currentTarget));
initialization();
catch(err:Error)
trace("catch error 1009 on retry");
i'm surprised score ever reaches 500 because _root.score and
score (in the context of that onEnterFrame handler are different.
anyway, try:
Similar Messages
-
Hello everyone,
I know this is a subject that gets covered a lot as i have found a ton of tutorials that show a million dfferent ways to create a high scores board on a flash game. So i decided to go out on a limb and pick a tutorial out to try. Well I have now tried 3 different ones and have yet to get a working high scores board with my game.
http://www.flashkit.com/tutorials/Games/How_to_c-Nick_Kuh-771/index.php
That is the link to the most recent attempts to creat my high scores board. When i finished everything the way the tutorial said it seemed like everything would work and then it just didnt. After spending oh about 40 plus hours trying to make a high scores board i am getting very frustrated. My game is scripted in AS2 and i have access to mysql and can set up unlimited databases.
Can anyone please help me by sending an easy to follow tutorial that will work with AS2? I would just like any kind of help right now as I feel ALL of my valid ideas have been ehausted. Thanks in advance to anyone that can help!
kapelskicOkay not a problem.
This is my code on the very first frame of the game that initializes the the highscores.php script
command = "init";
_root.loadVariables("highscores.php?"+int(Math.random()*100000), "POST");
This is the code that I have on a submit button, next to the input text box where the user enters their name for the scoreboard.
on (release) {
if(name ne ""){
command = "update";
_root.loadVariables("highscores.php?"+int(Math.random()*100000), "POST");
gotoAndStop ("highScores");
In every place the code says _root. I have also tried this. and neither of them work. I have also tried a million other things. So far the game plays through, goes to the game over screen where it asks for a user name and tells them their score. Then once they press submit the game goes to the highScores screen but the name and score are not there. The high scores screen cosists of 2 dynamic text fields one named "players" and one named "scores". I hope this helps because I spent another 5 or so hours after my initial posts trying more tutorials with still no luck. (the problem i am having is that i am new to flash, however not to PHP)
kapelskic -
How can i record a name a score in a flash game and write down in a soreboard?
Hi. I wrote down the summary of my project so that you can
understand and answer me more easily:
I have to build an application (a little flash game) in which
I record the number of clicks. I want the player to choose a nick
at the beginning and when he finishes one or all the four choices
of target, i want the application to write his nick and final score
in a database for displaying in a scoreboard (hall of fame). All
the new entries should be sorted according to the score. If the
same nick appears again, it's final score will be modified in the
scoreboard only if is higher then the previous.
I was thinking of creating a variable for the name that is
chosen at the beginning and a variable for the score that is
recorded. When the player finishes the game i want the application
to write his data in the database, and then to display the
scoreboard (let's say top 10 players in the database from the
highest to the lowest score).
I never did this before so i am asking what database shoud i
use? I need a programmer to create one for me? Or can flash
generate the database?
Is the variable the good way or should I aproach the problem
by other means? And if a programmer creates a database in MySql is
that good or he should convert it to XML, or Flash generates the
XML?
Thank you.
Mark this message as the answer.The bottom line is you cannot write to a file (database or
XML files) directly from flash.
I have done a number of projects where I needed to have
access to an XML source or a database. In these cases I had to
create server side script. I have done them in .NET, PHP ASP.
The only option you have is to use the Flash's Shared Object.
This does not store the data indefinatly and has a limited size
(100K). Let me know if you need further info.
With regards to using a variables depends on how you are
writing your game. If you are creating classes in ActionScript then
all the data can be stored within the class members. For example
you could have a Player Class and store all the player related
information in that class until the game is over. On the other hand
you can just use varibles to keep things simple. -
Flash games problem with Mozilla Firefox
Ok so, I'm trying to play one great flash game, I'm actually Texas hold'em addict :D so, as soon as I open it, firefox just crashes and that's it, nothing appears, no crash report or anything like that..
I'm trying to play this game: [http://www.4yahoo.com/board-card/play-governor-of-poker-2 Governor of Poker 2] and this one [http://www.4yahoo.com/puzzle/play-the-forest-temple The Forest Temple]
What to do? Should I reinstall it or it could be my windows problem?
I don't really want to re-install it, because I have tons of bookmars there and got no idea how to save them, also I'm afraid that it will be waste of time.
So I'm asking you guys, maybe someone faced this problem.
Thanks in advance.I mean, it's ok when I run other games, but those two are the problem :(
-
Please help me with a simple flash game problem
I am trying to learn how to make flash games with Adobe flash 5.5. I am doing a tutorial from a book and am stuck.
The game is called concentration and you are suppose to match 2 tiles of the same shape. there are 10 shape tiles
and 1 question mark tile. These tiles are held in an array. 20 tiles are suppose to be displayed 5 to a row with 4 rows
and the question mark is suppose to be up on all 20. My problem is I get a blank screen when I test the movie. I
think the code is good but I beleive I have not uploaded the tiles right. I did upload the 11 tiles to the library and have
those 11 tiles and tile_movieclip in the library. Here is the code:
package {
// importing classes
import flash.display.Sprite;
// end of importing classes
public class Main extends Sprite {
public function Main() {
// variables and constants
const NUMBER_OF_TILES:uint=20;
const TILES_PER_ROW:uint=5;
var tiles:Array=new Array();
var tile:tile_movieclip;
// end of variables and constants
// tiles creation loop
for (var i:uint=0; i<NUMBER_OF_TILES; i++) {
tiles.push(Math.floor(i/2));
trace("My tiles: "+tiles);
// end of tiles creation loop
// shuffling loop
var swap,tmp:uint;
for (i=NUMBER_OF_TILES-1; i>0; i--) {
swap=Math.floor(Math.random()*i);
tmp=tiles[i];
tiles[i]=tiles[swap];
tiles[swap]=tmp;
trace("My shuffled tiles: "+tiles);
// end of shuffling loop
// tile placing loop
for (i=0; i<NUMBER_OF_TILES; i++) {
tile=new tile_movieclip();
addChild(tile);
tile.cardType=tiles[i];
tile.x=5+(tile.width+5)*(i%TILES_PER_ROW);
tile.y=5+(tile.height+5)*(Math.floor(i/TILES_PER_ROW));
tile.gotoAndStop(NUMBER_OF_TILES/2+1);
// end of tile placing loop
Can someone please explain to me what I am suppose to do to make the this work? I beleive the problem is it doesnt know where the tiles are.
Thanks.To create the tiles, draw 10 distinct shapes in the first 10 frames of your symbol, and
the back of the tile in the 11th frame. You are free to draw them as you want, but I suggest you make them as 90 pixels squares with registration point (starting x and y position) at 0, because these are the properties of the tiles used in this chapter's
examples. At least, they should all be the same size.
It didnt say put in a library. It is saying to draw them in frames of symbol but it didnt walk me through that. Can you guide me through this? I also was looking at how to add the link identifier but it said I need a popup window but I cant see one. I thought that was done
when I went to insert new symbol. It said something about actionscript linkage. I am familliar with perl, java and c++ so I can follow the code so far but I dont have much understanding of the flash interface. I made the 10 shape tiles and the 1 question mark tile
in paint. They are .jpeg images. -
Flash games, serious problem with windows 7 bootcamp
when you open a webpage that has a flash game, windows 7 bootcamp stucks from time to time, with no reason! why is this happening? using firefox. tried safari the same thing, and tried latest flash player on both. try facebook games or google random flash games most of them cause windows 7 to stuck or go slow! suggestions please, does anyone else have the same problem?
sorry the whole win 7 freezee on mbp 13", wait for apple update (i hope they notice)! now running XP SP3 and runs great!!! "laptop 2 go drivers" and runs games perfect!
-
2 player web-based Flash game problem
I have a two player web-based Flash game. The Flash calls a
JavaScript function on the webpage to get and store the user's IP.
Then an XML file with user's game data is loaded and parsed. The IP
address is used to identify which player is player 1 and which is
player 2 according to the XML file. There is a Java applet to send
and receive messages between the players.
The first player loads everything just fine. All the first
player's messages regarding the progress in loading different parts
of the code sent by the game for debugging are displayed in the
Java applet's text box, but none of the second player's messages
sent by the game for debugging are displayed.
The problem is that the second player's ActionScript code
appears not to be executing except that I do get a message in the
game that the XML file attempted to load but was not successful.
The IP address call is not made and no messages can be sent to the
other player. The second player's Java applet displays only the
messages for debugging that came from the first player's game and
any chat messages sent by the first player.
This problem always happens to the second player, never to
the first player. Both player's are always using IE6 or IE7.
Does anyone have some idea(s) what could cause only the
second player's ActionScript code not to execute and/or not to load
an XML file correctly?
This is just a general question, so any general answers would
be appreciated. Code specific answers are hopefully not required.
Thank You in advance.Hi,
I am not very familiar with the multiplayer Game development. For multiplayer games, you'll need to set up a matchmaking server and have the clients connect to it. It can then pair them off and facilitate communications. If the clients have publicly available
network addresses then it can introduce them and they can talk directly to each other.There isn't anything built in for this so you'll need to either build your own or find a third party implementation. If you are using Unity3d then check out
http://docs.unity3d.com/Documentation/Components/net-MasterServer.html
Also, you can use Xbox services, and I find an article below:
https://msdn.microsoft.com/en-us/library/bb975801.aspx
For windows Azure problem, you should go to windows Azure forum.
Best Wishes!
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey. -
Hi, i have my iMac from 2008 and it's always work but for almost the lasy year youtube doesn't work. That's wasn't a problem but. right by now, everytime i tried to watch a video the mac start to freeze and i must close all the application which are working and, sometimes, i need to shut down the entire sistem. I tried to reset safari, delete chache and cookies, whatever...but nothing. What can i do?
P.S. Even the flash games, like facebook's games doesn't work...they are slow and sometimes they freeze all. Sorry for my englishPick and download the latest Flash Player for your OS.
-
Flash Game Problem Need Help! Action-Script 2.0
Im making a flash game its a sniper game btw and i am have a problem with after killing the target for it to go to the next frame. I have tried on(press) on(release) for buttons i hae tried lots of different stuff (1.3 hours of trying) and so i was wondering if you could help me out. and here the link to the download for the source .fla yes i uploaded it cuz i really need the help ! thanks for any help! http://fileape.com/?act=download&t=yz6Lhp0oDdAB-7whXWB62WIoACXMVgV7r1flbKy17aJZamyC-vXNFwx tZP6pwXV50NGk3XWK9anDa4m6tBfGEtPOZwKbuZFcaFyGyEGiYqeILdcvVuEZy3QVHX3xY6S170xapkdrZJN9lov4k hxeqJ4_S6aGRpNQWjTT3MhudPLa1ZBAi79CiPqX5kN835lD7vzAU0O6WJZaK6jZBROg2A,,
or
http://fileape.com/dl/2gI8YiSW9QGzIgAu
if the top one doesnt work (the top one shouldnt have a time wait)
Thanks for all help
also please if you can find the problem itd be nice to know what it isI will not download the .fla - maybe if you hosted the .swf I would view it.
to change frame use: gotoAndStop(<framenumber>);
(without the < >, just a number for the fram).
I recommend you use movieclips for buttons and place all code on the main timeline. For movieclips, give them an identifier name (bottom left int he properties box of the movieclip) then on the main timeline use:
movieclipName.onRelease = function(){
gotoAndStop(10);//change 10 to the frame you wish to go to. gotoAndPlay(10) plays from the frame. -
Problem with #D Flash games/animation
Hello. Ive got such problems that all 3d flash games are extremaly choppy oin my computer. Regular flash games works fine. It is not a problem with my hardware cause earlier the 3d games were working very good (even on the beta version of flash player with 3d support). any ideas how could I fix it? Thanks in advance
Please provide some basic information like
your operating system / version / edition
your web browser / version / edition
your Flash Player version
your display adapter & driver version -
I've posted in several forums looking for answers and have yet to receive a response. I've had this problem for over a year and I've yet to figure out the cause.
My problem: I have lag in flash games whenever I input a command (ie - push a key to do something in a game). The lag is a delay in the graphic update after inputing a command (ie - moving left in a game takes a second and then appears to "jump"...aka it's not smooth animation).
I've had this problem since I got my computer. Here's all the specs and software I'm using:
Mobile Core 2 Duo T7600G @ 2.33ghz
Nvidia Geforce Go 7950GTX Driver Version: 7.15.11.8520
4 gigs PC-5300 DDR2 memory
Windows Vista Ultimate SP1 all latest updates
Firefox version 3.5.1
Flash Version 10.0.22.87
I've done a fresh install of OS, Firefox, and Flash. All BIOS are update to date. I monitor CPU usage while playing flash games and the firefox process (firefox.exe) uses about 30% of the CPU so the game isn't exactly a workout for my computer. The games (or videos) runs like silk as long as I'm not imputing commands (ie playing the game). I've monitored CPU rating to insure CPU is not running at a reduced power mode during tests.
I defrag my HD regularly and update all other drivers as necessary. All anti-virus (avast) and anti-spyware (ad-aware and spybot) programs are up to date and scanning my computer regularly. I've set them on active and passive to test if they were the problem but they are surely not interferring (trust me I've tested extensively).
In conclusion: my computer work 100% great except for this problem and I have no idea what's wrong. I'm convinced it's just 1 setting that needs to be tweaked but I've yet to come across that tweak.
Any suggestions/help would be appreciated. Thanks!I forgot to add this is ALL flash games. When I say ALL I mean every single one I've ever playedr regardless of detail.
-
The problem of profiling a multi-thread flash game using adobe scout cc
I have a multi-thread flash game code, it can run perfectly. The main swf creates another swf which will connect to a remote server. I can get profiling information of the main swf using adobe scout cc, but the problem is that I can't get profiling information of another swf ! The scout complains " can't start a session because the telemetry data isn't valid" for another swf. Although some times, the scout does not complain, the Summary Panel of scout provides information“We encountered an error while processing this session: Some of the data we present may not be correct". And the scout log file shows:
Log file created: 2014/11/20 15:35:08
11/20/2014 15:35:08.395 Scout starting up.
11/20/2014 15:35:08.471 InitDNSService failed
11/20/2014 15:36:47.055 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [100000,200000] is greated than its parent
11/20/2014 15:36:47.057 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [200000,300000] is greated than its parent
11/20/2014 15:36:47.058 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [300000,400000] is greated than its parent
11/20/2014 15:36:47.058 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [400000,500000] is greated than its parent
11/20/2014 15:36:47.061 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [500000,600000] is greated than its parent
11/20/2014 15:36:47.062 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [600000,700000] is greated than its parent
11/20/2014 15:36:47.063 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [700000,800000] is greated than its parent
11/20/2014 15:36:47.063 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [800000,900000] is greated than its parent
11/20/2014 15:36:47.064 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [900000,1000000] is greated than its parent
11/20/2014 15:36:47.064 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [1000000,1100000] is greated than its parent
11/20/2014 15:36:47.064 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [1100000,1200000] is greated than its parent
11/20/2014 15:36:47.065 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [1200000,1300000] is greated than its parent
11/20/2014 15:36:47.065 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [1300000,1400000] is greated than its parent
11/20/2014 15:36:47.065 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [1400000,1500000] is greated than its parent
11/20/2014 15:36:47.066 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [1500000,1600000] is greated than its parent
11/20/2014 15:36:47.066 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [1600000,1700000] is greated than its parent
11/20/2014 15:36:47.066 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [1700000,1800000] is greated than its parent
11/20/2014 15:36:47.067 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [1800000,1900000] is greated than its parent
11/20/2014 15:36:47.067 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [1900000,2000000] is greated than its parent
11/20/2014 15:36:47.067 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [2000000,2100000] is greated than its parent
11/20/2014 15:36:47.068 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [2100000,2200000] is greated than its parent
11/20/2014 15:36:47.068 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [2200000,2300000] is greated than its parent
11/20/2014 15:36:47.068 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [2300000,2400000] is greated than its parent
11/20/2014 15:36:47.069 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [2400000,2500000] is greated than its parent
11/20/2014 15:36:47.069 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [2500000,2600000] is greated than its parent
11/20/2014 15:36:47.069 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [2600000,2700000] is greated than its parent
11/20/2014 15:36:47.070 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [2700000,2800000] is greated than its parent
11/20/2014 15:36:47.070 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [2800000,2900000] is greated than its parent
11/20/2014 15:36:47.070 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [2900000,3000000] is greated than its parent
11/20/2014 15:36:47.071 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [3000000,3100000] is greated than its parent
11/20/2014 15:36:47.071 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [3100000,3200000] is greated than its parent
11/20/2014 15:46:30.931 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [100000,200000] is greated than its parent
11/20/2014 15:46:30.933 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [200000,300000] is greated than its parent
11/20/2014 15:46:30.936 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [300000,400000] is greated than its parent
11/20/2014 15:46:30.937 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [400000,500000] is greated than its parent
11/20/2014 15:46:30.937 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [500000,600000] is greated than its parent
11/20/2014 15:46:30.937 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [600000,700000] is greated than its parent
11/20/2014 15:46:30.937 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [700000,800000] is greated than its parent
11/20/2014 15:46:30.938 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [800000,900000] is greated than its parent
11/20/2014 15:46:30.938 <2896> <telemetryCore.Query> <1> Incorrect data: Memory category 7 for frame stats query over time interval [900000,1000000] is greated than its parent
I run flash code directly on flash_player_11_7_sa.exe. I think the problem may have something to do with ActionScript Sampler of scout, because I can get the correct profiling information without ActionScript Sampler.
But I don't know what the information in the log file means.We are using Microsoft SQL Server 2008 . but it's well with MySQL & JBoss
-
Having problems running flash games
hello, I frequently play flash games on, what I consider to be, reputable websites; places like bored, 4v4, notdoppler, gamershood, and phyiscsgames24.
however some of these games do not work on my computer, they either; load, and I am unable to continue past a certain point (usually the title screen, or level select screen) because none of the button images respond to clicks); or they load an image, but there isn't anything that looks clickable in the flash; or they remain blank (or white) until I close them (~10 minutes after loading them). I've tried many of them in different browsers: Firefox (multiple versions), Google Chrome (multiple versions) and internet explorer (multiple versions) and if a game doesn't work in one of them it hasn't worked in the others either. as well as this problem has existed over multiple version updates of the player plugin. I've had this problem for years on Windows Vista Ultimate, and it's continuing in Windows 7 (same laptop, upgraded OS). I was successful in playing games on notdoppler on a different computer that ran old Internet explorer 6 and windows XP.
I talked with support on Notdoppler, and he said the games were working for him
how do I get these games to work for me, in all of my browsers?See:
Enabling Flash Player in Internet Explorer
and:
ActiveX Filtering in Internet Explorer -
I try to play this facebook/Zynga game every day, and I have no problem at first. After a little while though, it ends up crashing every time. I do not under stand why and would like to see if someone could help me, I am getting a bit angry. No other Zynga/facebook game has this problem, and they all use Adobe Flash.
Creative Cloud Help / Creative Cloud applications ask for serial number
http://helpx.adobe.com/creative-cloud/kb/ccm-prompt-serial-number.html -
Car Customization (Flash Game) Problem
I'm currently making a car customization flash game, i've already done the coloring part (while user click "Red", the car become "Red").
The problem is i want to add an animation before changing the color, eg: when user click "Red", a sprayer is going left to right, and the car become "Red" after that. So i make a movie clip named "Spray", and i got 5 labels "Red", "Green", "Yellow", "Orange", "Blue" in following order, i add the movie clip in every label, but it look weird because when user click "Red", it play the movie clip and become "Red", after that user click "Orange", the car will become "Black" (Black is default color of the car) when playing the movie clip. And user click "Green", it become "Black" again before changing to "Green". It always become default color when user choose other colors.
What i want is remain the car's color when user choose the other color, eg: when user choose "Red", it play the movie clip first, and become "Red", after that user choose "Orange", it play the movie clip and remain "Orange" color in the same time, after that it change to "Orange", and so on so forth.
Any solution for this? ThanksOk,i will describe the scene that i haven't make the "Spray" movie clip yet, so i won't confuse you. In the main scene, I got 1 movie clip, inside got few labels, as i mentioned before, "Red", "Green", "Yellow", "Orange", and "Blue" labels. Frame 1 contain a image, which is the black color's car image, the other labels contain different color of car image. So the sequence is Frame 1 is the black car, Frame 2 is the "Red" label, Frame 3 is the "Green" label, and continue until Frame 6.
I got another movie clip which is in the main scene, inside this movie clip is a menu and button, which contain different type of buttons that allow user change the color. It only have 1 Frame, and here is the AS:
var myCarArray = [Red, Green, Yellow, Orange, Blue];
for each (var Car in myCarArray) {
Car.addEventListener(MouseEvent.CLICK, onCarClick);
Car.buttonMode = true;
function onCarClick (event:MouseEvent):void {
MovieClip(parent).car_color.gotoAndStop(event.target.name);
So what should i do in order to archive the target that i want? I need to show some animation before changing the car's color.
Maybe you are looking for
-
My bookmarks are gone and i cant save new ones. how do i get them back
all my bookmarks and history for this month are gone. everything else works. just need my bookmarks back
-
Been having some pretty serious issues with the Messages app. Freezing/crashing. Messages sent from desktop not appearing on phone. Etc. Tried to close app and soft reset phone. Still no luck. Anyone else? :/ Thanks! iPhone 5s
-
when we create expense PO, the user wrongly input wrong cost center, after goods receipt, we realize that wrong cost center is entered during po, the number of affected PO is over 50, and some even finished invoice vorification., how to reallocate to
-
Preflight for index color help
Hi, our RGB to CMYK conversion process does not like greyscale images in indexed colour mode, which is the way Quark converts them in it's PDFing process. Customer can't convert to ID, so I'd really like to create a Preflight Profile to provide them
-
My phone goes right to voicemail, does not ring?
My phone does not ring and goes straight to voicemail