Flash8 :: "attach" Movie Clip To Another Movie Clip
Jan 1, 2010
Im making a game where you have a little dude you're walking around with using the arrow keyes. Now i have certain underwater scenes and here i thought it would be nice to add a little movie clip of air bubbles coming out of the dudes mouth.
So i have the movie clip with the animated bubbles laying in the same frame as the scene (where the dude will walk around). Im looking for a script that makes it so that as soon you enter the scene the "bubbles" movieclip will "attach" itself to the "man" movieclip. (Or atleast follow it around)
I dont want to modify the man clip itself with bubbles since then the bubbles will interfere with some hittest i have (and just want the bubbles to be aesthetic)
View 3 Replies
Similar Posts:
Feb 12, 2010
how to attach a movie clip to another movie clip after drag and drop .I mean to say that is it possible to make a new movie clip with the target movie clip and dropped movie clip.
View 2 Replies
Apr 5, 2010
I am looking to drag a movie clip onto another movie clip. Both movie clips are within a movie clip. I have tried the following and the drag part works but it doesn't stay on the target:
[Code]....
View 13 Replies
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
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
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
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
Jan 4, 2010
I am attempting to attach a slider bar to a movie clip. The movie clip is of a face morphing from emotion to no emotion. My ultimate goal is to have the viewer choose when the emotion has disappeared by moving the slider bar.
View 1 Replies
Feb 6, 2010
How can i attach a movie clip on to my program?
View 4 Replies
Oct 3, 2011
This is what I am trying to achieve but I do not remember the syntax in AS2
HTML Code:
public function highlightCan() {
var glowId = String(this);
var newId = glowId.substring(47);
[Code].....
If I hard code this value i.e. _glow0 or _glow1, this works but this value needs to be dynamic, in order to get the rollover state working. per highlightCan();
View 3 Replies
Nov 10, 2004
I would like to attach a sound to a movie clip that is serving as a button.
I want the movie clip button to make a little noise when the mouse rollovers it.
I am using Flash MX.
View 1 Replies
Sep 6, 2003
[AS]
function Job(id) {
this.id = id;[code]...
but the movie clip isn't showing up on the stage...
View 1 Replies
Dec 23, 2004
how you can attach some actionscript to a duplicated movie clip.
View 4 Replies
Nov 12, 2009
how to attach a movie clip to the stage or root. I have created a movie clip called movClip and have checked export for actionscript and have chosen "movClip" as its class.I have used this script:
ActionScript Code:
function button1(evt:MouseEvent):void {
var mc1:movClip=new movClip();
mc1.x=0;
[code]....
This attaches the movie clip. Great! Problem is it doesn't attach the movie to the root or stage, but rather as a child of this function?? weird! so when I want to use removeChild(mc1) from a different function from a different button or even from an action set on a different timeline it can't target mc1?So how do I make this work. Basically I want one function from button 1 to attach the movie clip and I want a second function from a second button to remove the movie clip.
View 4 Replies
Dec 31, 2002
ok so heres the problem: i have some buttons that are suppose to attach a movie clip on stage after you press it. This works perfectly, but after i mask it, the masking box blocks it so i can't click on anything.
i hope you understood what i'm saying, and i've tried using the 'setmask' code, but that doesn't work either.
View 11 Replies
Mar 15, 2005
Code:
var hands = new Array();
function attachHands(){[code]....
These are the codes i have typed.I have already attach the movie in hand1,hand2,hand3.Is there a way to remove attachHand1 and attach a new movie clip on it? Not to overlap on attachHand1 because it will be seen.Those hand1,hand2,hand3 are empty movie clips....
View 4 Replies
Feb 1, 2006
I need to be able to click on any part of the screen and have a movieclip from the library appear where I clicked. It would be the same item each time.
View 10 Replies
Dec 14, 2008
I'm kind of a flash newbie, and I need some help with AS2 in Macromedia Flash 8. I want to make it so that when you click the mouse, it plays a certain movie clip at the current mouse position, without the movie clip actually being on the stage.
View 10 Replies
Feb 8, 2004
I'm trying to attach a movie clip to the main stage using:
[AS]
this.attachMovie("movieObj", mc1, 1);
[/AS]
However, it ain't showing up. Trace said the movieclip of that name is undefined, despite having the correct linkage and instance name. Anyone know why a movieclip might be MIA?
View 4 Replies
Jan 19, 2010
I have very annoying and easy (I believe) problem with Macromedia Flash 8. My movie consists of 10 scenes. I wanted them to be played each after another (e.g. scene 1, scene 2, etc.).However, the scenes that consist of movie clips are just flashing and movie proceed to next scene. There is no problem with scenes that where done just in main timeline. I tried to put some action script on these movie clips like:
on (release) {
play ();
}
View 3 Replies
Aug 5, 2009
I am trying to attach a movie clip at a specific location on the stage using the following code:attachMovie("plane_mc", "mc", 1, {x:50} );The statement above does attach my MC called plane_mc onto the stage but it won't attach it at the location where I want it to. The x parameter doesn't seem to have any effect whatsovever on the stage location.
View 2 Replies
Dec 18, 2004
Is it possible to attach some script to a dynamically created movie Clip?
View 7 Replies
Sep 4, 2009
I have the following code
stop();
positions = [];
imageTotal = 8;
[code]...
It basicly loads some pictures into movie clip holders and they stream horizontally across the bottom of a page.My problem is i cannot get them to continuously loop, at the moment they just cross the screen once then stop.
View 2 Replies
Nov 6, 2009
I have 2 buttons on the root of the flash, i want use those buttons to control the frames of a movie clip, how can it be done?
View 2 Replies
Feb 16, 2010
I have a movie clip on my stage which I want to move up 2 seconds into the movie, as if it is popping out of an invisible box. I can do it on the timeline, but wondered if anyone knows how to do it using as2?
View 1 Replies
Jul 4, 2008
I am having the hardest time trying to get AS to play from within a MC called "content_002".Please remember that this AS is an XML-Driven sub-menu that successfully works on it's own. When I tie it into a MC, it doesn't like to work with my shifting main-menu.
For this post, I'll first send the "combined" .fla file then I will post them apart to see if anyone can find a better way.
View 12 Replies
Oct 8, 2009
using flash 8 AS2. I was thinking if it was possible to create a waving moving banner, with some flags of countries moving across it. much like the example below. Is it possible I will create a simple rectangular banner, then animate it in the timeline with flowing flags of a few countries from left to right. then i wonder if actionscript can create a wavy perspective banner that flows from the left to right in a loop or full stop from the movieclip timeline looping forever in it? The red arrow shows how the banner will animate towards the right from the left.
View 1 Replies
Jul 5, 2010
I am trying to add x amount of movieclips to the stage with their own unique _x value. Also with each movie clip added i need to add an array with a smiler name. I tried this code.
Actionscript Code:
enemycount = 46;for (i=1; i<enemycount+1; i++) { this["currentenemy"+(i)]=_level0.enemydatabase[0]; this.attachMovie("BrownFox", ["enemy"+i], 101, {_x:100, _y:219});}for (i=enemycount; i<51; i++) { this["currentenemy"+(i)]=_level0.enemydatabase[1];}trace (this.enemy1._x);trace (this.currentenemy45);
under the attachmovie I have ["enemy"+1] but when i trace enemy1 it returns undefined. But when I put ["enemy"+1] it returns the _x value. also if I put _x: i * 5, I only see one movie clip so I have a feeling they all have the same _x and_y value. basically I wanna be able to add 2 enemys to the stage with out over lapping, and the option to add 50 with out too much over lapping (would like to avoid overlapping by also giving various y depths, between 200 and 250)
View 10 Replies
May 9, 2010
Im able to link to a movieclip inside a movieclipUnfortunately one of the movieclips now are a scrollbar and scroll. Now the actionscript isnt working?cal.onPress = function() {gotoAndPlay(2);message1.contentMain.message.total = unit1;
View 17 Replies
Jun 24, 2010
I am pretty new to ActionScript 3 and Flash. I don't want my movie clip to play unless the person's mouse curser is on the movie clip for more than a second. If the person just runs their curser over the movie clips really quickly, then it should do nothing. It must be more than a second. How do I code that?
[Code]...
View 17 Replies