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!
FlashKit > Flash Help > Flash General Help
Posted on: 12-18-2008, 11:44 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Remove Dyn Dup Movie Clips All At Once
Ive created a button that on each press duplicates a movieclip called "cir".
I now want to create a button that clears all the dup mc at once.
Ive tried to do the same code witht he removeMovieClip but it only removes the dups one at a time
//to duplicate movie clip
on (press) {
i = i+1;
duplicateMovieClip ("cir", "cir"+i, i);
_root["cir"+i]._x += 100;
_root["cir"+i]._y += 0;
}
any ideas on where to get started
thanks
Dave
Remove ALL Movie Clips
hi, i was wondering if there was a way to remove ALL movie clips current on the stage. I attached all the movie clips using attachMovie, and i was wondering if there was a way to just remove them all or is attaching them into an empty movie clip and removing that movie clip the only way?
-thnx
Possible To Remove All Movie Clips?
I'm currently working on a project and I can't find any code that allows you to remove all movie clips that are on the stage at once. Does anyone know how to do this?
Cannot Remove Movie Clips
Hi!... I'm creating a game and am having issues removing a movie clips.
I currently have:
Code:
_root.attachMovie('slider', 'slider_mc', -1);
and I'm trying to remove it when the timer goes to "0"... like so:
Code:
var seconds = 10;
var miliseconds = 10;
function tellTime() {
if (miliseconds<10) {
time_txt.text = seconds+":"+"0"+miliseconds;
} else {
time_txt.text = seconds+":"+miliseconds;
}
miliseconds--;
if (miliseconds<0) {
miliseconds = 10;
seconds--;
}
if (seconds<0) {
clearInterval(id);
time_txt.text = "Game Over";
MovieClip.removeMovieClip("slider_mc");
}
}
id = setInterval(tellTime, 100);
I've tried so many variations... including:
- MovieClip.removeMovieClip("slider_mc");
- removeMovieClip("slider_mc");
- removeMovieClip('slider_mc');
- slider_mc.removeMovieclip();
but I am new to coding. Please help!
Remove Movie Clips
I am using Kirupa's random motion tutorial for creating 7 movie clips.
ActionScript Code:
i = 0;while (i <= 7) { hydro.duplicateMovieClip("hydro"+i, i); i++;}
I have a variable called "alter." If it is a positive number, it will add that number of movie clips. If it is negative, it will remove that many number of movie clips. So how do I modify the current code to do this?
Remove Movie Clips
lo all.. can anybody help with this.
its a friend of mine, he has a webcam, he wants to laod images in flash then remove a particular image, code so far:
counter = 2;
function update() {
newmovie = "JPG"+counter++;
duplicateMovieClip("JPG", newmovie, counter);
loadMovie(camurl, newmovie, "GET");
// NEED CODE HERE TO DELETE MOVIE CLIPS AFTER 5 MORE HAVE BEEN CREATED
}
as you can see he wants to remove mc's after 5 have been created. any ideas?
thnx in advance.
kev.
Remove Movie Clips
I have set up 2 buttons that load in different movie clips.
I am positioning these movie clips in different positions.
I am not sure how to unload them or removeMovieClip.
This is how I loaded the movie clips:
CODEbutton1_mc.onRelease = function() {
loadMovieNum("FirstMovie.swf", 1);
loadMovieNum("SecondMovie.swf", 2);
this.onEnterFrame = function() {
_level1._x = 60;
};
};
button2_mc.onRelease = function() {
loadMovieNum("FirstMovie.swf", 1);
loadMovieNum("SecondMovie.swf", 2);
this.onEnterFrame = function() {
_level1._x = 100;
};
};
Remove Movie Clips
I have a flash movie. This is the code that goes with this flash movie:
Code:
//----------------PLACE SUBNAV FUNCTION
initiateSubNav = function() {
_root.subNavSelect_mc._x = 120;
_root.subNavSelect_mc._y = 45;
}
//------------A BUTTONS
aButtons = function() {
initiateSubNav();
subNavY = header_mc._height + padding - 3;
var btn0 = ["four_mc", "http://"];
var btn1 = ["seven_mc", "http://"];
var btn2 = ["eight_mc", "http://"];
var btn3 = ["eleven_mc", "http://"];
var btn4 = ["fifteen_mc", "http://"];
var btn5 = ["sixteen_mc", "http://"];
_root.attachMovie(btn0[0], btn0[0], 50);
this[btn0[0]]._x = 120;
this[btn0[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn1[0], btn1[0], 51);
this[btn1[0]]._x = 120;
this[btn1[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn2[0], btn2[0], 52);
this[btn2[0]]._x = 120;
this[btn2[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn3[0], btn3[0], 53);
this[btn3[0]]._x = 120;
this[btn3[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn4[0], btn4[0], 54);
this[btn4[0]]._x = 120;
this[btn4[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn5[0], btn5[0], 55);
this[btn5[0]]._x = 120;
this[btn5[0]]._y = subNavY;
subNavY += 23;
}
//------------B BUTTONS
bButtons = function() {
initiateSubNav();
subNavY = header_mc._height + padding - 3;
var btn0 = ["one_mc", "http://"];
var btn1 = ["two_mc", "http://"];
var btn2 = ["three_mc", "http://"];
var btn3 = ["four_mc", "http://"];
var btn4 = ["six_mc", "http://"];
var btn5 = ["eight_mc", "http://"];
var btn6 = ["ten_mc", "http://"];
var btn7 = ["thirteen_mc", "http://"];
var btn8 = ["seventeen_mc", "http://"];
var btn9 = ["eighteen_mc", "http://"];
var btn10 = ["twentyone_mc", "http://"];
var btn11 = ["twentytwo_mc", "http://"];
_root.attachMovie(btn0[0], btn0[0], 50);
this[btn0[0]]._x = 120;
this[btn0[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn1[0], btn1[0], 51);
this[btn1[0]]._x = 120;
this[btn1[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn2[0], btn2[0], 52);
this[btn2[0]]._x = 120;
this[btn2[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn3[0], btn3[0], 53);
this[btn3[0]]._x = 120;
this[btn3[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn4[0], btn4[0], 54);
this[btn4[0]]._x = 120;
this[btn4[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn5[0], btn5[0], 55);
this[btn5[0]]._x = 120;
this[btn5[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn6[0], btn6[0], 56);
this[btn6[0]]._x = 120;
this[btn6[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn7[0], btn7[0], 57);
this[btn7[0]]._x = 120;
this[btn7[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn8[0], btn8[0], 58);
this[btn8[0]]._x = 120;
this[btn8[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn9[0], btn9[0], 59);
this[btn9[0]]._x = 120;
this[btn9[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn10[0], btn10[0], 60);
this[btn10[0]]._x = 120;
this[btn10[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn11[0], btn11[0], 61);
this[btn11[0]]._x = 120;
this[btn11[0]]._y = subNavY;
subNavY += 23;
}
//------------C BUTTONS
cButtons = function() {
initiateSubNav();
subNavY = header_mc._height + padding - 3;
var btn0 = ["one_mc", "http://"];
var btn1 = ["two_mc", "http://"];
var btn2 = ["three_mc", "http://"];
var btn3 = ["seven_mc", "http://"];
var btn4 = ["nine_mc", "http://"];
var btn5 = ["twelve_mc", "http://"];
var btn6 = ["fourteen_mc", "http://"];
_root.attachMovie(btn0[0], btn0[0], 50);
this[btn0[0]]._x = 120;
this[btn0[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn1[0], btn1[0], 51);
this[btn1[0]]._x = 120;
this[btn1[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn2[0], btn2[0], 52);
this[btn2[0]]._x = 120;
this[btn2[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn3[0], btn3[0], 53);
this[btn3[0]]._x = 120;
this[btn3[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn4[0], btn4[0], 54);
this[btn4[0]]._x = 120;
this[btn4[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn5[0], btn5[0], 55);
this[btn5[0]]._x = 120;
this[btn5[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn6[0], btn6[0], 56);
this[btn6[0]]._x = 120;
this[btn6[0]]._y = subNavY;
subNavY += 23;
}
//------------D BUTTONS
dButtons = function() {
initiateSubNav();
subNavY = header_mc._height + padding - 3;
var btn0 = ["one_mc", "http://"];
var btn1 = ["five_mc", "http://"];
var btn2 = ["nine_mc", "http://"];
var btn3 = ["ten_mc", "http://"];
var btn4 = ["seventeen_mc", "http://"];
var btn5 = ["eighteen_mc", "http://"];
var btn6 = ["nineteen_mc", "http://"];
var btn7 = ["twentyone_mc", "http://"];
var btn8 = ["twentyfive_mc", ""];
_root.attachMovie(btn0[0], btn0[0], 50);
this[btn0[0]]._x = 120;
this[btn0[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn1[0], btn1[0], 51);
this[btn1[0]]._x = 120;
this[btn1[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn2[0], btn2[0], 52);
this[btn2[0]]._x = 120;
this[btn2[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn3[0], btn3[0], 53);
this[btn3[0]]._x = 120;
this[btn3[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn4[0], btn4[0], 54);
this[btn4[0]]._x = 120;
this[btn4[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn5[0], btn5[0], 55);
this[btn5[0]]._x = 120;
this[btn5[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn6[0], btn6[0], 56);
this[btn6[0]]._x = 120;
this[btn6[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn7[0], btn7[0], 57);
this[btn7[0]]._x = 120;
this[btn7[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn8[0], btn8[0], 58);
this[btn8[0]]._x = 120;
this[btn8[0]]._y = subNavY;
subNavY += 23;
}
//------------E BUTTONS
eButtons = function() {
initiateSubNav();
subNavY = header_mc._height + padding - 3;
var btn0 = ["five_mc", "http://"];
var btn1 = ["eight_mc", "http://"];
var btn2 = ["twelve_mc", "http://"];
var btn3 = ["thirteen_mc", "http://"];
var btn4 = ["fourteen_mc", "http://"];
var btn5 = ["twentyone_mc", "http://"];
_root.attachMovie(btn0[0], btn0[0], 50);
this[btn0[0]]._x = 120;
this[btn0[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn1[0], btn1[0], 51);
this[btn1[0]]._x = 120;
this[btn1[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn2[0], btn2[0], 52);
this[btn2[0]]._x = 120;
this[btn2[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn3[0], btn3[0], 53);
this[btn3[0]]._x = 120;
this[btn3[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn4[0], btn4[0], 54);
this[btn4[0]]._x = 120;
this[btn4[0]]._y = subNavY;
subNavY += 23;
_root.attachMovie(btn5[0], btn5[0], 55);
this[btn5[0]]._x = 120;
this[btn5[0]]._y = subNavY;
subNavY += 23;
}
//----------------MASTER BUTTONS
kickNav = function() {
var b0 = ["buttonA_mc", "http://"];
var b1 = ["buttonB_mc", "http://"];
var b2 = ["buttonC_mc", "http://"];
var b3 = ["buttonD_mc", "http://"];
var b4 = ["buttonE_mc", "http://"];
NavY = header_mc._height + padding - 3;
_root.attachMovie(b0[0], b0[0], 10);
this[b0[0]]._x = 5;
this[b0[0]]._y = NavY;
NavY += 46;
this[b0[0]].onRelease = function() {
aButtons();
}
_root.attachMovie(b1[0], b1[0], 11);
this[b1[0]]._x = 5;
this[b1[0]]._y = NavY;
NavY += 46;
this[b1[0]].onRelease = function() {
bButtons();
}
_root.attachMovie(b2[0], b2[0], 12);
this[b2[0]]._x = 5;
this[b2[0]]._y = NavY;
NavY += 46;
this[b2[0]].onRelease = function() {
cButtons();
}
_root.attachMovie(b3[0], b3[0], 13);
this[b3[0]]._x = 5;
this[b3[0]]._y = NavY;
NavY += 46;
this[b3[0]].onRelease = function() {
dButtons();
}
_root.attachMovie(b4[0], b4[0], 14);
this[b4[0]]._x = 5;
this[b4[0]]._y = NavY;
NavY += 46;
this[b4[0]].onRelease = function() {
eButtons();
}
}
//Build Background Clip
buildBackground = function () {
createEmptyMovieClip("background_mc", "background_mc", 0);
background_mc._x = 0;
background_mc._y = 0;
background_mc.lineStyle(1, 0x000000, 0);
background_mc.beginFill(backgroundColor, 100);
background_mc.lineTo(Stage.width, 0);
background_mc.lineTo(Stage.width, Stage.height);
background_mc.lineTo(0, Stage.height);
background_mc.lineTo(0, 0);
background_mc.endFill();
};
/*----- INITIATE ------*/
backgroundColor = 0x777777;
kickNav();
Remove Duplicate Movie Clips
in my movie iv got duplicate movie clips moving around the stage
you click on them and it adds to a score
when the score hits 10 it goes to next scene but the moives are still
playing in the background how do i get ride of them?
On Press, Remove ALL Movie Clips
Am looking for code that would ON Press,
remove all movie clips currently playing on the stage!
(I have 4 that all close from wothin, but I want the previous to close when another starts !)
How Can I Remove All Child Movie Clips?
Hi guys.. I tried to search but the search doesnt seem to be working for me at the moment so guess i gotta make another pointless thread.
What I want to do is remove all child movies of a chosen movie. How can I do this?
thanks
-Geoff
edit: btw, i'm using Flash MX. (not 2004)
Remove Movie Clips (AxnScpt)
How can I remove a movie clip dynamically? I need to use a global variable since different movie clips must be deleted at runtime. I'm using FLASH 8.
Remove Duplicate Movie Clips
Follwing is the script I have used for duplicating movieclips:
while (coalcount<2) {
_root.coal.duplicateMovieClip("coall"+coalcount, coalcount);
_root["coall"+coalcount]._x = random(550);
_root["coall"+coalcount]._y = random(500);
coalcount += 1;
}
on time-up it goes to the next scene following the script:
onEnterFrame = function () {
now = getTimer()/1000;
txt = countTotal-now;
p = parseInt(txt);
res = p;
if (p == 0) {
gotoAndPlay("scene 2", 1);
}
};
Th problem is I am not being able to remove the duplicate movieclips. I have tried using the script : _root["coall"+coalcount].removeMovieClip but it doesnot work. Help pls!
Navigating Through Movie Scenes And Movie Clips
hi all,
i'm having trouble figuring out how to get this to work. when the movie loads it is a "museum room". in here they can find all the answers to the questions i'm going to ask them. once they're done looking at this they "enter the game". from here they will click on the different objects and be asked questions.
now what i want to do, as you can see by clicking on the "wright glider" in the upper left of the game is ask the question and show the hint. then when they click on the hint go back to the museum, but when they go back to the game it was at the question they were just at.
hopefully this makes sense, you can check out what i have so far at
http://www.hwarf.com/josh/work
thank you so much!
Remove Movie Clips From _root Dynamically
Hi Pals
I have attached the movie clips dynamically to the stage.
I have created a movie clip with name "textClip" and the linkage name as "textClip". I dragged that mc to the stage. I am having an XML file where the contents are stored. If I have the textcontent in the xml file I am attaching this mc with the new instance.
In the mc, I have placed one textbox to hold the contents. named "contentText"
See the code below for attaching the movie clip
itemText = _root.attachMovie("textClip", "textClip"+x, x);
itemText.contentText.html = true;
itemText.contentText.htmlText = strPageContents;
The problem is I need to remove this mc once another page is loaded. If I am having 4 contents in the page 1 and 2 contents in page 2, while clicking the page 1 I can see all the 4 contents but when I click the page 2, I am able to see the 2 contents from page 2 and remaining 2 contents from page 1.
The problem is likely to be in the depth i am using. I tried a lot but not able to sort this down.
Any guidance will be greatly appreciated.
Thanks
Babu Raju
Duplicate And Remove Movie Clips Randomly
Hi
I want to make a sparkler button that shows twinkling stars around the button in random positions.
I have made two types of stars (movie clips)
1 - twinkle: this movie clips shows a star appear and disappear with some rotating and alpha channel so the overall effect is like twinkling and revolving star.
2 - same effect star moving on a small curved path.
now I want to use action script for onMouseOver event to duplicate these two movie clips in different X Y positions (very close to each other) with a magical sound. I can do the sound part but not the actionscript part in which i want to duplicate both clips in random positions and then remove them (if that is necessary to free the resources they are occupying) however the stars affect have a fade in and fade out effect so they disappear automatically.
any help is highly appreciated.
thank you.
Movie Clips And Different Scenes...
help asap!
Hello...
I have run into a bit of a problem...
I have built a website with multiple scenes. I have also created a movie clip that's function is to change to different music clips each time you click on it.
For instance:
click 1
- song 1 plays
click 2
- song 2 plays...etc
The problem is when I click between scenes my movie clip that may be in the middle of playing song 2 - switches back to the beginning of song 1. Each and everytime I switch to a different scene song 1 starts at the beginning.
Is there a way to make the movie clip recognize that it IS acually the same movie clip?
I would be very greatful for your help.
fordage@hotmail.com
Thanks,
E -aka (fordage)
Movie Clips/scenes
I have 3 movie clips, of varying lengths running in the 1st frame of 3 different scenes,
I had to put a stop action in the 1st frame of each scene, in order to keep the final movie from jumping through each 1st frame.(strobe effect)
how to I get the movie to go to the next scene and play the next series of clips?
help
Scenes Vs. Movie Clips
Hi, all
I am creating a self-promotional website to show prospective employers examples of my work, resume, etc. I originally set up the site using different scenes for each "page" ... a scene for the gallery, a scene for each gallery sub-section (ie. models, animation, traditional art, etc.). I created buttons that call each scene when pressed, and put the buttons on each separate "page" or scene. I also put the background art in each separate scene. I have been thinking, however, that it might be a better idea to have a main scene (home page) with the buttons and background images on it, and create movie clips for the other pages that have only the necessary info on them (no background art or buttons) and that could be called by the buttons instead of scenes. My questions are:
1. Is one method better that the other, and why?
2. Do I need to put all the MCs on one main timeline and have the buttons call the frame number where the MC is or can I just have a button that calls an MC without it being on the timeline (how?)
3. What issues might I have regarding file sizes and download times with either method?
Any other suggestions would be very helpful too.
Thanks everyone!!!
Tulane
Scenes And Movie Clips
I have a movie clip and there is going to be certain interactions that are going to have to call different scenes. How do I go about calling different Scenes within a movie clip?
Scenes And Movie Clips
I have a movie clip and there is going to be certain interactions that are going to have to call different scenes. How do I go about calling different Scenes within a movie clip?
Help W/ Movie Clips And Scenes
ok, i feel really dumb asking this cuz i feel somehow that there's a really simple solution, but i'm stuck... so here we go...
i'm making a picture album site for a buncha friends and i have it set up where u have multiple scenes for different categories of pictures. I made a movie clip for loading the pictures, which includes forward and back buttons for navi thru the pics, but when I load the whole movie, the buttons don't even show up. any suggestions?
Controlling Movie Clips In Different Scenes
This maybe incredibly easy, but i quickly need help.
I have a button enclosed within a movie clip in scene 1 and i want that button to control a movie clip in scene 2 i.e scale or move.How do i target it? It has to be scene based and not using load movies (to long a story to go into).
If anyone can help me quickly, I'd be incredibly grateful
thanx
Converting Scenes To Movie Clips
I'd like to convert several scenes into movies so that my movie, which is made up a several scenes becomes movie that uses the load command to call on other movies. Is there a quick way to handle this? Thanks...
How To Access Scenes From Movie Clips
hello
im unable to access the scenes on main stage from the
movie clip events
and also i want to capture escape key in the flash player
any suggestions...
Webpages W/ Scenes Or Movie Clips?
those of you who do professional web design- do you make each page a scene, or each page a movie clip. i've made all my pages with each separate page being a scene, but my comp art teacher showed me how to do it with movie clips today, neato...but whats the preferred method?
Link Out Of Movie Clips And To Scenes
Hi All,
My first post here, though I'v been reading alot in the forums =)
I am creating a flash website that will be used as my personal website once it is completed, but I have run into a problem.
To solve this problem, here's my question:
Is there any way to link (using a button and action scripting of course) from inside a movie clip to a frame OUTSIDE the said movie clip which is in the current scene?
I know thats kinda a wierd worded question, but I dont know how else to put it. If you need me to say more, let me know, though i might be out of town for a couple days.
Right now I have the action script so when I click on the button in the movie clip, it uses the "go-to and play" command to link to frame 15 of Scene 1, but it seems it is really taking me to frame 15 of the movie clip with the button!
Any help would be greatly appreciated
=)
-M1
Linking To Scenes From Movie Clips
I need some help with the menu on a site im doing. I have got a drop down menu which is a movie clip which works, but I cant get the links to work. I have a different Scene for each section. So when you click on the menu item i want the current scene to play till the end and then go to the appropriate scene and play that one until the stop that I set up.
Thanks alot
Comverting Scenes To Movie Clips Or Swf...
Hello, a buddy of mine just gave me a copy of his webiste he's been working on. To make is run more smoothly, I'm trying to convert the individual scenes into movie clips. How do you do this?
Movie Clips Buttons Within Scenes
Can you navigate scene to scene with buttons located within a movie clip?
I have about 6 scenes total. On one scene I incorporated a portfolio gallery. Within it I have a MovieClip that has about 4 buttons. I would like to have each of them point to other particular scenes. I used about 5 different scripts and none seem to work.
I will be more than happy to send you the file... I know its easier to view it than to try to explain it.
[F8] Use Same Movie Clips In Different Scenes And Change Them?
Heres the thing...
I have lets say 3 scenes...
They are all going to have the same general layout.. but all the information for each will be different..
like.. scene 1 is say... Tommys...
scene 2 is Johnnys...
scene 3 is Marys...
All the info for each person needs to change (its not like one box.. its like 40)..
I duplicated the scenes, but when you change the stuff on Marys scene.. Tommys and Johnnys changes to the same..
Is there anyway to keep the same MC's in the different scenes and change them or do I have to make ALL new movie clips???
Switching Scenes From Movie Clips
Ok so I have my main time line...I have 2 scenes (scene 1 and scene 2) I put a movie clip into the first keyframe of scene 1. the movie clip has 30 frames...in the last frame of the movie clip I have a script that says
on(release) {
gotoAndStop("Scene 2", 1);
}
So basically when the movie clip reaches the end I want my movie to goto scene 2.....It's not working ...Not switching scenes..I've also tried to do it by frame label like-
gotoAndStop(".Scene 2", "name");
where name is my frame label.
What am I doing wrong?
Choppy Movie Clips And Scenes
I am having a problem in which I have movie clips containing tweens in a file containing two scenes. On publishing, the movie clips in Scene A play fine, but the clips within Scene B are very choppy -- they appear to be playing only the first and last frames of a tween.
The tweens themselves are definitely OK -- sometimes it happens that the clips from Scene B play fine, but then the ones from Scene A don't work.
To see specifically what is happening, you can go to
http://www.boston.com/news/specials/local/danvers_explosion/interactive_graphic/
The file is done in two scenes -- one for the content under the "The Blast" tab and one for that under "Getting Out." The pulsing arrows on the map in "The Blast" are movie clips with motion tweens, and these are working correctly. Go to "Getting Out," though, and the explosion symbol on that map is supposed to expand and fade out, but as you can see, it's not working. But as I said, sometimes that clip plays fine, but then the arrows (and other clips in "The Blast") don't work.
This is not the first time I've run into this bug, so I don't think it is anything project-specific. Anybody have any ideas?
Scenes And Strings Of Movie Clips
I want to run a string of Flash movies which display event notices. I have tried using scenes but I can run two scenes consecutively, but when I put a third in, the result is that scene 2 is missed out. Scenes 2 and 3 hold extenal .swf files. If I put text into scene three instead of the .swf file, scene 2 is not omitted, but I don't really want to recreate the .swf file I want to put into scene three. Looking at the threads on this site and in Adobe's support files it appears I can load strings of movies one after another but. I can't get this right. Please remember no user interaction here, just continually looping movies. Help please.
How Do I Remove Dynamically Created Movie Clips From The Stage Using Code
Hi,
I have some code that generates thumbnails based on a variable called maxThumbnail. The problem I am having is that once the thumbnails are created, i cannot remove them so the code can run again to create a new set of thumnails in the same place.
Heres the code
for (var i = 1; i <= maxThumbnail; i++)
{
newThumbnail = this.attachMovie ("thumbnail", "thumb" + i, i);
}
My current solution is to add an empty keyframe after the frame where the holding movie clip is. I then just play the timeline to remove and reload the holding movie clip. Is there a way of doing this dynamically. I would imagine it would be something along the lines of
removeMovieClip(_root.thumbailholder)
loadMovieClip(_root.thumbailholder)
Movie Clips And Frames
I have a movie clip that is just a sentence, like
"I am trying to learn Flash." I saved it as a movie clip. Basically I want the behavior to be like a link. I want it so that when I click on this movie clip, it would go to a certain frame. but in the actions window, on mouse event is grayed out. Am I just looking at the wrong method? Or can you not do goto_ on a movie clip? If not, then how do I do this?
Thanks for your help guys.
Many Frames Vs Movie Clips
Hi,
I currently have a flash site that a friend (who's much more knowledgeable than myself) helped me develop a couple years ago. It is set up so that every content page is in its own frame(s).
I've been feeling *****ious lately and I'm thinking of revamping the site. Same general design, but changing up the navigation and adding a few new features. For the new design, I was considering making each content page its own movie clip. On the stage, I would simply have something like mainMC_holder, and when a page is clicked on the nav bar, simply load that mc into the mainMC_holder. It seems to me that this will result in a more consistent, easily-editable site, and it will make it much easier to add pages to the site as needed.
My question - will this result in a larger file size (ie longer loading time) than the current setup? Are there any other foreseeable drawbacks with this plan?
Organising (clips/scenes/additional Movie)
Just starting out.
I have a general question about organising my site. To load things as the viewer goes through it is it better to just load movie clips as the user calls on them, or load scenes or another movie? When is it best to use each? pros and cons...
Also, is it best to use the fscommand allow scale for publishing your web page or how do you load it so that the page has dimensionions that cant be resized.
Thanks much
Middlechild
Please Help Me, Lost With Movie Clips And Scenes Actions
Hi there!
well ive done some posting with this same topic on the MX side.
I have recieved afew helpful comments thanks to afew, but for the most part they have only confused me more with all their action script jargon.So i would like simple answers please hehe.
Ok my prob is this.It has to do with scenes(which everyone is telling me not to use).Well scenes and Buttons inside of movie clips.
I need to use scenes as im doing a mammoth of a project and will go nuts without using scenes.Anyways.
The prob im having is that i have to have a movie clip with several buttons on several key frames within that MC.This MC is on scene1.
Inside this MC on the first button, when click i need it to go to scene2, frame 1. This does not work!!! I was then told to use frame labels instead as that might sort the prob out.It didnt unfortunately.
Anyways so im noticing that buttons inside movie clips do not seem to understand simple On press go to scene2, frame 1 and stop command.
what on earth am i doing wrong.If someone is kind enough.I would like to send the FLA so you could check and see this small mistake which i must be doing.Ive been stuck on this project for 2 days now and am ready to give up!!!arghhh!
Many thanks for your time!
Chris
Targeting Scenes In Embedded Movie Clips
How do you go about targeting a specific scene in your flash file from within an embedded movie clip? I have a .FLA file with 3 scenes, and within those 3 scenes there are embedded movie clips with various buttons on the clip timelines. I need to set some of those buttons to go to certain frames in specific scenes, and I can't seem to figure out how to do it. Just setting up the "goto" command under the normal mode to target a specific scene doesn't work (it only takes me back to the first frame within that scene), adding the "_root." to the beginning of the script causes the button to do nothing at all. HELP! This one's driving me nuts, and I'm sure it's easy
Targeting Scenes From Nested Movie Clips
I have a movie with two scenes. In the second scene I have a movie clip containing a button. I want that button to gotoAndStop on a frame in the scene 2 timeline. Is this possible? I can get to scene 1 using with(_root) but I cannot get to scene to.
PLEASE HELP ME Working With Scenes, Buttons And Movie Clips
I'm new to flash although I think I'm catching on pretty well, I've run into a problem.
I created a scene "scene 1", with a stop action for it to stay on the first frame... and inside my scene- first frame- I have a movie clip.
Inside the movie clip there is a button.
When I press the button I want it to go to a specific frame in my movie clip and also to go to the second frame in my "Scene 1".
For some reason I can attatch the action to the button to play within the movieclip the desired frame,
BUT
I can't get it to go to frame 2 in Scene 1.
Can someone help me figure out how to do this??? I would really APPRECIATE THE HELP!!! THANKS!
[CS3] Actionscript Not Working Between Scenes On Movie Clips
Hi everyone,
I'm creating a website and I'm having some issues with Actionscript. My goal is for the navigation tabs (movie clips) to drop down when rolled over and return to their original position on rollout. This is my Actionscript 2.0 code on the movie clips:
PHP Code:
on (rollOver) {
gotoAndPlay(2);
}
on(rollOut) {
gotoAndPlay(11);
}
This works fine on the first scene. However, when I navigate to a different scene, this exact same code does not work. The odd thing is it only works on the very first scene of the site, no matter what it is (ie, if I move "Scene2" to the very first position, it works, but if it is the second scene it doesnt). I've got some navigational code on these movie clips that executes just fine no matter what scene I'm currently in.
I'm baffled as to what's causing this. Any help would be appreciated.
Nested Movie Clips Calling Different Scenes...
I have in Scene 1:
2 x movie clips within the main timeline of scene 1, which consits of one frame plus a stop action (so the clips will still run)
within one of the movie clips on the main timeline of scene 1 - I have another nested movie clip.
I want to be able to let all of the movie's within scene 1 run to the full number of frames (approx. 170) before moving onto Scene 2.
For the main timeline in Scene 1, i have 1 frame plus a stop action.
Within the 2 movie clips, within the main timeline on scene 1, they both have stop actions.
The nested movie clip, within one of the movie clips on the main Scene 1 timeline, I have a goto secne 2 action, followed by a stop action.
For the life of me, it won't call or play Scence 2...
could somebody explain please, wtf I've done wrong?
Thanks for any help in advance.
*and yes my flash skills are v.basic - not to mention holy untidy
Play Certain Frames Of Movie Clips
Hello, Im wondering if there's anyway to play certain frames from a movie clip when X action is set in any frame of a scene.
For example, I have a graphic of a man running, and .. let's say, when the movie reaches frame 100 I want it to start it to talk, but keep it running, so Im guessing it would be something like.. gotoAndplay *movieclip* frame 2
but ehh that might be just wrong.
So eh.. yeah. having a movie clip with a stop(); action on the first frame, then when my movie reaches frame 100, make it play frame 2, keep playing until frame 15 and then stop again (with the stop action obviosuly) on frame 16.
I hope I made my point.. If there's anyway to do this.. please post it here >.<
Thanks in advance..
Random Frames In Movie Clips
Is there any way of getting a movie clip to load a random frame the second it is loaded? Im trying to create a picture board where numerous instances of the same movie clip are spread over the stage, but at different frames.
First post, be gentle...
Targeting Frames Within Movie Clips
Greetings,
I am using Flash MX 2004 professional
I need some help with a project.
I have a root timeline that contains 2 frames. Each frame is labeled and in each frame there is a movie clip.
Within each movie clip I have two buttons. One to move forward on the root timeline and one to root backward on the main timeline.
What I want to be able to do is go from inside one movie clip (the one on frame 2 of the root timeline) to a specific frame inside the movie clip that is placed on frame 1 of the root timeline.
I tried to label the specific frame within movie clip 1 (frame label "slide1" on the root timeline) with the name "backslide" and then in movie clip 2, I used this script at the end of that movie clip timeline:
_root.gotoAndPlay("slide1","backslide");
This did not work. I tried a number of different ways but either it would just go to the beginning of slide 2 and play it over again or it would go to slide 1 and start from the beginning rather than from the frame I wanted it to start at.
Is there a way to do what I am trying to do?
thanks for your help
peace
cc
<><
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?
|