Flash :: Movieclips Whack-a-mole Different Cords On Moles

Feb 4, 2011

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]

View 1 Replies


Similar Posts:


AS3 :: Whack A Mole Game, Random MC Generator?

Oct 30, 2010

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]............

View 2 Replies

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.

View 1 Replies

ActionScript 2.0 :: Checking Mc's Based On X And Y Cords

Feb 14, 2005

I have a series of mc's that are in a grid position and another set on top. I want to move the ones on top to different positions over the others but I want to check to see if one is already there. I dont' want to use hitTest, it doesn't work for what I want to do. I want to position my top mc's base on the x and y positions of the bottom mc's. How do I check a mc for a value if all my names start the same, i.e. mc_ and end in numbers that represent their position, i.e. mc_12070. I was thinking something like:

newY = this._y - 50;
newX = this._x;

but how would I call the clip?

_root.mc_+newY+newX

what is the syntax to make that work?

View 1 Replies

ActionScript 2.0 :: Checking Mc's Based On X And Y Cords?

Feb 14, 2005

I have a series of mc's that are in a grid position and another set on top. I want to move the ones on top to different positions over the others but I want to check to see if one is already there. I dont' want to use hitTest, it doesn't work for what I want to do. I want to position my top mc's base on the x and y positions of the bottom mc's. How do I check a mc for a value if all my names start the same, i.e. mc_ and end in numbers that represent their position, i.e. mc_12070. I was thinking something like:

newY = this._y - 50;
newX = this._x;

but how would I call the clip?_root.mc_+newY+newXwhat is the syntax to make that work?

View 1 Replies

ActionScript 2.0 :: Mouse Cords Detection Without OnClipEvent?

Jun 21, 2006

I have an application where I need to detect if the mouse is less than 200 px from the left sie of the screen, then play an animation... Once the mouse is moved back out of the 200 px area I want the animation to reverse.I'm using the Tween Class for animation and have been messing around with onclipevents with no luck like:

