ActionScript 3.0 :: Whack A Mole Game (Object Show Up Then Disappear)
Feb 26, 2010
I'm doing a game like whack a mole but I'll do it as easy as I can. I'll use only mouse to click on the object, then get 1 point. And I want the object/figure show up by random and then disappear like whack a mole. I could make it shows up and then disappear but my problem is I can't stop it and I don't know what function I should use for counting point when I click on the object.
I am creating a whack a mole game in Flash CS5 AS 3.I have nine instances of the same movie clip that I am trying to make appear randomly as the "mole". So far I have the following script:
var girlarray:Array = new Array(); girlarray[0] = instanceofhole1; girlarray[1] = instanceofhole2;[code]............
I have created a flash whack-a-mole game, and coded the 9 different x and y cordinates the 4 moles can come up on. But I can't code it so that the moles can never have the same x and y cordinates.I have tried this code: (Barney and mulvarp is two moles. .flytt(); is the command that gives the mole a new place to be.[code]I got an advice on maybe using this and call returnFourPositionsF(); but I am unsure on how to put all the moles into one, since they all have different timers, and I don't want them to change position even tho only one is changing. [code]
I found a tutorial on the internet and have begun toying with it. I figured out what all the segments did and how they worked and effected the game (mostly through trial and error...) once i figured out what EXACTLY i had i started making changes.
-What i want - once the bullet hits a monster OR goes out side of the range of the gun it disappears and another shot can be fired (which is done automatically via my script no user input needed)
-What i have - when the bullet goes off the page (x>550, x<0, Y>400, Y<0) it disappears and another shot can be fired... obviously this is problematic to game play...
-What i want - once the bullet hits a monster OR goes out side of the range of the gun it disappears and another shot can be fired (which is done automatically via my script no user input needed)
-What i have - when the bullet goes off the page (x>550, x<0, Y>400, Y<0) it disappears and another shot can be fired... obviously this is problematic to game play...
I'm running into an error 1009 on a script that I've been working on. What I'm trying to do is attach a preloader Movie Clip that I have in my library with a class name of preloader, to an empty Movie Clip called preloaderMC and position that on a set of loaded thumbnail images. I can get the code to show one preloader and it will track the total of all the images being loaded, not single images. Ideally, I'd like the preloaders to show the amount loaded for each image and then disappear.
I am a learner. I am using one object which animates from a corner and comes to the middle of the stage (Using Motion Tween for animation). What I need is when it comes to the middle of the stage it should disappear from the stage. How it is possible?
I could use some help on a bit of code for a shooter game I'm working on. I have enemy objects that appear on screen or move around on screen and I need help with code so that when you click on the object is disappears from the screen.
So, here is what I'm trying to do. I have a page full of characters for a project I'm working on now, and I want to add some interactivity to the page by making each of the characters clickable and having a description of the character pop up that you can then close. I have included 3 images of what I'd ideally like tohappen.Picture 1: The page in just a normal state, nothing happening.Picture 2: On rollover, I would like the character to pop out and enlarge.I know how to make it enlarge on rollover, but I don't understand how you would make it come to the front above other layers. with understanding how to do.
Picture 3: I want a description like this to pop up when you click on the character. I have a layer at 50% opacity to fade the background out as well. I need to know how to:1. Make this image show up when you click on the respective character.2. Make this image disappear when you click on the red X button at the top right
I have a rectangle drawn on the screen. I exported the center of the rectangle for action script. I have an instance of the center exported rectangle overlaying my main rectangle. I do this so that I can change the back color with actionscript. I have the blending property of the overlaying rectangle set to overlay so that borders of my original rectangle are visible.
My problem is when I scale the flash window the borders of my rectangle sometimes dissappear.
I have a grid of objects that have been added to the stage dynamically, the objects are either of a Class Red or Class Blue, how do I perform a hit test on the Classes? I want the Blue object to disappear once it hits a Red one.
I'm not real sure what I'm doing wrong, but once the array is validated the movie should go to the next frame(3)--which it does however my objects disappear. The AS below is in the actions frame 2. The objects span from frame 2 to frame 3, so I'm not real sure why they'd disappear.
I want the cursor to disappear when it rolls over an object, then reappear when it rolls off. It works when I run it in Flash, it works when I view the html in Internet Explorer, it DOESN'T work in Netscape. The cursor disappears and doesn't come back till you move it out of the navigator window. Here's the code:
on (rollOver) { loadMovie("movie.swf", place); mouse.hide(); } on (rollOut) { loadMovie("blank_movie.swf", place); mouse.show(); }
I am trying to implement the following control on a movieclip object. When the mouse pointer is over the object and if the left mouse button is clicked and stays clicked then a mask that overlaps the movieclip object is starting to disappear. I tried the MouseEvent.DOWN, etc but I did not succeed to implement this functionality. Probably i miss something. Can I achieve this through standard mouse events types or do i have to implement it another way? Also is it possible instead to fade out the mask by reducing the alpha attribute, to actually make disappear the pixel(s) that under the mouse pointer ?
I'm currently working on a game that has multiple 'scenes' located on each frame. In one scene, if you click on an object it disappears. I did this using the visible = false method. However, anytime you return the scene after, the object is visible again. How would I write the code so that it stays invisible permanently when you click it, regardless of whether or not you leave and later return to the scene?
I'm using Flash and AS3 to write an app for iOS and for Android and I'm saving XML-data using shared objects. Now it struck me that when I supply an update to the app store and the user updates the app, will the shared objects remain intact or will they be replaced? I'd very much like them to remain as they were.
I've just finished using this bit of simple code to get an object to move around randomly. What I want to do is try and get it to disapear or move off the stage after say a minute (with a countdown clock in the corner starting from a minute and counting down).
I need to create a score board for a game show at work for staff. The score board must keep score on the left and right parts of the screen. score must start as default on 0. Then every time I press for example the left arrow key the left score must increase by the value of 1 and when I press the right arrow key the left score must decrease by 1.Same goes for the right score only with differant keys example up and down keys. This sounds very simple and I managed to get it to work when I tested with only 1 score, but failed when adding the second score to the picture.
a) A full moon is there on the screen in which Name and Password field is there. b)The movement the user types his name and password and after pressing enter the moon should fade for some other animation.
Is action script needed for this?.
Am just a sort of general flash animator I don't know how to do things differently.
The animation further should continue where a steel door should open, two velvet ropes should be pulled aside which will make the bookcase wall swivels around to reveal the next animation
how to achieve point a and b.I will try pondering the rest on opening the steel door and pulling the velvet ropes that swivels the bookcase and goes to reveal another animation....
I've developed a game that records how long it took to complete the game. At the end of the game it shows the user how long it too to complete. I want to be able display message to the user depending on how quickly they took to complete the game. I have set up a dynamic text box called "message" that will display the message, but I am struggling to figure out the syntax for :
If gametime is less than 60 secs then message = "well done thats very quick" If gametime is between 60 and 80 secs then message = "Not bad at all" If gametime is between 81 and 100 secs then message = "Its good but not good enough" If gametime is between 101 and 120 secs then message = "You can do better than that!" If gametime is between 121 and 140 secs then message = "Too slow, you need to practice" If gametime is greater than 140 then message = "Did you fall asleep?"
I have a game with multiple levels, which is working as I want it to. I would like to add just one extra bit of functionality. As each level starts, I would like a movieclip to play and then disappear after a second or so. The movieclip will just say "level 1", "level 2" etc, without any interaction. Ideally it will appear as the level loads, and then fade out to disappear.
how can i change this as3 code with hex editing to make this game always show HEADs (or tail ) and be winner its game to bet and u should choose head or tail , and if u guess rite u get money ,if not u lost money i want to always answer be head( or tail) .as file attached.
I have a button that triggers the function addToBet on a card game and doesn't allow the textfileds to show any larger number but I can't top the clips with the coins I'm trying to attach. The function showBet keeps running.
i'm currently using hitTestObject and it kinda sucks, my object doesnt get very close the the second object but the game "thinks" it does. is there a better hit detection?
I have an object of a white cross on top of a mountain. I want my mouse to move over it and make it disappear and when my mouse moves away from it I want it to re-appear. So far I can make it disappear by moving my mouse over it, but then it will not re-appear. Here is the code I'm working on: CROSS1933_mc.addEventListener(MouseEvent.MOUSE_MOVE, mouseMOVE); // MOVE MOUSE OVER CROSS function mouseMOVE(event:MouseEvent):void { CROSS1933_mc.alpha = 0; } How do I make the Cross re-appear?
I am currently making a game. The user drags back the fish and then lets go when it gets to the desired force and angle. If it hits the penguin it disappears however i want it to rebound off the iceberg so it can bounce off and hit the penguin. However it just disappears i've tried everything and i cant work it out.
I have tried many different emethods of embedding the .swf object in the website I am currently working on. I have use the code from the publish option which didn't work at all.I also tried the SWFObject javascript thing, and that worked, but It wouldn't auto play and there wasn't anyway to set it. So far all the code I have tried works in Opera 9/10 and IE7/8, but not in firefox or chrome.[code]