ActionScript 2.0 :: Place 35 Movie Clips In Random Order On Stage In Specific XY Coordinates?

Nov 12, 2009

I have 35 movie clips named mcMyObject1, mcMyObject2, etc. to mcMyObject35Each time the playhead enters the frame this code sits on, I want all of these 35 movie clips to be placed on the stage in random orderI want each one of these 35 movie clips to land on one of these X coordinates: 57, 187, 317, 447, 577, 707, 837 and on one of these Y coordinates: 53, 183, 131, 443, 573. (It's a 7 x 5 grid)Movie size is 1024 x 768Here's my code, which doesn't work:

stop();
var myXArray=[57, 187, 317, 447, 577, 707, 837]; //cordordinates for x
var myYArray=[53, 183, 313, 443, 573, 573, 573]; //cordordinates for y

[code]......

View 8 Replies


Similar Posts:


ActionScript 2.0 :: Play Movie Clips In Random Order

Apr 15, 2009

I don't even know how to start with this. I have 15 movie clips on the stage, each with an animation within it, I need them to play at random, one after the other. Ideally, once there's mousemovement, everything should reset.I kind of understand the random function and how to generate numbers, and I know this will probably involve arrays, but I don't know how to put this together.

View 12 Replies

ActionScript 2.0 :: Random Script That Will Make Movie Clips Play In "random" Order

May 5, 2009

I have 5 boxes on the stage as movie clips, each one with the same animation waiting to be targeted. What I need is a random script that will make them play in "random" order. This should occur after a few seconds of inactivity where they each play, but once there's mouse movement, whichever ones did animate should "reset" or play back to their original positions, (assuming there's more boxes and there's movement before all of them play). I have some code in there for arrays and some random script that isn't working right now. I just need the random setup, really. I may be able to figure out the time delay, (maybe), and then be able to tweak the rest of it for how I need. Right now, I've just simplified everything in a 5 box example hoping someone might be able to work with what I have.

View 6 Replies

ActionScript 3.0 :: Place A Group Of Movie Clips With Random Types (different Shapes On A Square) In A Grid Formation

Sep 24, 2010

I place a group of movie clips with random types (different shapes on a square) in a grid formation The code for placing the movie clips is this (this is in two for loops):

[Code]...

this goes up a single column in the grid and should remove the tiles from the stage depending on each type and it does this (sort of) until it tries to remove more than one of the same type. So if it finds and removes an lShapes it doesn't error until it tries to remove another lShapes and then it gives this error in the output: Error #2025: The supplied DisplayObject must be a child of the caller. So I am assuming that this means it thinks all lShapes have been removed and thinks I'm trying to remove something that doesn't exist but there are other lShapes on the stage. I am at a loss as to what to do about this.

View 1 Replies

ActionScript 2.0 :: Kitupa Random - Motion Tutorial - Where To Place Timeline To Make The Movie Clips Work

Mar 24, 2004

I place the code in the timeline but I dont know where to place them to make the movie clips work?

* do i have to place them on the time line?
* Do the have to be named a certain Way ?
* Do they have to have some code ?

View 2 Replies

Flex :: Place An Image In Specific Coordinates On Canvas?

Nov 30, 2009

I know that the question may seem very easy. I am trying to display an image on canvas.I need to do it in AS, and also I need to locate image in specific coordinates.

View 2 Replies

ActionScript 3.0 :: Place A Scrollpane In A Specific Place On Stage?

Aug 21, 2010

I've used .x = and .y = with the position I want and the pane continues to show up in the top left corner instead. What am I doing wrong?

View 2 Replies

ActionScript 3.0 :: Adding Random Movie Clips From Library To Stage?

Aug 4, 2009

How to add random movie clip onMouse Move to stage from many (lets say 50) different movie clips in library? If I wanted to add one movie clip to stage I would do liko so:

ActionScript Code:
stage.addEventListener(MouseEvent.MOUSE_MOVE, onMove);
function onMove(e:MouseEvent):void {
var mc:MovieClip = new Ball();

View 0 Replies

ActionScript 2.0 :: Duplicate A Movie Clip And Then Place It On A Certain Place On The Stage Set _x And _y?

Apr 8, 2005

how can i duplicate a movie clip and then place it on a certain place on the stage

View 5 Replies

ActionScript 2.0 :: Draw On Specific Place Of Stage?

Jan 20, 2009

I used below scripts for drawing on stage. but I want draw on specific place of stage not all of them.How can I define that zone ?

ActionScript Code:
this.createEmptyMovieClip("drawing_mc",this.getNextHighestDepth());
this.onMouseDown = function() {[code].....

View 0 Replies

ActionScript 2.0 :: Movieclip Which Is Added To The Stage Every Second At A Random Place?

Sep 9, 2009

I have a movieclip which is added to the stage every second at a random place.i want all instances of this movieclip to move to the postion x=100px and y=200px on the stage at a rate of 5px.im not sure how to code this, i would like the code to be in as3 if possile as i do not know as2.

View 2 Replies

Create A Movie Clip And Place Other Movie Clips Inside Of It?

Oct 6, 2009

[URL]
 
At step four, it says to
 
4- Inside another Movie Clip named "Limits" place "Pads" and "Wall". Pads' instance name should be "Pads" and Wall's instance named "Border". We put the Wall and Pads inside the same Movie Clip, to use it to know when the ball collided. And we couldn't put everything together because the ball behaves different if hits the Wall instead of the Pads.
 
How do I create this movie clip and put the other movie clips "inside it"? Also, if anyone can find out, where do I put this movie clip? Do i put it at the same spot as the wall?

View 7 Replies

ActionScript 2.0 :: Pixel Effect - Position Shape At Random Place On Stage

Apr 13, 2006

I am trying to make a so called pixel effect in witch I want to make a shape only from pixels that are positioned in some random place on the stage. And all these pixels move to a certain point and create that shape. I've been looking into BitmapData Class but I don't now if that is the best way to do it.

View 2 Replies

Multiple Movie Clips On Stage - Buttons Not Working In Movie Clips?

Jul 15, 2009

I have multiple movie clips on stage (all in separate layers, of course) as well as buttons on stage to play each movie clip. There are buttons inside each movie clip. The problem is that the buttons inside the top layered movie clip work, but the others in the movie clips below don't.

View 2 Replies

ActionScript 2.0 :: Displaying Movie Clips In The Correct Order?

Jan 11, 2009

I'm having issues displaying movie clips in the correct order. I'm pulling in data from an xml file, in this case images and then create movie clips to hold them. I'm getting the right order from the actual Array when looping through the xml file but when I create the clips the order gets all screwed up. how to order the clips exactly the way they are in the array?

#########loop that creates the clip########
for(var b = 0; b<story_arr.length; b++){
if(story_arr[b].nodeName != "title"){

[Code]....

View 0 Replies

ActionScript 3.0 :: One Button - Plays Several Movie Clips In Order?

Nov 17, 2009

I'm using AS3 in CS4. I have a problem which i can't get past: I have a button which when clicked I wish it to play two movie clips (blind_mc, text_mc) when clicked.. however I do not wish them to play at the same time (as the script below achieves).. but to play one after the other.

I cannot put them on the same layer or join the two togther for many reasons including -- I have many different buttons i wish to apply this too all with different number of movie clips and orders of play, therefore I would have to create excessively long layers for each and every click.

function goHome(e:MouseEvent):void {
blind_mc.play();
text_mc.gotoAndPlay(2);
}

View 3 Replies

ActionScript 2.0 :: Sequence Movie Clips To Play In A Certain Order?

Oct 6, 2004

how to sequence movie clips to play in a certain order. I want to play one movie clip that is animated using actions and then once that clip is finished, play the next one (naturally, to create some sort of design.)If I have two MC's that have separate scripts on them - how would I go about playing the first movie clip and once that animation is finished playing the next one?I've tried placing a 2ndmovieclipname.stop () style script at the end of the first movie clip.I am currently using Flash MX 2004.

PS - I do not have my clips animated with frames, so I don't believe the option to gotoAndPlay (frame x) is available to me.

View 7 Replies

ActionScript 3.0 :: Possible That The End-users Will Place The Movie-clips On Any Targets They Want?

Nov 17, 2011

On the stage, I have 10 draggable movie-clips and 10 targets. At the moment, I have it set in such a way that, each movie-clip matches a specific target. Is it possible that the end-users will place the movie-clips on any targets they want? If so, what could be the easiest method to use?My project is a little complicated but my goal is to give the user the freedom to place the movie-clips to any targets which will make them snap and also give them a conditional statement. My project contains one exact model of an answer but there are a lot of probabilities because the end-user are more likely to place them around the targets randomly.

View 0 Replies

ActionScript 2.0 :: Save/Load Flash Based On X Y Coordinates Of Movie Clips?

Mar 12, 2010

I am developing a tool for analysis where you drag specific events onto a special wheel to analyze events based on time of day etc. I had a few users testing it and they asked for a save and load feature. I have done as much as I can at this point and am just growing confused. Can one of you experts take a look at my .fla and see what can be done...I think I am close but just can't figure it out. Also, if you can provide comments on cleaning up my code would be nice too.

View 4 Replies

ActionScript 2.0 :: Bitmap Data - Place Smoke Effect At Specific Place

Feb 1, 2011

How to make this smoke effect work without mouse input. I am trying to have it spill from the end of a cannon, & my attempts to modify the position have resulted in all my bitmaps shifting. I changed this
doTrail(_root, _xmouse, _ymouse, currentBitmap);
To this
doTrail(_root, _x=80, _y=100, currentBitmap);
[Code] .....

View 0 Replies

ActionScript 2.0 :: Place Movie Clips In Rows And Columns Dynamically?

Mar 31, 2010

I'm trying to position dynamically generated movie clips into rows and columns. Currently i've managed to position them side-by-side using the same ._y position. I would like to position them into a grid consisting of 25 columns and 16 rows, so mc 26 would sit beneath mc 1 etc...

View 9 Replies

ActionScript 2.0 :: Select One Of Those Movie Clips - Drag It To A Desired Position And Have It Snap To Place

Nov 10, 2009

I have movie clips loading in dynamically using an XML file, and the duplicate movie clip function. I need to be able to select one of those movie clips, drag it to a desired position and have it snap to place. As for right now, I'm using :

[Code]...

View 3 Replies

ActionScript 2.0 :: Combining 2 Scripts(first One Creates Array To Play Movie Clips In A Order Fro Left To Right Of The Screen Depending On Position ) ?

Nov 3, 2005

i need to combine these two scripte (first one creates array to play movie clips in a order fro left to right of the screen depending on position ) each script works corectly if used on there own. but i want to combine them

var videos:Array = new Array("mc1", "mc2", "mc3", "mc4");
var busy:Boolean = false;
for(var i = 0; i<videos.length; i++)[code]....

View 1 Replies

ActionScript 3.0 :: Determine Absolute (stage) Coordinates Of A Movie Clip

Apr 1, 2011

Is there a method to determine the stage coordinates of a movie clip?

I don't mean something like this:
stageX = mc.x + mc.parent.x + mc.parent.parent.x + ....

I would like to be able to determine the movie clip stage coordinates without knowing what are its parents and grandparents etc. The goal is to be able to place the movie clip on exact place on a stage, no matter what is the nesting structure.

View 1 Replies

ActionScript 2.0 :: Random Movement Of Movie Clips?

Sep 30, 2003

I'm trying to make it so that when the main page loads, I have two movieclips, the name of the client's company and their slogan.

The movie clips fade in and out, but I can't get them to appear at different places on the stage.

For example, the page loads, then "Hughes Team Racing" fades in then out in nice fancy font on the right of the stage, how do I make it so that the next time it fades in and out its at a different place?

View 1 Replies

ActionScript 3.0 :: Load Movie Clips Into Random Positions?

Mar 24, 2010

I have three movie clips on my stage. Their names in my library are a1_mc, a1_mc2, and a1_mc3. Each of those movie clips on my stage has a different instance name. All of these are connected with an actionscript in the same file.Now, I'd like the movie clips to appear at a random position every time, they are loaded.

I already tried to make a new array and solve this issue with the sort() command. However, that did not work out properly. The positions and instance names of the movie clips on my stage are as follows:

a1_mc
instance name on stage: a1
position on stage: X = 20.0 | Y = 140.0

[code]....

View 1 Replies

ActionScript 2.0 :: Loading Random Movie Clips From An Array?

May 2, 2011

My project has about 30 movie clips in the library. With an action that comes up every few seconds, I'd like to randomly load one of those 30 clips onto the stage and have it play until it's done.

BUT - once a movie clip is already out, I don't want it to reset or come out again. I'd like the next action to randomly call out one of the remaining 29 clips.

Once each movie clip is done, I need some action to make it go back to the "available" list so that it can be called out again.

I'm guessing that I need to use attachMovie to call out the movie clips, and an array (maybe two) to make sure that I only get one instance of each movie clip. But after lots of searching and various dead ends, I'm just not finding exactly what is needed.

View 2 Replies

ActionScript 1/2 :: Display And Play Movie Clips At Random?

Mar 11, 2011

I am trying to place 6 movie clips in an array and access them in a random manner so that when a button is pressed a movieclip appears and plays randomly. All MCs are in frame one along with this code:
 
stop();blk1._visible=false;blk2._visible=false;blk3._visible=false;ppk1._visible=false;ppk2._visible=false;ppk3._visible=false;
storeCartons = new Array();storeCartons = (blk1, blk2, blk3, ppk1, ppk2, ppk3);

[Code].....

View 2 Replies

ActionScript 2.0 :: Random Display Of Movie Clips From Library?

Jan 5, 2010

I'm trying to display random movie clips within the library (See attached fla)
each movie clip needs to display (fade in/fade out) and then proceed to display another movie clip from the library

You'll see how i have tried to do this is by creating a random number

Code:
var myImageSequence = 6;
var RandomLogo = Math.floor(Math.random()*myImageSequence)+1;
gotoAndStop(RandomLogo);

this code works, as it always selects a random frame and plays the movie clip within but then stops.

I need to then select another mc after this animation has finished and so on within a loop

View 3 Replies

ActionScript 3.0 :: Random Rotation Values To Movie Clips?

Aug 24, 2010

I have a number of movie clips on the stage, and I want them to have a rotation value of either -5 or 5. The rotation values have to be randomly generated.

View 2 Replies







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