onClipEvent (enterFrame) {
if(_xmouse <= 200)
{
_root.theSwitch = "on";

[code]....

This will obviously produce a million "on" traces when the mouse is over there - what is the best method for detecting the change once, setting a variable, then playing the animation?

View 1 Replies

Arrays :: Saving X And Y Cords As Variables On Mouse Click?

Jan 7, 2012

I have a piece of code worked out that creates circles on a mouseDown function. I'm trying to save the x and y cords of the circles but cannot figure out a way around this. I need to save multiple instances of the cords from mouseDown.

Is it possible to do this in an array?

var posOne:Number;
//var posTwo:Number;
//var posThree:Number;

[Code]....

View 2 Replies

Arrays :: Get Evenly Spaced X / Y Cords From Given Size And Required Amount

Nov 8, 2011

I'm working in Actionscript 3, but this is pretty general.I'd like to make a simple function that I can call, e.g. GiveCords(Width, Height, Num) that will take a width and height, map that out and using the Num variable place the given amount evenly across the space.Say I give it a value of 500, 500, 1. I'd expect it to return an X, Y position of 250, 250.But I'd like it to return an array of given points with X, Y.So If I gave it 10 points, it would find the best position for them all to be of even distance apart from each other.

View 1 Replies

ActionScript 2.0 :: Load Movie Doesn't Work - Keep Orig - Cords [MX]

Aug 13, 2004

[MX] I'm loading an infinitly scrolling swf into my main swf. When it loads however it doesn't work properly, because all the pixel values in the origonal code do not match for its location in the main movie. I know I can change the AS with new value and make it work, but I am wondering if there is another way. I'd like to be able to move it around and always have it work without changing it. Is there a way I can have the loaded swf retain its OWN origonal x,y cords? or some other method of doing this?

View 2 Replies

ActionScript 3.0 :: PostImage - Mouse Over Display / Change Image In X - Y Cords Or Replace Image

Aug 2, 2009

im messing with a movieclip symbol and i want to make a button, what'd i mean on Mouse over display/change this image in this X,Y cords or replace this image, something close to what buttonSymbol does but i want to make it using movieClip symbol...
and i have no idea how to do it.. i started like this:

[Code]....

View 0 Replies

Flash :: Accessing Movieclips In Movieclips?

Jul 30, 2010

I am starting with AS3 programming icm with Flash Builder 4.I have created a "Main" class which is the initial stage.On this stage there is a movieclip called mcMain.In this mcMain is 4 other movieclips: mcStats1 mcStats2 mcStats3 mcStats4 .How can I access these mcStats1-4 from the code to make them go to another frame?I tried:

var t:MovieClip = MovieClip(getChildByName("mcMain"));
t.getChildByName("mcStats1").gotoAndPlay(3);

But that just keeps giving me null reference errors:TypeError: Error #1009: Cannot access a property or method of a null object reference.

View 4 Replies

ActionScript 3.0 :: Comunicating Between Loaded Child Movieclips And Parent Holder Movieclips?

Aug 6, 2010

I m trying to make sense of how to load a swf into a parent MovieClip and allow them to communicate.I ve attached two zip files � one which works fine and the other doesn�t. Unfortunately (for me), the one which doesn�t work is closer to my current project.I need to load movieclips into the parent movieclip. The parent movieclip has controls which rely on values parsed from the child movieclip.In the parent movieclips I wait until the loading is complete and so the values should be passed. However, the values aren�t passed unless I use a button (or timer), to pass the values (see the working exampes).The code which doesn�t work is:

Parent movieclip:

ActionScript Code:
stop();
var myLoader:Loader = new Loader();[code].............

View 5 Replies

ActionScript 3.0 :: Cross Using Of MovieClips And Externally Constructed MovieClips In 2 SWF-Files?

Dec 19, 2009

I have two SWF-Movies. One is exported into eht other as Child.Can I instance the Objects of the two libraries in all places, where ActionScript is possible? (In Keyframes of the MovieClips and in external class definitions.)

View 3 Replies

ActionScript 3.0 :: Stop All Movieclips On Stage And It's Nested Movieclips?

Sep 9, 2011

Looking for a way to stop all movieclips both are the stage and that are children of the ones on the stage.
 
I toyed with looping thru stage's children so I can first target clips on the stage. But I am getting error.
 
for (var i:int = 0; i < this.numChildren; i++)     if (this.getChildAt(i) is MovieClip)
{
this.getChildAt(i).stop
}}

View 5 Replies

ActionScript 3.0 :: Treat 5 Movieclips In Each Row As A Group Of Movieclips?

Feb 5, 2009

I have created 25 MovieClips on the stage in 5 X 5 matrix.How can I treat 5 movieclips in each row as a group of movieclips so that I can apply same set action to them?(Similar to RadioButton functionality. )

View 6 Replies

ActionScript 3.0 :: Printing Movieclips With Movieclips Inside?

Sep 15, 2010

Printing an MC is easy enough. But I am having trouble printing an MC which has multiple MCs inside of it. They just don't get printed.
 
I am trying to avoid printAsBitmap.

View 5 Replies

Professional :: Testing Movieclips That Have Nested Movieclips?

Oct 21, 2010

I want to test mc animations without having to hit F12 to see if they work correctly. For instance, if I have an animation movieclip and then I make another movieclip and drop that aforementioned movieclip within, and animate [via the timeline or library preview] I'm unable to see on-the-fly what my animation looks like... it only shows the top most nest, unless I F12 it.

So if I have a character blinking eyes (one movieclip) and then I create another movie clip of the face, and put that aforementioned movieclip within, the preview animation within the library does not show how it'll be viewed when F12'n it.,,,, it'd be great to see your animations on the fly.

View 1 Replies

ActionScript 2.0 :: Why Do Movieclips Inside Movieclips Have Different _x And _y Than The Timeline

Oct 30, 2007

why does a MC inside another MC have different _x and _y values than the main timeline?What I am trying to do right now is animate a MC inside another MC then get the main MC holding everything to move where that new MC ended animating at (it's part of a game I'm making.)

I know it's confusing but Flash shows the cursors current X and Y in the info panel, which is the same as the main timeline. Yet inside the movieclip, an x of 76 and a y of 277 on the timeline is -195 and -30.9 (respectively) inside the MC.How do I fix it so I can get the _x and _y values to match up so I can tell the main MC to reposition itself to the new X and Y (of the inside MC)

View 1 Replies

ActionScript 2.0 :: MovieClips Inside Other MovieClips - Detecting All

Mar 27, 2008

I have a movieclip called mapWindow, inside mapWindow are dynamically created movieclips of various sizes. The movieclips inside the mapWindow don't take up the entire space of the mapWindow and thus I use a startDrag on the mapWindow upon detection of a mouse press. The problem is, I don't want the start drag to start if the mouse is detected over any of the child movieclips inside mapWindow.

I have a few ideas of how to proceed, but I'm not sure how to reference all child movieclips of a particular movieclip - or something along those lines.

It would be easy to use the hittest function if I knew how to reference all the movieclips I need to, but alas...

View 1 Replies

ActionScript 3.0 :: Controlling MovieClips Using Other MovieClips

Nov 20, 2009

Using Flash CS4 - AS 3.0

how to control a movie clip using a separate movie clip.

on scene 1 (2 frames long), i have 2 movie clips.

-bFind (24 frames long)

-textEffects (14 frames long)

i want to jump to frame 7 of the textEffect movieClip when i hover over bFind

i have my AS code in the first frame of the movieClip called "Bfind"

Code:
stop();
addEventListener(
MouseEvent.MOUSE_OVER,

[Code].....

View 5 Replies

MX04 With Movieclips Controlling Other Movieclips

May 5, 2010

I'm using flash MX 2004 Professional. What im trying to is the following: I have 9 movie clips, each has a "closed" and "open" state. Basically, when I click no.1 I want it to animate open, and then, when I click no.2, it must first check if any of the other clips are in their "open" state and if so, close them. I've worked with the following, but it doesnt seem to be working:

[Code]...

View 4 Replies

ActionScript 3.0 :: Accessing Movieclips Within Other Movieclips?

Oct 5, 2008

I am still transfering from AS2 to AS3 and right now i am having a very annoying problem. THE STRUCTURE:
Maintimeline contains 2 buttons that i want to use to access children in a bunch of movieclips. rectangle_mc has circle_mc circle_mc contains xx_mc xx_mc contains wtf_mc placed on frame 1 on maintimeline Why can't flash see my nested movieclips? I remember in AS2 you could go down the line:

[Code]...

View 15 Replies

ActionScript 3.0 :: Can't Control Movieclips Within Movieclips

Nov 17, 2010

I used to work in AS2 and something like this worked:

mc1.mc2.onRelease = function () {
mc3.gotoAndStop(2);
}

But converting it to AS3, it doesn't work anymore.

function goMC (e:MouseEvent):void {
mc3.gotoAndStop(2);
}
mc1.mc2.addEventListener(MouseEvent.CLICK, goMC);

What am I doing wrong? I can't seem to control movieclips within movieclips.

View 2 Replies

Flash :: Converting MovieClips In A Fla To Bmp?

Oct 15, 2009

I have a game that I made in flash, and now I want to take all the movieclips I have and export the images into something that I can use outside of flash. What would be the easiest way to do this? I would rather not use screenshots, plus, I need to keep the transparency.

View 2 Replies

Using External Movieclips In Flash CS4?

Jan 22, 2010

I'm building a Flash CS4 application (AS3) and I can't keep all my movie clips in the library because there will be hundreds of them, and new ones will be added all the time. Two parts to the question:How can I externally load in a movieclip to use during run time? After loading I still need to be able to manipulate it as if I created a new instance of it from the internal library.

View 2 Replies

Flash :: 2 MovieClips With The Same Instance Name

Jan 27, 2012

I have 2 copys of the same Movieclip on the timeline and I need them both to do the exact same thing, so I figured I'd give them the same instance name.

I have an event listener on the stage that listens for a mouse click and then checks what has been clicked usiing a switch statment, but the switch statment only picks up one instance of the movieclip, the other one comes up as the default.

Mainly what i'm asking is, is it possible to have to movieclips on the timeline with the same instance name?

public function Main() {
stage.addEventListener(MouseEvent.CLICK, doStuff);
}
public function doStuff(e:MouseEvent):void {

[Code]....

View 2 Replies

Flash :: Check If Two MovieClips Are The Same?

Feb 10, 2012

I'm trying to check wether two MovieClips are of the same kind or not. I have a collection of MovieClips stored in a dictionary, I'm then iterating over the entries and comparing each MovieClip with a MovieClip passed into the function. The problem is, it doesn't work. Neither does (==).

[Code]...

View 2 Replies

IDE :: [Flash CS5.5 / Air 2.6] Movieclips Not Showing When .air App Is Run On Mac?

Jan 6, 2012

I created an application in Flash CS5.5 using Adobe Air 2.6. When I test the app on my computer (where it was written) everything works fine. When I publish the application and run the .AIR on my computer everything works fine as well. The issues comes about when I attempt to install and run my AIR application on a Mac operating system. In this case when the application runs some graphics are visible while some aren't. Some movieclips/buttons are visible while others aren't.One example of this is the buttons. None of the buttons in the entire application are visible.When the user clicks the area where the button should be the button click event is fired and the app acts accordingly (i.e. the main menu button which can't be seen still sends the user to the main menu). What could be the problem?

I had thought of just converting the application to strictly Flash without AIR but I require AIR for the file system api as well as a couple other api components.

View 2 Replies

ActionScript 3.0 :: XML Data Into Movieclips In Flash CS4?

Jan 12, 2010

I am trying to use an xml file containing percentage data by state as a database and load in that percentage data into state movieclips in my flash cs4 file using as3. I know how to load xml data into dynamic text boxes, but I have no idea how to load the xml data into my movieclips. I have attached a small portion of my flash file as well as the xml data that I am trying to load.

View 3 Replies

Flash :: Combine Several Movieclips Into One Scene?

Mar 24, 2010

I'm creating a website that allows kids to designs a tshirt. I will have four section, colour, graphic, text and print.

I have created these sections on demos and they are all working.

I now need to properly create them all on one movie clip.

I'm having problems with it, when i select the chosen tshirt color and move onto the graphic section the shirt is white again and hasnt came through blue. Its the same for every section, when I select a grahic they dont come through either etc when I click the next button it refreshs the page.

Does anyone know how to create this kind of design on one movie clip using different frames and so that the colour etc transfers onto each new page?

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved