ActionScript 2.0 :: Attach Movie Random Level

Aug 18, 2009

I've built a random image generator that places 6 different coloured movie clips randomly on the stage and at any quantity that I specify. So I can have say 100 black, 30 red, 50 blue clips scattered about the screen...lovely. My only problem is that the code goes through and does one colour clip at a time so it places the 100 black first on lower levels that the 30 red, which are on lower levels than the blue and so on. This creates the problem that the last colour always dominates as it's on the top most levels. Is there a simple way to randomise the levels as the movie clips are copied? Here's the code

[cODE].....

View 6 Replies


Similar Posts:


ActionScript 2.0 :: Load A Movie To Level 1 That Deactivates The Movie In Level 0 Without Unloading It?

Nov 5, 2004

I have a movie that's 500x400 px in level 0 and has lots of thumbnails with pictures that I want to open. the thumbnails open a 500x400 px movie above the other but on level 1. the problem is that when the new movie loads on level 1, the thumbnails on level 0 (that are now hidden by the new movie) are still active, and if i click anywere in the movie on level 1, it trigger an action from level 0. Is it possible to load a movie to level 1 that deactivates the movie in level 0 without unloading it?

View 1 Replies

ActionScript 2.0 :: Attach Movieclip To Stage And The Detph Level?

Sep 18, 2011

