ActionScript 2.0 :: Hittest On A Duplicated Movie (flashmx2k4)?

Feb 29, 2004

When you duplicate a movieclip or generate one through AS hittest will allways return true. I tried to make a selection script,by putting the code below into the frame. It makes a rectangle to select charclip movieclips (duplicated and numbered, therefor the for loop) to select them, like when you select icons on a desktop. Unfortunately, it will select all charclips wether theyre inside the rectangle or not. I tried to confirm this behaviour by making a simple hittest script like the one discribed on the kirupa actionscript tutorial, with a moviecript and a duplicated one. The moviescript was detected when it actually hit it, the duplicated one was detected all the time. How do I circumvent this? Should I ducplicate in an existing movieclip or something?

_root.createEmptyMovieClip("sfield",10000000);
_root.onMouseDown = function(){
x=_xmouse;
y=_ymouse;

[code]....

View 7 Replies


Similar Posts:


ActionScript 2.0 :: Hittest On Duplicated Movie Clips?

Apr 21, 2004

i am currently making a game , and for some reason the hittest on my duplicated movie clips isnt working i know how to do them , and know it should be working , because it works on one of the movie clips but none of the others so im guessing it something to do with depth?

View 2 Replies

ActionScript 2.0 :: Hittest On A Duplicated Movie Impossible?

Feb 29, 2004

When you duplicate a movieclip or generate one through AS hittest will allways return true. I tried to make a selection script, by putting the code below into the frame. It makes a rectangle to select charclip movieclips (duplicated and numbered, therefor the for loop) to select them, like when you select icons on a desktop. Unfortunately, it will select all charclips wether theyre inside the rectangle or not. I tried to confirm this behaviour by making a simple hittest script like the one discribed on the kirupa actionscript tutorial, with a moviecript and a duplicated one. The moviescript was detected when it actually hit it, the duplicated one was detected all the time. How do I circumvent this? Should I ducplicate in an existing movieclip or something?

_root.createEmptyMovieClip("sfield",10000000);
_root.onMouseDown = function(){
x=_xmouse;

[code].....

View 7 Replies

ActionScript 2.0 :: Make A Hittest Between Two Duplicated Movie Clips?

Mar 21, 2007

I am making a small game in which you are a little shooty spaceship type thing, and there are duplicated mines falling around you. When you press space, the shooty spaceship type thing fires duplicated bullets. How do I check a hittest between any bullet

View 3 Replies

ActionScript 2.0 :: Hittest On Duplicated Movie Clips Isn't Working

Apr 21, 2004

i am currently making a game, and for some reason the hittest on my duplicated movie clips isnt working i know how to do them , and know it should be working , because it works on one of the movie clips but none of the others so im guessing it something to do with depth? i will give the code if any1 replys

View 2 Replies

ActionScript 2.0 :: HitTest Detect Random Duplicated Instance?

Sep 25, 2005

I've got this code on my frame:

if (_root.count <= 20) {
duplicateMovieClip("_root.clip", "clip"+_root.count, _root.count);
_root["clip"+_root.count]._x = random(500)+50;
_root["clip"+_root.count]._y = random(1)+20;
}

And I need to figure out how to have the hitTest see the randomly generated instances of this duplicated mc.

I can get the hitTest to see the first instance (called "clip"), but then it doesn't see all the rest.

Here's the code I have on the hitTestMC:

onClipEvent (enterFrame) {
if (_root.chime1, hitTest(_root.clip)) {
_root.chime1.gotoAndPlay("play1");
}
}

View 1 Replies

ActionScript 2.0 :: Duplicate Movie Clips Which Allow To Drag Every Movie Clip Duplicated?

Jan 29, 2010

how to duplicate movie clips which allow me to drag every movie clip duplicated.

View 4 Replies

Removing Duplicated Movie Clip?

Nov 19, 2009

I have attached a duplicate movie script action on a button to create a new copy of the clip (F900) with each press. This seems to work well; however, I can not, for the life of me, figure out how to create the script to remove the duplicated movie clipHere is the script I am using for the duplication and I did also attach the fla file:on (release) {  _root.F900.duplicateMovieClip ("F900_"+"x", x );  setProperty ("F900_"+"x", _x, 300);setProperty ("F900_"+"x", _y, 200);  x++;}Once I figure this out I would like to add different aircraft to it but that is not terribly important right now.

View 6 Replies

ActionScript 2.0 :: Getting Rid Of A Duplicated Movie Clip?

Mar 11, 2005

I use this code on frame 1:

Code:
topEdge = 0
leftEdge = 0
rightEdge = 550; //length of stage, CHANGE THIS

[Code]....

and it works great, but the flakes get duplicated even when i go to frame 2. What I would like is code to get rid of the movie clip

View 10 Replies

ActionScript 2.0 :: Getting Rid Of A Duplicated Movie Clip

Mar 11, 2005

I use this code on frame 1:[code]and it works great, but the flakes get duplicated even when i go to frame 2. What I would like is code to get rid of the movie clip.

View 10 Replies

ActionScript 2.0 :: Deleting Duplicated Movie Clips?

Nov 22, 2003

Im working on a rock climbing game, and used duplicateMovieClip() to make all the snow. When the character gets to the top of the mountain, the movie goes to the next scene, but the duplicated snow is still there. Look through the .fla at [URL]

View 5 Replies

ActionScript 2.0 :: Pass Variables To A Duplicated Movie?

Jan 19, 2005

just wondering if theres a way to pass variables to a duplicated movie.Ill be creating duplicate movies very fast (about 20 per second)and want them each to have differrent variables to work with.duplicating with that , and i want to pass 3 variables to the new movie clipdot.duplicateMovieClip("dot"+currdot, this.getNextHighestDepth(), {_x: xpos, _y:ypos});

View 3 Replies

ActionScript 2.0 :: Y Position For Duplicated Movie Clips

May 6, 2005

How do I change the y position for the duplicated movie clips I have created?This is the code I have used to create the movie clips. [code]

View 14 Replies

ActionScript 2.0 :: Change Text Of A Duplicated Movie

Aug 29, 2005

i'm trying to have the text and position changed of a duplicated movie containing a text button. does any one knows how this would be possible?so you have the movie "options" thats being duplicated.in the movie you have the text named sub [code]probably basic actionscripting, but i've been trying more than an hour without any result.

View 1 Replies

ActionScript 2.0 :: Reffering To A Duplicated Movie Clip?

Oct 5, 2006

so i need to load a MC into the clips made with

Code:
on (keyPress "a") {
duplicateMovieClip(_root.blank, "a" + k, k);

[code].....

View 10 Replies

ActionScript 2.0 :: How To Reference Duplicated Movie Clips

Apr 25, 2007

I am trying to create a hitTest between two duplicated objects. The code below is on a bullet. Bullets hit "bad" MCs that are called bad + x (X being a number from 22 - 40). I can't get it to work. I belive that I am not referencing the duplicated MCs correctly

Code:
for (x=22; x<42; x++) {
if (this.hitTest("_root.bad" + x)) {

[code].....

View 2 Replies

ActionScript 2.0 :: Masking Duplicated Movie Clips?

Oct 12, 2007

I used a tutorial from here, that creates snow, and changed it up a bit so that it now creates fizz in a soda. however I'm running into a snag.Is there any way to mask duplicated movieClips so that they only show up in a certain area? Or some way to set parameters to accomplish the same effect? (i.e. I want the bubbles to only appear in the area of the cup, and not all over the place).Right now I have just set X and Y values to do this, but the cup is angled and not square, so it doesn't looks quite right.I have tried setting a mask on a layer above which the duplicated movie clip sits, and also have tried setting the depth of a mask_mc so that it is well above any of the layers that the bubbles are generated on (by use of a for() loop), but nothing works.

View 2 Replies

ActionScript 2.0 :: Referencing Duplicated Movie Clips?

Nov 27, 2007

I've created a tsunami menu made up of duplicated menu items. Each menu item should have a rollover and selected state of 240% which works fine. When a menu item has been selected it jumps to another frame but until the user interacts with it it should loop through the different categories.My problem is that I can't get the menu items to scale big while it is looping through the different categories on the matching category frames.

View 1 Replies

ActionScript 2.0 :: Dragging A Duplicated Movie Clip?

Jul 31, 2003

I created a button that duplicates a movie clip, I want the user to be able to drag the duplicated movie clip. Right now, it duplicates the movie clip but when I try to drag it, it moves the first movie clip (the one being duplicated) instead of the one which was duplicated.

View 6 Replies

ActionScript 2.0 :: Remove Duplicated Movie Clip?

Apr 4, 2009

I want to remove every duplicated clip with the clip.OnRelease bellow[code]...

View 1 Replies

ActionScript 2.0 :: Referring To A Duplicated Movie Clip?

Mar 16, 2010

for (i=1; i<10; i++) {
nameMC.duplicateMovieClip("nameMC"+i, i, {_y:+position});
var position = position +150

[code].....

View 2 Replies

ActionScript 2.0 :: Attach To A Duplicated Movie Clip

Dec 23, 2004

how you can attach some actionscript to a duplicated movie clip.

View 4 Replies

ActionScript 2.0 :: Passing Variables To A Duplicated Movie?

Jan 19, 2005

just wondering if theres a way to pass variables to a duplicated movie. Ill be creating duplicate movies very fast (about 20 per second) and want them each to have differrent variables to work with.

duplicating with that , and i want to pass 3 variables to the new movie clip

dot.duplicateMovieClip("dot"+currdot, this.getNextHighestDepth(), {_x: xpos, _y:ypos});

View 3 Replies

ActionScript 2.0 :: Y Position For Duplicated Movie Clips?

May 6, 2005

How do I change the y position for the duplicated movie clips I have created?

This is the code I have used to create the movie clips.

var i = 1;
while (i <= 5){
duplicateMovieClip("bar", "bar" + i, 0);
i++;
}

View 14 Replies

ActionScript 2.0 :: Asign OnRelease() To A Duplicated Movie Clip?

Dec 13, 2009

PHP Code:

pressed = false;bookArray =["0","1","2","3","4"];for (j=0;j < bookArray.length; j++){_root.shelf.attachMovie("book1","book"+j,_root.shelf.getNextHighestDepth()) _root.shelf["book" +j]._X = (j * 30); _root.shelf["book" +j]._Y = -6;_root.shelf["book" +j].id = j;_root.shelf["book" +j].onRelease = function ()  if (!pressed){ moveBooks(id,40); trace ("clicked on: " + id);}}

Now, the duplication works great, all books get placed well, BUT I'm having trouble with setting the variable id inside of the newly attached movieclip _root.shelf["book" +j] so I can later on use it on my onRelease function.

View 1 Replies

ActionScript 2.0 :: Prevent Duplicated Movie Clips From Overlapping Each Other?

Oct 30, 2011

On my stage I have generated a series of Movie Clips at runtime. They drift around in a semi-random motion, causing them to occasionally overlap each other - is there any way of preventing them from doing this?

View 3 Replies

ActionScript 2.0 :: Duplicated Movie Clips On Wrong Layer

Feb 4, 2005

I have the code tucked under a layer of some text, but the hearts end up covering up the text.

View 9 Replies

ActionScript 2.0 :: Loading Images To Duplicated Movie Clips?

Jul 26, 2007

I have a problem in loading pictures to duplicated movie clips. I have a dynamic sliding menu and I wanna load images to submenus. However I havent succeeded yet.

Here is the code:

setProperty("Rub", _visible, false);
setProperty("subrub", _visible, 0);
bas._visible=false

[Code].....

View 3 Replies

ActionScript 2.0 :: Freeze / Stop Duplicated Movie Clips Where They Are?

Apr 14, 2005

I have a fire animation that i want to freeze (ha!) on the last frame of my swf. So basically the fire is buring and i want all the tweened flames inside duplicated MC to stop so it looks like a snapshot of whereever all the flames currrently are.Everything else in the movie is stopped too, so i was wondering if there was a global stop all motion command or the best way to freeze my fire

View 2 Replies

ActionScript 2.0 :: Duplicated Movie Clips On Wrong Layer?

Feb 4, 2005

I have some code that has hearts falling from top to bottom and randomly float off the screen. The problem is the layer order. I have the code tucked under a layer of some text, but the hearts end up covering up the text. So would this be a depth problem? What would be some code to tell the newly duplicated movie clips what layer to appear on(as in appear below the text layer in the timeline).

View 9 Replies







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