Closing A Loaded Movie Clip & Returning To A New Frame In The Parent Movie
I have 2 movie clips movie1.swf & movie2.swf. A button on frame 2 in movie1.swf loads movie2.swf onto layer 1. I then have a close button in movie2.swf that I need to set up so it closes movie2.swf but instead of returning to frame 2 of movie1 it goes to frame 1.
I know this is probably really simple but I can't seem to get it right!
Cheers.
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 02-21-2005, 09:18 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Closing A Loaded Movie Clip & Returning To A New Frame In The Parent Movie
I have 2 movie clips movie1.swf & movie2.swf.
A button on frame 2 in movie1.swf loads movie2.swf onto layer 1.
I then have a close button in movie2.swf that I need to set up so it closes movie2.swf but instead of returning to frame 2 of movie1 it goes to frame 1.
I know this is probably really simple but I can't seem to get it right!
Cheers.
Closing A Loaded Movie Clip & Returning To A New Frame In The Parent Movie
I have 2 movie clips movie1.swf & movie2.swf.
A button on frame 2 in movie1.swf loads movie2.swf onto layer 1.
I then have a close button in movie2.swf that I need to set up so it closes movie2.swf but instead of returning to frame 2 of movie1 it goes to frame 1.
I know this is probably really simple but I can't seem to get it right!
Cheers.
Can I Make The Last Frame Of My Movie Clip Say "parent Next Frame"?
I am just learning flash so maybe I'm real stupid but I'm doing a slide show where each slide comes onto the stage in a different way so every pick has it's own animated mask layer in a movie clip which sits on the stage in a single frame on scene 1.
I want the last frame of the movie clip to say something like _parent, gotoandplay (scene 2);
I am using a load of tutorials but can't find any reference to this and thought it would be a pretty simple hack of some code I already used...
Any ideas?
Returning The Frame Of The Parent
Hi!
Hopefully a quick one for you...
How can I return the number of the frame, that the parent movie is on?
I want to do something along the lines of..
if (_parent.frameno == 1){
_parent.gotoAndPlay(20);
}
obviously frameno isn't the correct parameter, but what is?
Need 'if Frame Loaded' For A Separate Movie Clip
I would like tell a movie in a different level to go to frame 2. The problem is, I load the movie and then immediately tell it to go to frame 2 and it doesn't execute the last part of it (it gets loaded, but doesn't go to frame 2).
This is the sequence:
level 10 is loaded (first frame is blank, I don't want it seen yet),
when level 10 is loaded, I would like it to go to frame 2 (which isn't blank)
Does anyone know how to tell another movie to go to a particular frame?
... or does anyone know how to use the ifFrameLoaded for a different movie level? (tellTarget won't allow an 'ifFrameLoaded' command inside of it).
thanks in advance,
tracee
Simple - How To Tell If Movie Clip Frame Is Loaded
I have an instance of 2 movie clips on root. What code can I use to put in when I single click on an mc that is on the root to check if a particular frame in that movie clip is loaded, then "do something". For instance:
If I single click on an mc on the root, I want to do this (I have 3 frames in these movieclips. Each frame in the mc has a stop() function:
Code:
if (this.Frame_3_Loaded) {
on(rollover){
this.gotoAndPlay(1);
}
on(rollout){
this.gotoAndPlay(2);
}
Thanks for your help!
Calling A Specific Frame Within A Loaded Movie Clip
I know it's possible using the goto commands to call specific frames, and I'm wondering if it is possible to call a movie to the _root level and then target a loaded clip, then a frame inside said clip?
ex: inside mc1, you want to click a button to follow this path - go to the _root, load mc2, but load it at frame 2.
I hope that makes sense.
Newbie PLEASE Help...loaded Movie Controlng The Parent Movie...
I have a main movie .swf that loads another movie like this:
// In A.swf...
onClipEvent (load) {
loadMovieNum("B.swf", 2);
}
The B.swf has a "play" button that I want to play the next scene of A.swf when clicked. I tried to do it like this, but it does not work. What am I doing wrong?:
// In B.swf, "play" button action
on (release) {
_parent.gotoAndPlay("Play", 1);
}
I know there is a simpler way to do this, just by moving the play button to A.swf, but I need to learn how to do this. Please help.
Thank you
Having Problems Loading An External File Into A Blank Movie Clip In The Parent Movie.
alright I have a main swf. and there is an empty movie clip called window1.
I have an external swf that is loaded that contains the menu. i have the clip loaded into level 14.
i am having problems having the menu load an swf into the empty movie clip.
Code:
on (release) {
loadMovie("about.swf", _parent.window1, "GET");
}
in firefox, the code above loads the swf, but it replaces the menu. it does the same thing in ie.
Code:
on (release) {
loadMovieNum("contact.swf", _parent.window7, "POST");
}
and this bit of code makes the swf open in another browser tab in firefox, and in ie it replaces the whole parent movie.
I need the menu and the parent movie to stay intact.
i really need help with this asap.
Having Problems Loading An External File Into A Blank Movie Clip In The Parent Movie.
alright I have a main swf. and there is an empty movie clip called window1.
I have an external swf that is loaded that contains the menu. i have the clip loaded into level 14.
i am having problems having the menu load an swf into the empty movie clip.
Code:
on (release) {
loadMovie("about.swf", _parent.window1, "GET");
}
in firefox, the code above loads the swf, but it replaces the menu. it does the same thing in ie.
Code:
on (release) {
loadMovieNum("contact.swf", _parent.window7, "POST");
}
and this bit of code makes the swf open in another browser tab in firefox, and in ie it replaces the whole parent movie.
I need the menu and the parent movie to stay intact.
i really need help with this asap.
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 To Control PARENT Movie From Within A LOADED Movie?
Hello there,
Here my situation.
I have one main movie and load in it two other swf movies into two separate levels (level1 and level2). I use LoadMovieNum and everithyng works fine.
problem:
I have a button within the movie, which is loaded on level2 of the parent movie. With that button I want to control the parent movie (level0 or _root) to jump to a specific frame. How could I do this?
I tried:
_root.gotoAndPlay (...);
but it controls only the movie in which the button is placed, not the parent movie.
I also tried:
_parent.gotoAndPlay (...);
doesn't work either.
Any suggestions would be greatly appreciated.
Thanks, and Happy New Year
Metodi
Actionscript Between Loaded Movie And Parent Movie
i have actionscript in the main movie that loads a new movie into level 3. this script is inside a movieclip which is nested in a few others. i have a button in the loaded movie that i want to control the timeline in the movieclip that originally loaded that movie. this button is also inside a movie clip in the loaded movie.
can anyone help?
thanks!
Using An Instance Of The Parent Movie On A Loaded Movie
How can i use an instance of a mc inside a movie i want to load?
and why wont my dynamic text load when the mc is being loaded into the parent, but does load when i play that flie by itself?
this.loadVariablesNum("text.txt", 0);
Mantis
Communicating Between Loaded In Movie And Parent Movie?
Hi Guys
Can anyone tell me how to communicate between a loaded in movie and its parent movie?
i'm trying to instruct the parent movie to do the following:
gotoAndPlay(5);
so i tried from the loaded in movie:
_root.gotoAndPlay(5);
and
_level0.gotoAndPlay(5);
but neither work.
any ideas?
How To Control PARENT Movie From Within A LOADED Movie?
Hello there,
Here my situation.
I have one main movie and load in it two other swf movies into two separate levels (level1 and level2). I use LoadMovieNum and everithyng works fine.
problem:
I have a button within the movie, which is loaded on level2 of the parent movie. With that button I want to control the parent movie (level0 or _root) to jump to a specific frame. How could I do this?
I tried:
_root.gotoAndPlay (...);
but it controls only the movie in which the button is placed, not the parent movie.
_parent.gotoAndPlay (...);
and
_level0.gotoAndPlay (...);
don't work either.
Any suggestions would be greatly appreciated.
Thanks, and Happy New Year
Metodi
Controlling Parent Movie From A Loaded Movie
> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--B_3264494197_595630
Content-type: text/plain;
charset="US-ASCII"
Content-transfer-encoding: 7bit
Hi!
I have a swf file which I call "Stage" and it contains 3 scenes.
In scene 1 of Stage, I have another swf- "Info1." loaded on level 10. I know
how to get Info1 to unload and load Info2 but what I am trying to accomplish
is when I click on Info1, it loads Info2 and it also go to Scene 2 of Stage.
Is there anyway I can do this?
I appreciate any input.
Thank you.
K.
--B_3264494197_595630
Content-type: text/html;
charset="US-ASCII"
Content-transfer-encoding: quoted-printable
<HTML>
<HEAD>
<TITLE>Controlling parent movie from a loaded movie</TITLE>
</HEAD>
<BODY>
<FONT FACE=3D"Arial"><SPAN STYLE=3D'font-size:12.0px'>Hi!<BR>
<BR>
I have a swf file which I call "Stage" and it contains 3 scenes. =
<BR>
<BR>
In scene 1 of Stage, I have another swf- "Info1." loaded on level=
10. I know how to get Info1 to unload and load Info2 but what I am trying t=
o accomplish is when I click on Info1, it loads Info2 and it also go to Scen=
e 2 of Stage. Is there anyway I can do this? <BR>
<BR>
I appreciate any input. <BR>
<BR>
Thank you.<BR>
<BR>
K. </SPAN></FONT>
</BODY>
</HTML>
--B_3264494197_595630--
Communication Between Loaded Movie And Parent Movie?
Hi all
Is it possible to communicate (send variables) between a loadedMovie and its parents movie in flash?
If so, can you give me any tips on how to do this?
e.g.
how could I change the contents of a variable of the parent movie from the loaded movie?
_root.variablename = "duh"; only goes back to the root of the loadedMovie
any ideas?
Cheers
Returning To Frame 1 _level0 From Movie
i need a bit of help. i have a MC on my main timeline that
opens a group of input text boxes.
On the MC with the input text boxes i have a close window button. how do i go back to frame 1 in the main timeline.
I have tried a few different scripts for the close window button but i cant get it to return to frame 1 of the main time line. here is what i have tried.
on (release) {
tellTarget ("_level0/greenpopupwindow/player1/scene1") {
gotoAndPlay (1);
}
}
any help would be greatly appreciated.
Closing A Loaded Movie
How can i close a loaded movie with a button on that movie? For example, i have a button that loads movie to target "1". I want a button on that movie that will unload itself. thanks
[F8] Closing A Loaded Movie From Within..
This is probably a nice easy one for anyone with a modicum of knowledge, but it's causing me grief..
I've loaded a .swf file into my main movie, which covers the main movie over and forces you to interact with the loaded movie. This loaded movie needs just one button which opens up another html window, but also unloads itself and goes away. What would the code be to delete itself using the button within it?
Thank you for any help...!
Load Parent Movie From Within A Movie Clip
Hi All,
I have a button on my main stage that loads an external swf inside a movie clip.
This movie clip is just a container that loads an external movie depending on which button is clicked on the main stage.
Does anybody know how I can go to a different frame (or scene) of my main movie (my main fla) by clicking a button from inside the movie clip?
I keep starring at my actionscript code and all i have so far is:
on (release) {
loadMovie("", "0");
}
Help Much Appreciated!
Rick
Moving A Movie Clip From A Parent Movie Clip
Fellas..
I've played with Flash 5 and action script a few years back.. just getting back into it recently. This might be a noob question, but I'm having a hard time trying to search for a solution.
I'm putting together a silly little game (Flash 8) that involves a tank, or missile base (ala Space Invaders) with a rotating turret. The tank consists of 2 movie clips.. one for the base/treads which attaches the mBarrel movie clip to itself.
This is a hard one to describe, so please bear with me.
I've managed to have the turret 'look-at' the mouse cursor, so it's angle adjusts to aim at where the player has the mouse reticle.
I'm firing a missile, by using some thing this..
Code:
function FireRocket():Void {
// firing a missile with attachMovie
_level0.mPlayer1.mBarrel.attachMovie("mMissile_Normal",
"mMissile_Normal" + _global.nRocket,
_level0.mPlayer1.mBarrel.getNextHighestDepth(),
{_x:(_root.mPlayer1.mBarrel._x), _y:(_root.mPlayer1.mBarrel._y)});
}
My missile has a script that simply += it's _y.
THis works beautifully. A missile appears *right* inside mBarrel, and adopts it rotation, and by having the missile MC increase/decrease it's _y will send it in motion. I was originally planning on having to use matrices to have the fired missiles inherit the barrel's angle, but having the barrel movie clip call the missile movie clip worked amazingly well.
The thing is.. if I rotate the barrel (by moving the mouse cursor) ALL the rockets automatically change their angle along with the barrel.. as to be guided missiles per se.
How do I stop the missiles from moving along with their parent MC?
wheeew..
Ref To Movie Clip In Parent Movie Clip Class
Utimately, this is for use in Flex, but I have a Movie Clip in Flash that I want to add multiple Movie Clips to. I would like listeners on each Movie Clip (or know when a particular Movie Clip is clicked). When exported to Flex, and one of the Movie Clips is clicked, it does something.
I have created a AS3 Class in Flash for my parent/base Movie Clip and I can add a event listener (for mouse down) to it. When I export to Flex it works fine.
My problem is, I need help with exposing/add listeners to the child movie clips in the parent/base Movie Clip so when the children are clicked in Flex, it will do something.
Can someone point me to a white paper or offer any advice?
Thanks in advance. J.
Returning A Movie Clip To A Specific Location
Hello,
I have a movie which allows people to drag and drop multiple objects - one at a time - into a target area. The objects are all Movie Clips. If the user drops an object into the target area then it stays there, but if they drop it outside the target area then it automatically jumps back to its original (set) position outside the target area.
What I would prefer is if the Object could smoothly glide back to its original location rather than the sudden jump. It would be even better if it could set off really quickly and then gradually slow down to stop in its set position.
Any help or advice anyone can give would be greatly appreciated.
Thanks,
Dave
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
Closing A Movie Clip
I have a movie clip called "building1". Whithin that mc I have a button called "close". I would like the user to be able to close/hide the mc when they click on the "close" button.
Any ideas on how this can be done?
Closing A Movie Clip
Hey guys,
i have a file named index.swf ..and i load another swf file ontop of that movie clip using this command:
on (press) {
loadMovieNum("box.swf",1);
}
I was wondering if there was any button command i could use to remove box.swf from being ontop of index.swf.
For example:
on (press) {
endMovieNum("INDEX.swf",1);
}
obviously that command doesn't work.. but is there an equivalent?
or even, is there a way to send box.swf behind the index.swf level when click on a button?
Thanks,
Brett
Help In Closing A Movie Clip
I have an application I have developed using Flash MX 2004. Now I have been trying to develop a help/tutorial that will basically play the application. The problem I am having is that when the help mc stops it does not release control of the parent movie. I cannot kill the help with whatever tools I have found(unloadmovie, fscommand) and have tried to make the help a separated .swf file. I get the same problem. Now, unless someone can give me the clue for these I have been trying my last alternative but am still running into a road block. I can start another instance of the whole application with the help running automatically but now how can I close the window completely?
Thanks
Russ
Help In Closing A Movie Clip
I have an application I have developed using Flash MX 2004. Now I have been trying to develop a help/tutorial that will basically play the application. The problem I am having is that when the help mc stops it does not release control of the parent movie. I cannot kill the help with whatever tools I have found(unloadmovie, fscommand) and have tried to make the help a separated .swf file. I get the same problem. Now, unless someone can give me the clue for these I have been trying my last alternative but am still running into a road block. I can start another instance of the whole application with the help running automatically but now how can I close the window completely?
Thanks
Russ
Back Buttons Returning To Main Movie Clip
I have created a small movie with 1 scene containing some movie clips activated by buttons. In frame 1 of scene 1 is text, a background, and the buttons. In frame 2 there is the background and buttons but the text is missing so that the movie clip can show its text without overwriting the text in frame 1. When the new movie clip loads how do I get it to return to frame 1 so the text reappears? I have inserted and on mouse event command and a goto and stop scene 1 frame 1 but it always goes back to frame 2,and tried to name frame 1 in the movie but nothing works! attached is my movie.
Closing Movie Clip Before Opening The Next.
Hi, I was wondering how you could set it up so when you click a button in your movie it closes the external .swf which is already open and then opens the new external .swf that you just selected. Here's an example...
On http://www.driftlab.com/, notice when you click one of the buttons it closes the currently open swf and it slowly disapears. When it is done with that it then moves onto the swf you selected.
I'm probably not explaining it very well at all, but if you do understand what I mean and could help I would really really appreciate it. Thanks!
Closing Movie Clip On Stage
HI, I have buttons place on stage for about us. Onclick on about us, my movie clip runs. Which have maximise button, minimise and close button. Maximise and close working fine by using mask. But problem with close button. Can anyone solve my probl. i want to close my movie clip on click (on close button).
[MX] Closing A Dragable Movie Clip
I'm working with a flash movie now that operates similarly to Windows...you click a button which brings up a draggable menu popup that you can close.
The only problem is, I can't close it. The code for my close button works, and the code to make the popup drag works. However, the two do not work together. It's like with the startDrag() command put into place I cannot work the button within the popup I'm dragging (the over,down, and hit states do not work)
so my question is...how do I get this close button (or any button for that matter) to work from within the draggable movie clip?
source code is as follows:
for the draggable movie clip in _root.
Code:
on (press) {
this.swapDepths(2); // bring window to top
this.startDrag();// start the drag
}
on (release) {
this.stopDrag();// stop the draging
}
and the code for the close button within the popup
Code:
on (release) {
nextFrame();
}
simple enough right? I'm using the nextFrame(); command because when the close button is clicked, the popup goes through a small animation then leaves the stage...at least that's what it is supposed to do.
What am I doing wrong here?
Closing Or Stopping A Movie Clip...
I have a movie clip that is loaded using the following command:
ActionScript Code:
on (release) {
tellTarget ("brad") {
gotoAndPlay(2);
}
}
Then, there's a button within that clip that I want to script so that it closes itself. Is there a command that basically says "Close Me"?
Adding another wrinkle to this particular case - the visible clip is loaded into the 2nd frame of a container clip. If another button is clicked, the following command is activated:
ActionScript Code:
on (release) {
tellTarget ("brad") {
gotoAndPlay(3);
}
}
Frame 3 of this container clip is empty. So the way I actually need to close it is by telling its parent clip to go to Frame 3. How would I script that?
Does that make sense??
Thanks!!
Loaded Movie Not Seeing Functions In Parent?
Hi,
If I load a movie like so
ActionScript Code:
loadMovie("path/to/my.swf",'target_mc');
It is not seeing any functions in the parent movie that loaded it.
It says they are all undefined.
however the functions are still there (in _level0 ) because I did a trace to test the fact.
Is there some issue where a loaded movie can not call functions of its parent movie?
Is ther a special way to get functions talking to functions when you load a movie? (or is it not allowed due to security issues?)
Cheers,
JV
[F8] Closing A Movie Clip That Drags/drops
I have a movie clip that I want to be able to drag and drop around the screen. Inside of that is a close button to hide the movie clip. I can't seem to close it and I think that is because of the drag/drop.
myMovie_mc.onPress(){
this.startDrag()
}
myMovie_mc.onRelease(){
stopDrag()
}
myMovie_mc.close_btn.onRelease=function(){
_parent.myMovie._visible=false
}
I have also put code inside the movie clip and on the button without success. Only success I have is getting rid of the drag and drop.
Any ideas? Thanks.
Closing A Popup Movie Clip In Firefox
I am still using AS2.0 (I will get with the times eventually), and I have a series of links on my webpage that create empty movie clips and load SWFs into them. I have a button (a typical little "x" in the corner) that should close these clips, and it works when I preview it in Flash, but when I take it into Firefox or another browser, it won't close.
The code that I place to load the movie clips is:
on(release){
_root.createEmptyMovieClip("empty3", 1001, 250, 150)
_root.empty3.loadMovie("projects/DIH/DIHlearnMore.swf");
_root.empty3._x=70
_root.empty3._y=65
}
The code I place on the "x" buttons to close these popup clips is:
on(release){
_root.empty3.swapDepths(0);
_root.empty3.removeMovieClip();
}
Any ideas, friends??
Closing A Popup Movie Clip In Firefox
I am still using AS2.0 (I will get with the times eventually), and I have a series of links on my webpage that create empty movie clips and load SWFs into them. I have a button (a typical little "x" in the corner) that should close these clips, and it works when I preview it in Flash, but when I take it into Firefox or another browser, it won't close.
The code that I place to load the movie clips is:
on(release){
_root.createEmptyMovieClip("empty3", 1001, 250, 150)
_root.empty3.loadMovie("projects/DIH/DIHlearnMore.swf");
_root.empty3._x=70
_root.empty3._y=65
}
The code I place on the "x" buttons to close these popup clips is:
on(release){
_root.empty3.swapDepths(0);
_root.empty3.removeMovieClip();
}
Any ideas, friends??
Stop Sounds In Parent Movie While Another Is Loaded?
I have a master flash movie that has several different flash movies that can be loaded into a different level so they display on top of the master movie. The problem is, there are buttons with sound effects in the master movie; while another movie is loaded, the buttons below it are still active, so rolling over certain areas of the new movie trigger unwanted sound effects. Is there a way to stop all sounds for the master movie while a new movie is loaded? [It would be great, but not crucial, if this could be scripted within the master movie instead of within the many child movies]. Thanks for any suggestions!
|