on my journey in creating a tile based grid. i came across on the second line and the 3rd argument. ( the depth leve of the movieclip.

++ d now i didnt think this was possible. I would like to know what the d stands for as does not appear in blue. so does not appear to be a inbuilt command. I mean i normally use this.getNexthighest depth.

[Code]...

View 4 Replies

ActionScript 2.0 :: Attach A Different Level To The Stage Depending On Value A 2 Variables?

Jul 21, 2009

I'm working on a game. I want it to attach a different level to the stage depending on what value a 2 variables are, but I keep getting Type Mismatch, or it doesn't work.

Code:

_root.attachMovie(PROBLEM IS HERE,"map"+mapSwitch,_root.getNextHighestDepth());

The current linkages are 00 (0x, 0y), and -10 (-1x, 0y). They are comprised of 2 variables, the first one is xmap, and the second is ymap. I want to be able to combine the 2 variables and then attach the clip with that linkage to the stage.

View 3 Replies

ActionScript 2.0 :: Using Number From Random Array To Attach A Sound?

Jan 4, 2010

I have a foreign language resource which randomly creates and displays a number. The player then needs to select the correct number in a particular foreign language. What i also need to do is play the audio for the randomly created number. I have numbers 13-20 all as seperate sound files also named as identifier names 13,14,15 etc up to 20.

The following script loads the sounds. Sound1 is the sound which needs to hold the random number which is generated:

ActionScript Code:
onClipEvent(load){
Sound1 = new Sound();
rndClip = ????????;

[Code]....

I need to load this array as Sound1 so that the correct sound file plays to match the random number.

View 2 Replies

ActionScript 2.0 :: Attach MovieClips On Random Position Without Overlapping

Apr 23, 2006

Is it possible to attach mcs at random locations without the possiblility of them overlapping?

View 1 Replies

ActionScript 2.0 :: Random Loading Of External Swf Files Into Level 2

Nov 10, 2011

I've got main time line as Main.swf (level 0) and few external swf files: Message_01, Message_02, Message_03 etc.By the end of the main time line there is a key frame with the script (AS2).The script should call randomly one of the external swf and load it to level 2.

View 5 Replies

ActionScript 1/2 :: Attach Two Objects (movieclips) With Different Width And Height Properties Into The Stage, With Random Positions

Aug 27, 2009

how to attach two objects (movieclips), with different width and height properties into the stage, with random positions,without visual colliding.

View 6 Replies

ActionScript 2.0 :: Assigning A Level For The External Movie(reseller_locations.swf) Loaded To A Movie Clip(clipHolder)?

Jul 25, 2006

assigning a level for the external movie(reseller_locations.swf) loaded to a moivie clip(clipHolder)

code

loadMovie("reseller_locations.swf", this._parent.clipHolder);

View 1 Replies

ActionScript 2.0 :: Level - Movie Is Not Working Anymore After Load It Into Other Movie

Aug 23, 2004

Let say A is the main movie and B will be a external swf file that i'm going to load into A movie. The problems is that, some actionscript(AS) in my B movie is not working anymore after i load it into A movie. I believe that the AS in my B movie is not working anymore because it is refer to A as the _root instead of B movie as _root. This can be a common problem. So, i wonder what should i change in the B movie AS in order to make it work in A movie.

View 3 Replies

ActionScript 2.0 :: Load Random Movie (but Loading A Random Xml File Instead)

Aug 17, 2007

im playing with the load random movie (but loading a random xml file instead) based on the wonderful tutorial from front page and was wondering whether anyone can show me the work around/upgrade to AS2 for this bit of script since im publishing to Flash 8 /AS2 and it doesnt work:

[Code]....

View 5 Replies

ActionScript 3.0 :: Get The Movie To Display Random Images (from A Selection) For Random Amounts Of Time (subject To Minimum And Maximum Times)?

May 3, 2010

What I want to do is to get the movie to display random images (from a selection) for random amounts of time (subject to minimum and maximum times).

View 3 Replies

Actionscript2 :: Attach Movie And LoadMovie?

Sep 17, 2010

I have the following code:

var theItems:String = "4 3 6 19 20 40 41 4 3 6 19 20 40 41"
var titems = theItems.split(" ");
var nextLine = 0;

[code].....

View 1 Replies

ActionScript 3.0 :: How To Attach Movie Clip

Dec 31, 2008

can anyone explain me that what are the things new in ActionScript 3.0 and give me the links where this thing explained in detail.How to createEmptyMovieClip and how to attach movie Clip?

View 4 Replies

ActionScript 2.0 :: Attach A Movie To Layer 2?

Jan 25, 2009

How do i attach a movie to layer 2. so that what ever is on layer 1 is above the attached movie clip?

View 1 Replies

ActionScript 3.0 :: Attach Movie Clip In It?

Dec 1, 2009

I �m just starting to migrate from AS 2 to AS 3 and i have a problem with the addchild function�.I have a movieclip with the Mascot class and i�m trying to add it to the stage using a class file��but it doesn�t do anything�I have no idea how to load this movieclip using a class file even though it works in the actions bar[code]...

View 1 Replies

ActionScript 2.0 :: Attach Movie And Remove It Later?

Jul 15, 2010

I have a movie with some MC inside the library, and im calling them with buttons with the follow script :

[Code]...

View 9 Replies

ActionScript 2.0 :: Attach A Movie Clip To Another?

Feb 8, 2011

i am trying to create a basic game and am having a problem. I'm using swfmill and mtasc (but I doubt that has much impact) and am using ActionScript 2. At the moment I am attempting to add a load of tiles to a set and then move that set of tiles about the screen in one go. The problem I am having is that I can not figure out the best way of linking the set (which is created on the fly) to the _root movie and so it doesn't draw.

I could potentially be doing everything wrong as I have only just started to learn how to use this language. This is basically what I do:

I create a 'Main' class that extends MovieClip and add a new clip of this class to the library.

I also create a 'TileSet' class that also extends MovieClip. This class calls attachMovie (on 'this') to add a number of tile MovieClips from the library to this TileSet.

I create a 'TileSet' within 'Main' (like var myTileSet:TileSet=new TileSet();), so that the Main class can play with the tileset.

When running I see nothing. As I said befor I believe this is due to TileSet not being attached to Main or _root. As a test I changed the TileSet's attachMovie (that attaches the tiles) to be called on '_root' rather than 'this'. This change makes the tiles show when run, but means that I can not move all the tiles by simply moving the TileSet.

I think I could probably add the TileSet into the library and 'place' it (swfmill method to put the clip into the stage), but I would prefer to do it on the fly in pure ActionScript as I think this will be useful later on too.

View 2 Replies

ActionScript 2.0 :: Attach Movie Instead Of A Duplicate?

Mar 7, 2005

Is it posible to make a lus in front of this? like : for (var i=0 i< 10; i++){

[Code]...

Where i got 10 Menu's of it, in an Attach instead of a Duplicate?

View 14 Replies

ActionScript 2.0 :: Attach Movie Clip With XML?

Oct 15, 2005

Thats the first time i am using this forum so I'am a newbie. For first I must say that my english is the worst on earth. Therefore a you understood me.My problem is: made the Attach Movie Clip with XML Load and it wondered me, because it worked. But now I make Hover Captions inside the first Attach Movie Clip, also with an attach movie function, Now I have the problem how to get the data from the xml file into the 2. attach movie.for the 1. path (into the first attach movie) the code looks like this._root["neuesMC"+i].xmlPfad = xmlDatei[i].attributes.namen;

my Structure:
> xml Load
> read XML

[code]....

View 3 Replies

ActionScript 2.0 :: Attach Movie And SetInterval?

Nov 14, 2005

I followed the tutorial about multi-dimensional arrays and attachmovie. I would like to create a similar one but I want to add setInterval so that the attached movies appear in an order with some time delay. Instead of the loop used in the tutorial I used setInterval and clearinterval. However, all the attached movie clips' _x and_y positions are the same and I can't send the information in the array to the attached movie clips. When I trace() the text boxes it returns undefined.

View 2 Replies

ActionScript 2.0 :: Attach A Movie And Then Drag It?

Mar 30, 2006

i am trying to attach a movie and then drag it, this works but the code to stop the drag does not.

[Code].....

View 2 Replies

ActionScript 2.0 :: Attach A Movie Then Play It?

Mar 14, 2007

I want to add a movieclip to my scene, then play it. I can get it into the scene, no problem. But how to get it to play? it wont work!

Code:
attachMovie ("crsMoveMC", "crsMove", -1);
crsMove._x = 250

[code]....

View 3 Replies

ActionScript 2.0 :: How To Move Attach Movie

May 26, 2007

how to move attach movie. What I wanna to do, I wanna attache movie clip to the stage(grey) and then i wanna attache another movie clip in to the stage( red) and another( blue). I wanna move just red and blue movie clip(axis:y) like they grow on grey movie clip.

View 3 Replies

ActionScript 2.0 :: Create A Level Select Screen So The Buttons Unlock Complete A Level?

Apr 22, 2011

im trying to create a level select screen so the buttons unlock as you complete a level, so far i have this on each button:

on(release){
if(this.number <= currentItem){
gotoAndPlay(3);
}
}

[Code]...

View 0 Replies

Assign Z Level To Movie Clip?

Mar 31, 2009

I have a gallery which is created from the following scipt:

this.createEmptyMovieClip("images",100);
this.attachMovie("mask","mask",101);
etc....,

with the gallery still present i want a movie clip to appear ON TOP of this.

How is this done? i understand i need to set the z level but cannot find a simple explanation of how to do it. I do not want the image to be transparent (i've found lots of explanation on how to do this!)

View 1 Replies

ActionScript 3.0 :: Load AS3 Movie In AS2 On Level 1?

Oct 13, 2009

Is there any method or possibility to load AS3 flash movie in AS2 on level 1, or higer, or in target loder.

View 2 Replies

ActionScript 2.0 :: Getting Name Of Movie Loaded On A Level

Oct 14, 2011

It may be pretty basic but I'm looking for the easy way out. I've a container that loads a movie on level10 using loadMovieNum(). Is there a way I can get the name of this movie?.

View 5 Replies

ActionScript 2.0 :: Unload A .swf From A Different Movie Level?

Apr 18, 2010

I have an index.swf that loads the following movies.

loadMovieNum("home.swf", 4);
loadMovieNum("home_2.swf", 53);
loadMovieNum("help.swf", 50);
loadMovieNum("glossary.swf", 26);
loadMovieNum("Resources.swf", 27);

Is there a way to unload the home_2.swf from the index page when a button is clicked on the home.swf?

Home_2.swf is sort of a splash animation that plays over the navigation panel and then sits on the side so when any of the nav buttons are clicked on in level 4 .swf I want the level 53 .swf to unload.

View 2 Replies

ActionScript 2.0 :: Can't Load Movie Onto Level

Apr 19, 2004

I have a button that is a few levels down in movie clips. When It is pressed, it is supposed to load diamonds.swf. It does this, but not on the first press. On the first press the _root time line goes to and plays "fade," but doesn't execute the rest of the script. [code]...

View 2 Replies







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