Movie Clip Within Clips To Appear On Top
Hello Everyone,
I have movie 15 movie clips that have over states with a grid that is designated also as a movie clip. After the _over event, I want the grid to always reappear on top. Please help!
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 07-06-2007, 02:30 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Movie Clip Runs Slow When There Are Multiple Movie Clips Running
Hi, Can someone help me out? I have made a flash where a movie clip containing text runs at the same time that a second movie clip runs (movie clip 2). I used function updateCursor() to replace the standard mouse symbol with the movie clip symbol (movie clip 2). After the scene runs a few times at the correct speed, everything within it slows down markedly, which I don't want. Why is this happening? Any ideas? I have actually seen something similar in Flash 5...but I can't figure out how to keep this from happening!!
Problem Loading External Movie Clips Into Target Movie Clip
Hello,
I've been desperately trying to figure how to get this function to work. I created a target movie clip, then assigned an external one to it, but I can't seem to get it to work. Can anyone help me with this and fully explain it so I don't miss anything? I'm using flash professional 8.
Thanks so much!
Rob
Attaching Dynamic Movie Clips On A Stage Movie Clip
Hi guys ,
I am calling more images in dynamic movieclip on the stage from XML file and show them on the stage after that evry movieclip is draggable and there is lots of labels (movieclips) on which i have to drag the images called from xml files and placed on that label , label is also draggable once when i placed object on the label moviecli then when i drag the label all images placed in side the label should also move with the label .
And there might be more labels and more images , i can place any images in a label or more images on different label but will work siimilarly described above .
So please suggest me and help me out ASAP.
Putting Movie Clips In AS3 Package Into Movie Clip On Stage
Hi - I am a as2/flash animator and am working on an AS3 project. The AS is in a separate file, inside a package. I am modifying existing code.
The script adds movie clips in a function via addchild.
What I am hoping to do, is have the movieclips added to a clip that already exists on the stage.
I put a clip on the stage named holder, with the instance name holder_mc - and I tried to add the clip with holder_mc.addchild in the AS3 file - it seemed to work, but manipulating the holder_mc - it looks like the added clips are not affected?
Any help is appreciated.
Continuous Play Of Several Movie Clips From One Main Movie Clip
hi,
i'm trying to play several movie clips, one after the other from one main movie clip.
i've got 8 movie clips, "m1.swf", "m2.swf", etc. "m8.swf", and one main movie clip, "play.swf".
i've tried using loadMovie, but it only plays the last movie clip. this is what i've got.
in the main movie clip, i've put a play button, and the actionscript i have in the button is:
on(release)
{
this.loadMovie("m1.swf",play);
//this.unloadMovie("m1.swf");
this.loadMovie("m2.swf",play);
//this.unloadMovie("m2.swf");
this.loadMovie("m3.swf",play);
//this.unloadMovie("m3.swf");
this.loadMovie("m4.swf",play);
//this.unloadMovie("m4.swf");
this.loadMovie("m5.swf",play);
//this.unloadMovie("m5.swf");
this.loadMovie("m6.swf",play);
//this.unloadMovie("m6.swf");
this.loadMovie("m7.swf",play);
//this.unloadMovie("m7.swf");
this.loadMovie("m8.swf",play);
//this.unloadMovie("m8.swf");
}
is this wrong? how can i get this to work correctly. really important that i get this working for my job.
any help will be greatly appreciated.
cheers
Deleting Child Movie Clips In Parent Movie Clip
ok so I when I click the bt1 I want it to make the home_text visible and remove all of the movie clips within the CreateXMLGallery function. But when I do gallery.removeMovieClip() it only deletes the gallery and none of the other movie clips that are created within the gallery. Any ideas why? here is the code.
HTML Code:
stop();
/***********Button Functions*************/
launch_mc._visible = false;
easeSpeed = 5;
slider_mc.onEnterFrame = function() {
this._x += (xMove1-this._x)/easeSpeed;
};
bt1.onRollOver = function() {
bt1.blendMode = "invert";
};
bt1.onRollOut = function() {
bt1.blendMode = "normal";
};
bt1.onPress = function() {
xMove = bt1._x;
};
bt1.onRelease = function() {
gallery.removeMovieClip();
home_txt._visible = true;
};
bt2.onRollOver = function() {
bt2.blendMode = "invert";
};
bt2.onRollOut = function() {
bt2.blendMode = "normal";
};
bt2.onPress = function() {
xMove = bt2._x;
};
bt2.onRelease = function() {
gallery.removeMovieClip();
home_txt._visible = false;
createXMLGallery(webXML);
};
bt3.onRollOver = function() {
bt3.blendMode = "invert";
};
bt3.onRollOut = function() {
bt3.blendMode = "normal";
};
bt3.onPress = function() {
xMove = bt3._x;
};
bt3.onRelease = function() {
gallery.removeMovieClip();
home_txt._visible = false;
createXMLGallery(interactiveXML);
};
bt4.onRollOver = function() {
bt4.blendMode = "invert";
};
bt4.onRollOut = function() {
bt4.blendMode = "normal";
};
bt4.onPress = function() {
xMove = bt4._x;
};
bt4.onRelease = function() {
gallery.removeMovieClip();
home_txt._visible = false;
createXMLGallery(avXML);
};
bt5.onRollOver = function() {
bt5.blendMode = "invert";
};
bt5.onRollOut = function() {
bt5.blendMode = "normal";
};
bt5.onPress = function() {
xMove = bt5._x;
};
bt5.onRelease = function() {
gallery.removeMovieClip();
home_txt._visible = false;
createXMLGallery(designXML);
};
/**********End Button Functions**********/
/**********Load XML files**********/
var webXML:XML = new XML();
webXML.ignoreWhite = true;
webXML.onLoad = function(success) {
if (success) {
//trace("web XML File Loaded");
}
};
webXML.load("web.xml");
var interactiveXML:XML = new XML();
interactiveXML.ignoreWhite = true;
interactiveXML.onLoad = function(success) {
if (success) {
//trace("interactive XML File Loaded");
}
};
interactiveXML.load("interactive.xml");
var avXML:XML = new XML();
avXML.ignoreWhite = true;
avXML.onLoad = function(success) {
if (success) {
//trace("audio video XML File Loaded");
}
};
avXML.load("audiovideo.xml");
var designXML:XML = new XML();
designXML.ignoreWhite = true;
designXML.onLoad = function(success) {
if (success) {
//trace("audio video XML File Loaded");
}
};
designXML.load("design.xml");
/**********XML files loaded**********/
/**********Create the Gallery*******/
function createXMLGallery(whichXML) {
var gallery:MovieClip = createEmptyMovieClip("gallery", getNextHighestDepth());
gallery._x = 70;
gallery._y = 170;
var numImages = whichXML.firstChild.childNodes.length;
var spacing:Number = 60;
var columns:Number = 3;
for (var i:Number = 0; i<numImages; i++) {
this.proj_name = whichXML.firstChild.childNodes[i].firstChild.firstChild.nodeValue;
this.proj_type = whichXML.firstChild.childNodes[i].firstChild.nextSibling.firstChild.nodeValue;
this.thumbHolder = whichXML.firstChild.childNodes[i].firstChild.nextSibling.nextSibling.firstChild.nodeValue;
this.picHolder = whichXML.firstChild.childNodes[i].firstChild.nextSibling.nextSibling.nextSibling.firstChild.nodeValue;
this.proj_media = whichXML.firstChild.childNodes[i].firstChild.nextSibling.nextSibling.nextSibling.nextSibling.firstChild.nodeValue;
this.description = whichXML.firstChild.childNodes[i].firstChild.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.firstChild.nodeValue;
this.proj_link = whichXML.firstChild.childNodes[i].firstChild.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.nextSibling.firstChild.nodeValue;
this.thumbViewer = gallery.createEmptyMovieClip("thumb"+i, i);
this.thumbViewer._x = (i%columns)*spacing;
this.thumbViewer._y = Math.floor(i/columns)*spacing;
this.thumbLoader = this.thumbViewer.createEmptyMovieClip("thumbnail_image", getNextHighestDepth());
this.thumbViewer.description = this.description;
this.thumbViewer.picHolder = this.picHolder;
this.thumbViewer.proj_link = this.proj_link;
this.thumbViewer.proj_name = this.proj_name;
this.thumbViewer.proj_type = this.proj_type;
this.thumbViewer.proj_media = this.proj_media;
this.thumbViewer.whichXML = whichXML;
this.thumbLoader.loadMovie(this.thumbHolder);
this.thumbViewer.onRollOver = function() {
var proj_name = this.proj_name;
captionFN(true, proj_name, this);
this.onRollOut = function() {
captionFN(false);
};
};
this.thumbViewer.onRelease = function() {
launch_mc._visible = true;
var url = this.proj_link;
var type = this.proj_type;
var media = this.proj_media;
launch_mc.onRelease = function() {
if (type == "Website") {
getURL(url);
} else if (type == "Interactive") {
trace(url);
fscommand("exec", url);
} else if (type == "Design") {
var shade:MovieClip = createEmptyMovieClip("shade", getNextHighestDepth());
with (shade) {
beginFill(0xFFFFFF, 75);
moveTo(0, 0);
lineTo(Stage.width, 0);
lineTo(Stage.width, Stage.height);
lineTo(0, Stage.height);
lineTo(0, 0);
}
shade.useHandCursor = false;
shade.onRelease = function() {
trace("OUCH");
};
shade.onPress = function() {
trace("OUCH");
};
var imageViewer:MovieClip = attachMovie("imageviewer", "imageView", getNextHighestDepth());
imageView._x = Stage.width/2-imageViewer._width/2-10;
imageView._y = Stage.height/2-imageViewer._height/2;
var closeMovie:MovieClip = attachMovie("close", "closeMov", getNextHighestDepth());
closeMovie._x = 568;
closeMovie._y = 75;
closeMovie._width = 48;
closeMovie._height = 19;
closeMovie.onRollOver = function() {
this._alpha = 50;
};
closeMovie.onRollOut = function() {
this._alpha = 100;
};
closeMovie.onRelease = function() {
imageView.removeMovieClip();
closeMovie.removeMovieClip();
shade.removeMovieClip();
thumb.removeMovieClip();
};
var thumb:MovieClip = createEmptyMovieClip("thumb", getNextHighestDepth());
thumb.attachMovie(url, "urlofmovie", getNextHighestDepth());
thumb._x = Stage.width/2-thumb._width/2-10;
thumb._y = Stage.height/2-thumb._height/2;
} else if (type == "Video") {
fscommand("exec", url);
}
};
var thumbInfo:MovieClip = createEmptyMovieClip("thumbinfo", getNextHighestDepth());
//Description field attributes
createTextField("desc", getNextHighestDepth(), 555, 170, 200, 300);
desc.border = false;
desc.multiline = true;
desc.wordWrap = true;
var my_fmt:TextFormat = new TextFormat();
my_fmt.font = "Verdana";
my_fmt.size = 12;
my_fmt.align = "justify";
desc.text = this.description+"
Media: "+media;
desc.selectable = false;
desc.textColor = 0xffffff;
desc.setTextFormat(my_fmt);
//End description field attributes
thumbInfo.loadMovie(this.picHolder);
thumbInfo._x = 315;
thumbInfo._y = 200;
};
}
}
/**************End Gallery*******************/
How Do I Move Movie Clips When A Drag Object Is Over/between 2 Movie Clip
Hi Folks,
I have a Drag and Drop Exercise. 6 Drag Items and 2 Drop Locations.
What I want is when there are 2 drop items/movie clips already on stage and you Drag the 3rd Movie Clip INBETWEEN 2 Existing Movie Clips, the 2nd Movie Clip shifts down and a place is created for the 3rd Movie Clip.
Source file FLA attached, Saved as Flash 8 From CS3
Thanks
RG
http://www.4shared.com/file/24611229...055_ForEE.html
Help With 'locking' Movie Clips To Another Scrolling Movie Clip.
Hi there, I am working on a project that needs a map of a city. Because the map is too big to fit on screen I decided to have controls to pan it around north south east and west. This works fine, but I want to represent points of interest throughout the city with animated movieclips overlaid on the map.
I have set up the movie so that the overlaid clips scroll with the map, however when the map reaches its boundaries the overlaid clips keep scrolling. So in effect what I need is to find a way to 'lock' the overlaid clips onto the _x and _y axis of the map. Any ideas how I can do this?
I realise this might be a little hard to understand on its own, so I have included the .fla file for you to play around with. Any help with this would be much appreciated.
How To Stop All Movie Clips Inside A Movie Clip
Is there a way to do stop/pause all the movie clips inside a Big movie clip?
I wanna control the movie clips as well with a slider. Yes i can control the Big movie clip yet i couldn't control those movie clips lie inside that Big movie clip.
Anybody can help ?
Access Movie Clips From Inside Another Movie Clip
Hi!
I have some objects (movie clips) on my stage on different layers, but all in the first frame of a layer. And now I want to access this movie clips from inside another movie clip, which is also on the stage like the others.
So my question is: How can I access this movieclips so that I can do for example <movieclip_outside>.gotoandplay("in"); or something like this.
Greets, Tschouba
Edited: 02/09/2008 at 11:09:30 AM by Tschouba
How To Tell Movie Clip To Go To Another Movie Clips 62th Frame?
i have main movie clip named "remote".
and inside that there is another which holds the menu named "menu"
and inside the menu i have "symbol 8" which calls and external swf and also has to call the "remote"s 62 th frame.
no symbol 8 has thic action on it
on (release) {
_root.contents.loadMovie("stilllife.swf");//external swf
gotoAndplay(62) //here i must identify the movie clip "remote" i think
}
can you help mee?
[help As2] How To Access Movie Clips' _y Inside A Movie Clip
i got a school flash project where i need to access the _y properties of many movie clips buttons that set with name like sel 1 sel2 sel 3 and so on
the problem is i have 2 sets of those, one on the main timeline which i can access with "for" looped _root["sel"+i]._y and one which is inside another movieclip
problem is i don't know how to access the later using for loop can someone help me with that?
this is the script that i used to access the _y on the _root.selx
Code:
for (i=1; i<numberOfButtons+1; i++) {
if ((mySelection == i)&&(this._y != _root["sel"+i]._y)) {
this._y = _root["sel"+i]._y;
}
}
anyone can help? please *begging*
[F8] Movie Clip Navigation By Movie Clips?
I have a movieclip of a navigation menu that folds out, then I want to add movie clip buttons inside that navigation menu, but when clicked they won't follow the link, it's like they're underneath the main hit area for the MC..... Any ideas on why?? Thanks
Attaching Several Movie Clips Into A Movie Clip...
Hi;
I'm trying to attach several movie clips into another movie clip. I can add the movie clips successfully . However, the movie clips start from the middle of the main movie clip that I used as the background layer for the other movie clips. Is there any way to make it located to the top left? Here is the code I used:
Code:
Layer_Movie.attachMovie("NumberTop","num",depth,{ _x: scol + (col * 32), _y: scol - 32 });
scol and srow are the attributes that represents the starting locations from the left and top. (I used 10 for the variables scol and srow the movie should be located 10 pixels away from the top and left) 32 is the height and also width of the movie clip to be added.
Is it hopeless? (I know sometimes actionscript is not so powerful to implement such kind of processes. Since I have not time to wait for the another version of actionscript, I must find a solution for that problem)
Please help...
Masking A Movie Clip That Contains Other Movie Clips
hi,
i am just trying out something in flash but it just doesnt work.
I have a layer which has a movie clip which contains other movieclips in itself.
Masking the layer that has the main movie clip causes the other movieclips in the main one to disappear when running the swf.
Does any one have any idea how to get around this???
thanks
Masking A Movie Clip That Contains Other Movie Clips
hi,
i am just trying out something in flash but it just doesnt work.
I have a layer which has a movie clip which contains other movieclips in itself.
Masking the layer that has the main movie clip causes the other movieclips in the main one to disappear when running the swf.
Does any one have any idea how to get around this???
thanks
Attaching Several Movie Clips Into A Movie Clip...
Hi;
I'm trying to attach several movie clips into another movie clip. I can add the movie clips successfully . However, the movie clips start from the middle of the main movie clip that I used as the background layer for the other movie clips. Is there any way to make it located to the top left? Here is the code I used:
Code:
Layer_Movie.attachMovie("NumberTop","num",depth,{ _x: scol + (col * 32), _y: scol - 32 });
scol and srow are the attributes that represents the starting locations from the left and top. (I used 10 for the variables scol and srow the movie should be located 10 pixels away from the top and left) 32 is the height and also width of the movie clip to be added.
Is it hopeless? (I know sometimes actionscript is not so powerful to implement such kind of processes. Since I have not time to wait for the another version of actionscript, I must find a solution for that problem)
Please help...
Attaching Movie Clips To Another Movie Clip
I'm attaching (and then removing) relevant movie clips to an empty movie clip that is shown in a scrollpane. It all works fine when triggered from buttons, but when the flash file is first loaded no clip is attached and thus nothing is displayed in the scrollpane. What am I doing wrong?
This is the function I trigger through the buttons and when the file is first loaded:
function loadScroll(the_page)
{
//create delay for component to initialize
i = 1;
this.onEnterFrame = function()
{
i++;
if (i>5)
{
switch (the_page)
{
case "xmlGallery.html":
empty_mc.testreal_mc.removeMovieClip();
empty_mc.attachMovie("gallery", "galleryreal_mc", empty_mc.getNextHighestDepth());
scrollpane.invalidate();
break;
default:
empty_mc.galleryreal_mc.removeMovieClip();
empty_mc.attachMovie("test_mc", "testreal_mc", empty_mc.getNextHighestDepth());
empty_mc.testreal_mc.myTable.createTable(the_page) ;
scrollpane.invalidate();
}
delete this.onEnterFrame;
}
};
test_mc.myTable.onTableRendered = function()
{
scrollpane.hScrollPolicy = "false";
};
loadPicture();
}
Controlling A Movie Clip With Other Movie Clips
I have a set of buttons, each being a different movie clip, and then I have a movie clip with a different JPEG image in every frame.
The buttons are named button1. button2, button3, etc, and I want each of them to move the timeline of the movieclip containing the images to its corresponding frame.
So for example when I press the "button1" the movie clip with the images will go to the frame number one and display the image that is in that frame. Then if I press the "button4" then that same movie clip will go to frame number 4.
Any ideas of how to do this? I understand actionscript but im not good coming up with solution, thanks
Turning On Movie Clips Within The Main Clip
This might be a very stupid question, but is it possible to load a movie clip dynamically into the main clip, and have some AS on that loaded clip that tells another clip, already in the main clip from the start, to play???
I know how to do this when it involves two dynamically loaded clips...
onClipEvent (load) {
loadMovie("pic1.swf", _root.target);
}
But what about when the clip is already sitting there, ready to be played???
For example, if pic1 was a movie clip and not a SWF file, and it had a stop on the first frame....can I get an onClipEvent to play it from frame 2?
Movie Clip Navigation....how To Get Clips To Function Others
Hi
heres whats going on.
I have a work page.
it loads a movie clip with a sliding background.
there are four movie clips inside that sliding background
there are four buttons that controll which page to slide to.
question 1. i have an mp3 player on one of the sliding backgrounds. i would like the player to stop when i slide out of that page.
question 2. on one of the pages i have movie clips that are acting as buttons. I am loading vars from a text file...the page works on its own but when it loadis into the work page the text disappears...but the getURL and roll over work.....
okay, i think i understand whats happening...its something to do with accessing the correct paths... i think....hope...you name it
so the big question...how do i access movie clips nested deep inside other movie clips....
if this is a big jumbled mess let me know and i'll try and be more succinct
i can't post the fla because its not my file to post...you can visit the mess at http://www.artboyinc.com for the visual reference
if you've gotton this far thanks....
ponyack
[F8] How To Open Three Movie Clips In A Clip In A Timeline By Button?
I have this in the main timeline:
Code:
var flashArray = new Array("flash/hockey.swf","flash/baseball.swf","flash/armenair.swf");
for(var i=0;i<=flashArray.length-1;i++){
this["btn"+i].num = i;
this["btn"+i].onRelease = function() {
loadMovie(flashArray[this._name.slice(3,4)], content);
}
}
the problem is that I don't know how I'm going to include the middle "mc" (from the hierarchy) before the mc1, mc2, or mc3.
See attachment below for the hierarchy structure.
Movie Clip Button Inside Some Movies Clips
hey guys..
well i have 12 animated movie clip buttons inside a movie called insidesend_mc thats inside a movie clip called sendmenu_mc, so its like this.
sendmenu_mc.insidesend_mc
well i can target the movie clip buttons fine when i write the following code within the insidesend_mc on an actions layer i made with the following code.
Code:
this.team1btn_mc.onRelease = function() {
if (_global.Isteam1btn == 0) {
_root.sendmenu_mc.insidesend_mc.team1btn_mc.gotoAndPlay("_flashing");
} else if (_global.Isteam1btn == 2) {
_root.sendmenu_mc.insidesend_mc.team1btn_mc.gotoAndPlay("_idle");
}
};
but what im wanting cos i am wanting to beable to put them on the main timeline of the swf and the following code which i think should work for that dosent work when i put it on the main timeline first frame.
Code:
this.sendmenu_mc.insidesend_mc.team1btn_mc.onRelease = function() {
if (_global.Isteam1btn == 0) {
_root.sendmenu_mc.insidesend_mc.team1btn_mc.gotoAndPlay("_flashing");
} else if (_global.Isteam1btn == 2) {
_root.sendmenu_mc.insidesend_mc.team1btn_mc.gotoAndPlay("_idle");
}
};
and im wanting it on the first frame of the main timeline because i have arrays that that i want to add values too when thease buttons are clicked on and i cant do that if the other code is inside the movieclips.
i know how to make it add to the array its just i need the onrelease code for the movie clip buttons to be on the first frame of the main timeline.
This is an animated menu btw if ur wondering why its setup how it is.
Thanks in advanced hope someone can help.
How To Open Three Movie Clips In A Clip In A Timeline By Button?
I want this structure (hierarchy):
Quote:
main timeline
|------ mc
|------ mc1
|------mc2
|------mc3
see the image below.
The main timeline has three buttons. Each should open one mc which would open mc1, mc2, mc3 whichever button is clicked.
How can this be done?
I tried to add loadMovie("flash/flame.swf", ifr); but it didn't work. It opens the flames.swf but not the level 2 movie clip (level 2 right? ...since level 0 is the main timeline)
Code:
var flashArray = new Array("flash/hockey.swf","flash/baseball.swf","flash/armenair.swf");
for(var i=0;i<=flashArray.length-1;i++){
this["btn"+i].num = i;
this["btn"+i].onRelease = function() {
loadMovie("flash/flame.swf", ifr);
loadMovie(flashArray[this._name.slice(3,4)], ifr.content);
}
}
Movie Clip Button Inside Some Movies Clips HELP
hey guys..
well i have 12 animated movie clip buttons inside a movie called insidesend_mc thats inside a movie clip called sendmenu_mc, so its like this.
sendmenu_mc.insidesend_mc
well i can target the movie clip buttons fine when i write the following code within the insidesend_mc on an actions layer i made with the following code.
this.team1btn_mc.onRelease = function() {
if (_global.Isteam1btn == 0) {
_root.sendmenu_mc.insidesend_mc.team1btn_mc.gotoAn dPlay("_flashing");
} else if (_global.Isteam1btn == 2) {
_root.sendmenu_mc.insidesend_mc.team1btn_mc.gotoAn dPlay("_idle");
}
};
but what im wanting cos i am wanting to beable to put them on the main timeline of the swf and the following code which i think should work for that dosent work when i put it on the main timeline first frame.
this.sendmenu_mc.insidesend_mc.team1btn_mc.onRelea se = function() {
if (_global.Isteam1btn == 0) {
_root.sendmenu_mc.insidesend_mc.team1btn_mc.gotoAn dPlay("_flashing");
} else if (_global.Isteam1btn == 2) {
_root.sendmenu_mc.insidesend_mc.team1btn_mc.gotoAn dPlay("_idle");
}
};
and im wanting it on the first frame of the main timeline because i have arrays that that i want to add values too when thease buttons are clicked on and i cant do that if the other code is inside the movieclips.
i know how to make it add to the array its just i need the onrelease code for the movie clip buttons to be on the first frame of the main timeline.
This is an animated menu btw if ur wondering why its setup how it is.
Thanks in advanced hope someone can help.
How To Open Three Movie Clips In A Clip In A Timeline By Button?
I want this structure (hierarchy):
Quote:
main timeline
|------ mc
|------ mc1
|------mc2
|------mc3
see the image below.
The main timeline has three buttons. Each should open one mc which would open mc1, mc2, mc3 whichever button is clicked.
How can this be done?
How To Open Three Movie Clips In A Clip In A Timeline By Button?
I want this structure (hierarchy):
Quote:
main timeline
|------ mc
|------ mc1
|------mc2
|------mc3
see the image below.
The main timeline has three buttons. Each should open one mc which would open mc1, mc2, mc3 whichever button is clicked.
How can this be done?
I tried to add loadMovie("flash/flame.swf", ifr); but it didn't work. It opens the flames.swf but not the level 2 movie clip (level 2 right? ...since level 0 is the main timeline)
Code:
var flashArray = new Array("flash/hockey.swf","flash/baseball.swf","flash/armenair.swf");
for(var i=0;i<=flashArray.length-1;i++){
this["btn"+i].num = i;
this["btn"+i].onRelease = function() {
loadMovie("flash/flame.swf", ifr);
loadMovie(flashArray[this._name.slice(3,4)], ifr.content);
}
}
Locating A Clip's Position & Controlling Multiple Movie Clips
I'm using Flash MX and attaching a Movie Clip (Directions_mc) into my main time line. There is also another movie clip existing on my timeline (ntr). Later I want to stop the play of both movie clips from a button within an attached Movie (swf) file. This stop action needs to be able to occur at any point in my movie.
My code to attach the movie is:
DirText = new Object ();
DirText._x = 430;
DirText._y = 250;
attachMovie("Directions_mc", "Directions", 1, DirText);
I've also tried to specify a level at the beginning of the attachMovie
portion of the code as follows:
DirText = new Object ();
DirText._x = 430;
DirText._y = 250;
_level5.attachMovie("Directions_mc", "Directions", 1, DirText);
My code on my button is:
on (release) {
_level0.ntr.stop(); //this code stops an instance of another movie clip on my main movie timeline
_level0.Directions. stop();
}
If I specify a level in the attachMovie command, my movie clip does not display. It displays fine without it.
My button stops one movie clip (ntr) but will not stop my attacheMovie clip from playing at all.
I've also traced my clip that wont stop using the following command:
trace (typeof(_level0.Directions)); //
The trace results are "undefined".
It looks like I have no idea where this clip is living.
Anyone have any suggestions?
Changing Size Of Child Clips To Match Parent Movie Clip?
I have a program that is dynamically loading images into a nested movie clip. The Parent movie contains the two separate movies within it and images are to switch back and forth in them. I need to know how I can use action script to load these nested movies to the exact dimension of the parent movieclip.
Here is my code:
onClipEvent (load) {
StagePictures._lockroot = true;
e_mc.loadMovie(_root.PathText+_root.imageClips[0]);
}
onClipEvent (enterFrame) {
if (Key.isDown(a number)) {
if (Key.isDown(Key.something)) {
if (Key.isDown(a number)) {
_root.StagePictures.e_mc.createEmptyMovieClip("Sec ondClip" , 3);
_root.StagePictures.e_mc.SecondClip.loadMovie(_roo t.PathText+_root.imageClips[1]);
_root.ScoreBox.text = scvar+1;
_root.Command.text = _root.imageCommand[1];
_root.Response.text = "Correct!";
}
}
}
}
StagePictures is the parent clip, e_mc is a child, and SecondClip is a child within e_mc.
Both e_mc, and SecondClip are loading the dynamic images which are the paths labeled _root.PathText+_root.imageClips[0, and 1];
The size of the images need to be contained within the size of the parent clip of both called StagePictures.
How can I set the size of the two nested clips to match the parent?
Thanks,
sam
AttachMovie - Looping Thru An Array To Attach 6 Movie Clips Into An Empty Clip
Heres my issue...
Im loading in 6 different external icon button images using an XML file into an movieclip. well now i dont want external images to load from an xml file, i want the images to be inside flash in the library. I gave them a linkage name and made an array of them called menuIcons.
how do i get my icon images to load into flash without loading external images from an xml file...
heres my code..
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
var nodes = this.firstChild.childNodes;
numOfItem = nodes.length;
for (var i=0; i<numOfItem; i++)
{
menuIcons = ["healthySkin", "environMoist", "lowerSkin", "drySkin", "waterInfusion", "healthyCellular"];
var t = home.attachMovie("item", "item" + i, i + 1);
t.angle = i * ((Math.PI * 2)/numOfItem);t.onEnterFrame = mover;
t.nameClip = (nodes[i].attributes.nameClip);
t.content = (nodes[i].attributes.content);
t.icon.inner.loadMovie(nodes[i].attributes.image);t.icon.onRollOver = over;
t.icon.onRollOut = out;
t.icon.onRelease = released;
}
}
thanks
slalonde44
Play Movie Clips To Fade Off THEN Play New Movie Clip
Hey guys, I've been doing a little searching and I can't find the answer to my dilemma.
I've made up some buttons that play a little movie clip animation when pressed. The scenario is like this: Push the "Illustration" button and little files pop onto the screen. Each file will be a button that opens up an image. Push the "Pictures" button and the "Illustration files" should fade off the screen so the "Pictures files" could pop in in it's place.
I can't find a way to make the "Pictures" movie WAIT for the "Illustration" movie to be done before it pop in. One goes in, and the other simultaneously goes out and I don't want that.
Is there any way?
How To Remove All Movie Clips/array: Movie Clips Carry Over To Next Frames/ Scenes
Hi: I am creating a small game. So far so good, but only problem I have come across is when I jump to another frame or scene, previous movieclips (using an array) that are still running carry over to the next frame/scene.
See attached if you have some time- start clicking on answers in the game, and when time runs out some movie clips that are still running will remain on top of my end frame and carry over to the next scene as well.
Is there any sort of remove all movie clips or "clear all" type of actionscript?
thanks in advance!
Maintaining Event Behavior For Movie Clips Nested In Movie Clips
Is there any way to maintain a clip's event callbacks when said clip is nested in a parent clip that has its own definitions for those callbacks?
In other words, if clip B has a definition for .onPress and clip A has a definition for .onPress, is there anyway to maintain clip B's definition if it is nested in clip A?
I have tried doing it by making clips into movie clip subclasses but it doesn't work... but how do components work then?
Loading Txt Clips--scroll Arrow Stays Down From Clip To Clip
Hi there,
I found a nifty piece of code that loads external txt files into a movie clip, complete with scroll arrows, and it's working like a charm--almost. The client has had the audacity to find a bug: if you summon up one text file, scroll to the bottom of it, and then click to load a different text file, that second text file will appear at the end of the text, not at the beginning; somehow the arrow stays scrolled. I don't think I can figger out how to fix this.
The problem can be viewed here: http://www.nicholsongallery.com (click on artists, then click on any artist name--that will load a text file. Scroll down the bio, and the next bio you load will also be scrolled. Sux!
The .fla is here: http://www.amnecia.com/jn/artists2.fla
If anyone has any advice, that would be great. Thanks a lot.
Peace,
necia
How Do I Load/stream Individual Movie Clips Within Other Movie Clips
I am using flash 5
I have a movie with a huge movie clip in it and that movie clip has lots of movie clips inside that. how do I load each one individually so when the viewer clicks on abutton it starts to laod the related movie clip.
Please help.. I'm working on borrowed time and borrowed money
Movie Clips Within Movie Clips: Text Link Problem
Hello.
I have a Movie Clip that is my main one with another Movie Clip inside of it. In the subordinate Movie Clip, I wish to have text linking frame (13) to frame (14) for instance. The problem that manifests is that while buttons is the subordinate Movie Clip link to frames within it with no complications, the text link from 13 to 14 with its respective code links to the last frame (would be 14) in the main Movie Clip.
Am I doomed to convert all text links to buttons in the subordinate Movie Clip or is there (what I am praying for) a code to work around this and keep frame links confined to the subordinate Movie Clip? I would appreciate any help that anyone can offer regarding this problem. Many Thanks.
Movie Clips Acting As Buttons Can't Load Other Movie Clips
Frame 1 has three movie clips on it, instance names are A, B, C. I have the following actionscript on frame 1 as well:
stop();
import flash.filters.GlowFilter;
ar = [A, B, C];
for(var z=0; z<ar.length; z++) {
ar[z].onRollOver = rollover;
ar[z].onRollOut = rollout;
}
function rollover() {
this.swapDepths(0);
this.filters = [new GlowFilter(0x333333, .20, 7, 7)];
}
function rollout() {
this.filters = null;
}
This code creates a glow, obviously, on whatever movie clip I rollover. What I want to do as well is this:
I want to click on mc "A" and have it launch a different movie clip (let's say "X") on top of everything else (so that A, B and C are still visible in the background). "X" is in a sub-folder of "A" if that makes any sense or is relevant. Same kind of action for mc's B and C. B should launch mc "Y" and C should launch mc "Z".
What is the actionscript for this? Any questions please let me know. Please respond, I need this info as soon as possible. Much appreciated!!
Text
External Movie Clips With Multiple Menu Movie Clips
It's pretty late and I don't think i have enough time to search this question in the forums but here I go. Sorry If I upset someone for making a topic that already exists.
I have a main timeline that im importing an external movie clip in. This external movie clip is named "members" it has several buttons that load other external movie clips into a window within "members" . What do I need to do to make this work. Do I need to use "this, _parent, _root, level(s) or "whatever.swf". If you can help me out that will be great. I'll make it up to you down the road. No sexual favor please.
I'm using flash mx 2004 btw.
Thanks in advanced
Making A Movie Clip In A Movie Clip Go To The Next Frame Of The Original Movie Clip
I have a movie clip (for simplicity I'll call it movie_a) in movie_a I have another movie clip movie_b.
in movie_a i have a button that when pressed makes movie_b play (it has a stop frame every once in a while so the button acts as a "next" button)
I want it so that when i get to the last frame of movie_b and press the button, it will go to the next frame of movie_a
I hope that doesn't confuse u and u can help me solve this problem, as i am stumped and I've tried everything I could think of (which isn't that much as I'm not too good with actionscript)
thnx
[MX04]Movie That Works Fine When Clips Apart Acts Strange When Clips Are Together.
Hi,
I have a pretty basic movie in which a ball moves along a track.
The track is made up of 3 sections & all I want the movie to do is trace an ID number (num) that is an individual property of that clip when it goes over it.
In the first movie attached below “trackOne” the whole thing works great! However in the other movie “trackTwo” I have moved the clips closer together & the whole thing has gone crazy with the following issues.
1.)The “trace” command fires on every “onEnterClip” event
2.)A text field that is used to show the ID number only changes when the ball is fully over the clip not as it first touches it, as it does in the first movie
3.)Although the ball is full off a clip it keeps tracing it’s ID number together with the new clips number?
Anybody able to help me on this?
Screwy Stuff With Movie Clips Within Movie Clips
This is kind of difficult to explain but here it goes...
I have created a Barney's like slide site and have gotten it to work fine. the problem I'm having is when I take scroll text box and try to place it on the movie clip that is going to be the part of the site that is going to slide out.
The whole thing slides fine and the scroll box is visible. However, the text is not visible therefore I'm not sure if the up/down buttons are actually working.
The scroll box is a movie clip itself with "on(release)" commands on the buttons. The "onClipEvent" commands are added to the textbox when the scroller movie clip is brought into the slider movie clip.
Is this something that just isn't supposed to work or I am doing some thing dreadfully wrong?
Thanks in advance,
Fakeout
|