Open Movie Clip...
How can have movie clip in the library appear on the stage by clicking a button??? I have Flash MX...
FlashKit > Flash Help > Flash ActionScript
Posted on: 09-10-2002, 07:39 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Creating A Button To Open A Movie Clip From Inside A Movie Clip?
I'm using a hexagon menu to display some images. One image is placed on each slide of the hexagon menu (which can then be rotated left and right to see other "slides").
What I want to do now is to be able to click on the object (image) as a button and for it to go to another scene which shows the image blown up and some description next to it (which is another movie)
I have tried the following which doesn't seem to work:
Created an invisible button (or choosing the image as a button) and having
on(release) {
gotoAndPlay("scene 5", 1);
}
this doesn't work when I use it over the hexagonal menu, but when I move the button to somewhere else on the screen (not over the movie) it works.
Please can someone help with this - Ive been working on it flat out over the weekend and desperately want to make it work. any ideas would be appreciated!! thank you
Open The Movie Clip
aight... heres how it goes. I have 3 mc on the first frame.. MC1 is set up to loop. MC2 will play and stop on the last frame. At the second to last frame of MC2 it is supposed to open up to frame 2 on MC3... my actionscript for it to do that looks like this : _root.movie3.gotoAndStop(2); -- but it wont work. If you could help that would be great... Thanx
How Do I Close One Movie Clip/open Another?
Flash 5.0:
Okay, here's my promblem. First, take a look at this: http://www.everythinggoodwastaken.com/di/. Now, click on the first button, "web design". It tells a target to goto and play a movie clip #1. Here is my goal: When I click on the next button, it will "close" the movie clip#1 and play movie clip #2. How do I do this script? How do I make movie clip #1 go away? Is there a downloadable flash movie that does this, so i can view the code? Or could someone help me out another way? Thank you very much for your time!
Button Open Movie Clip
I'm trying to use a button on the main timeline to open a movie clip from the library.
movie clip name:
mcOne
want to do an:
on(release){
can anyone help me finish the action script?
Open A Web Page In A Movie Clip
HI
I was wondering ,is there a way to open a web page in a movie clip without replacing the Flash animation.
I mean ,I have a movie clip and in it I have a button ,when I click it (
on(release) {
_root.movie1.getURL("http://www.google.com","_self");
}
) I want it to open a web page only in the movie clip "movie1" not to replace the whole stage.
So far ,I only managed to make it to open the page I desired in the same window.
Open Application In Movie Clip
Hi all,
Is it possible to open an application in a flash movie clip. I know it's possible to open it using FScommand, but I want to open it within the movie clip. Is this possible? If so, how? Any help appreciated.
How To Test Is A Movie Clip Is Open ?
I cannot find a function to know if a movie clip load by loadmovie(), is yet open or load.
I want to do this kind of stuff:
http://www.gonzalovillanueva.com/home.html
I would like to create a windowed flash.
I've got 3 buttons.
I've got 3 swf I want to load using these 3 buttons(fenetre1.swf, fenetre2.swf, fenetre3.swf.).
Each swf is a movie instance. This movie is composed by a image and a button to close the windows(action on the button unloadmovie(...)).
in my main fla file (the one with the 3 buttons)
at _level0:
I have create a empty clip:
clip1.createEmptyMovieClip("movie1", 10);
clip1.createEmptyMovieClip("movie2", 10);
clip1.createEmptyMovieClip("movie3", 10);
Inside a clip name clip1, I have created 3 buttons:
the code for each button is:
code for button1:
on (release) {
_root.x +=2;
loadMovie("fenetre1.swf",movie1);
movie1.swapDepths(_root.x);
}
}
code for button2:
on (release) {
_root.x +=2;
loadMovie("fenetre2.swf",movie2);
movie2.swapDepths(_root.x);
}
}
code for button3:
on (release) {
_root.x +=2;
loadMovie("fenetre3.swf",movie3);
movie3.swapDepths(_root.x);
}
}
----------------------------------------------------------------
the pbl is to avoid to re-open a clip which is already open.
I look for an if statment in order to know if the clip is not already open or if it open.
If it is open I not load the movie and I only make a swapdepth
If it is not I load the movie and swap the depth to bring him to front.
------------------------
The _visible function always return 1(loadded or not)
Help me !!!!!
-------------------------------------------------------------------------------
Why this._visible = False;
no more works on mx pro 2004 since it did on flash5.
---------------------------------------------------
How To Test Is A Movie Clip Is Open ?
I cannot find a function to know if a movie clip load by loadmovie(), is yet open or load.
I want to do this kind of stuff:
http://www.gonzalovillanueva.com/home.html
I would like to create a windowed flash.
I've got 3 buttons.
I've got 3 swf I want to load using these 3 buttons(fenetre1.swf, fenetre2.swf, fenetre3.swf.).
Each swf is a movie instance. This movie is composed by a image and a button to close the windows(action on the button unloadmovie(...)).
in my main fla file (the one with the 3 buttons)
at _level0:
I have create a empty clip:
clip1.createEmptyMovieClip("movie1", 10);
clip1.createEmptyMovieClip("movie2", 10);
clip1.createEmptyMovieClip("movie3", 10);
Inside a clip name clip1, I have created 3 buttons:
the code for each button is:
code for button1:
on (release) {
_root.x +=2;
loadMovie("fenetre1.swf",movie1);
movie1.swapDepths(_root.x);
}
}
code for button2:
on (release) {
_root.x +=2;
loadMovie("fenetre2.swf",movie2);
movie2.swapDepths(_root.x);
}
}
code for button3:
on (release) {
_root.x +=2;
loadMovie("fenetre3.swf",movie3);
movie3.swapDepths(_root.x);
}
}
----------------------------------------------------------------
the pbl is to avoid to re-open a clip which is already open.
I look for an if statment in order to know if the clip is not already open or if it open.
If it is open I not load the movie and I only make a swapdepth
If it is not I load the movie and swap the depth to bring him to front.
------------------------
The _visible function always return 1(loadded or not)
Help me !!!!!
-------------------------------------------------------------------------------
Why this._visible = False;
no more works on mx pro 2004 since it did on flash5.
---------------------------------------------------
Press A Button And Open A Movie Clip
Press a button and open a movie clip in the same scene.
That's all I want. Can anyone tell me (simple) what to do?
It must be very simple but I think I forget some things. I can't get it work.
Thanks in advance...
Embedded Swf File Or Movie Clip That Can Open Html
Hey, i'm doing a website right now that so far the layout is entirely in flash. What i'd like to be able to do is have the content section of the site (the part in the middle) a movie clip that is opens an HTML site inside of it. What I have now is a top bar, and a navigation bar at the left,
http://members.shaw.ca/lyfe/retail/Untitled-1.html
So i'd like to be able to load an html file into the middle section. There are several reasons for this. First, it makes it so others without flash or flash knowledge can update the content, and will also separate the website into modules instead of one big swf.
If this is not possible, was thinking about starting in dreamweaver, importing the flash buttons, and somehow connecting those to the content section of the site.
Can someone please direct me to a post, tutorial or something else that could help me mix HTML and flash? Thanks!
[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.
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);
}
}
Open RSS Feed URL Inside A Movie Clip On Stage
Hi--
I would like to click on a link in a New York Times RSS feed on my Flash site and have that specific news story open up inside a movie clip already on the stage.
Is this possible? If so, does anyone know how I could do this?
Any information would be greatly appreciated!!!!!
Many thanks!
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);
}
}
Can GetURL Open Link Into A Movie Clip Rather Than In A New Browser Window / Tab ?
I don't suppose anyone knows how to open a url link by getURL so it loads into the same flash document e.g an empty movie clip rather than in a new browser window or tab?
If I could set up a particular container movie clip so that when a getURL command is excecuted it populates its self with basic html text and images in it, over the top of the existing flash movie, rather than the standard way of opening its self in a new window or tab. I
I have searched the forum and there is a lot of results but i dont think any of them are trying to do exactly what I have just said. If anyone could provide me with any info or tutorials on this kind of thing it would be great!
Cheers
How To Open A Movie Clip Within A Movie Clip
Hello,
How would I open a movie clip within a movie clip?
I have a movie clip with a button in it. I want to be able to clip the button and then have another movie clip 'pop up' within the 1st movie clip and then be able to close the 2nd movie clip.
I remember doing something like this several years ago with containers, but I don't remember how.
Can anyone explain how this can be done?
-Thanks
Open Browser Window , Button Inside A Movie Clip Problem
Hi there again,
i know it´s very simple but can anyone give me any clue
open browser window button inside an mc
The thing is i dont´know what follows the _root line.
Please, please, help!!
--------------------------------------------------------------------------------
Hi there,
a very simple question.
I´m makin the "open browser window" tutorial but in my file i have the button that triggers the html pop up , inside a movie clip . The entire code to to attach to the button is :
on (release) {
//customize the window that gets opened
// 0 equals NO.
// 1 equals YES.
address = "http://www.kirupa.com/modular/pop-up.htm";
target_winName = "kirupa";
width = 400;
height = 300;
toolbar = 0;
location = 0;
directories = 0;
status = 0;
menubar = 0;
scrollbars = 1;
resizable = 0;
//sends data back to the function
openWinCentre(address, target_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);
}
I know i need to use _root something but is not gotoAndPlay, is it getUrl ?
I´m lost.
Thank you People for your help!!!
Andrea.
Open Browser Window , Button Inside A Movie Clip Problem
Hi there again,
i know it´s very simple but can anyone give me any clue
open browser window button inside an mc
The thing is i dont´know what follows the _root line.
Please, please, help!!
--------------------------------------------------------------------------------
Hi there,
a very simple question.
I´m makin the "open browser window" tutorial but in my file i have the button that triggers the html pop up , inside a movie clip . The entire code to to attach to the button is :
on (release) {
//customize the window that gets opened
// 0 equals NO.
// 1 equals YES.
address = "http://www.kirupa.com/modular/pop-up.htm";
target_winName = "kirupa";
width = 400;
height = 300;
toolbar = 0;
location = 0;
directories = 0;
status = 0;
menubar = 0;
scrollbars = 1;
resizable = 0;
//sends data back to the function
openWinCentre(address, target_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);
}
I know i need to use _root something but is not gotoAndPlay, is it getUrl ?
I´m lost.
Thank you People for your help!!!
Andrea.
Flash "pasteboard" Not Showing When Open New Movie Clip.
Hi,
Whenever I open a new movieclip in Flash, the stage size is distorted (should be a 600 x 450). It should be a rectangle and be placed in the middle of the screen. Instead, when I open a new movie clip, the stage is placed all the way to the left of the screen and I only have pasteboard on the right hand side. Because of this, I can't see the entire stage.
Here is a pic so you can tell what I'm talking about:
Please help!
Thanks!
Movie Clip Button In "open" Position OnLoad
I have a series of 5 main buttons. The code below is for the home button and works fine.
There is also a rollover and rollout function attached to this which also works fine. (When you rollover any of the 5 main buttons the button being rolled over animates downward. When rolled out it animates back to its original position.)
btnHome_mc.onRelease = function () {
stick("btnHome_mc");
home2_mc.attachMovie("home_mc", "homePage", this.getNextHighestDepth());
porfolio_mc._visible = false;
mcLoader.unloadClip(harcup);
mcLoader.unloadClip(galvette);
mcLoader.unloadClip(wreck);
mcLoader.unloadClip(trivia);
mcLoader.unloadClip(jigsaw);
gamesMenu_mc._visible = false;
mcLoader.unloadClip(contact);
mcLoader.unloadClip(empty);
}
What I would like to have happen, however, is that when the site first loads the home button is already in its open (rolled out) position, displaying the initial greeting.
I thought that this would work:
btnHome_mc.onLoad = function () {
stick("btnHome_mc");
home2_mc.attachMovie("home_mc", "homePage", this.getNextHighestDepth());
porfolio_mc._visible = false;
mcLoader.unloadClip(harcup);
mcLoader.unloadClip(galvette);
mcLoader.unloadClip(wreck);
mcLoader.unloadClip(trivia);
mcLoader.unloadClip(jigsaw);
gamesMenu_mc._visible = false;
mcLoader.unloadClip(contact);
mcLoader.unloadClip(empty);
}
but it does not.
Any ideas/thoughts are appreciated.
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
Movie Clip Buttons Nested Inside Movie Clip Dont Work
Hi people!
im having a problem here.
in my first frame i have a movie clip named "menu_mc".
i have this AS for this movie:
Code:
this.menu_mc.onRollOver = function() {
menu_mc.gotoAndPlay(8);
}
this.menu_mc.onRollOut = function() {
menu_mc.gotoAndStop(7);
}
thats working ok, the menu_mc plays on rollover from frame 8 till frame 12 where stops.
On frame 12 (this is inside the menu_mc movie clip) i have another movie clip, named button1_mc.
and also i have AS controling that MC:
Code:
this.button1_mc.onRelease = function() {
getURL("index.htm", "_self");
}
The problem is that when i rollOver on menu_mc it work fine and the button1 appears, the problem is when i try to click button1...
doesnt work.
the swf you can see it on www.wt.com.mx/menu.swf
can anybody help me please?
what im doing wrong?
or what other ideas can you give me so i can make that work.
thanks!
Mouse Rollover On One Movie Clip Increase Decrease Alpha Of Another Movie Clip..
So I really haven't messed with Actionscript much for a couple years and here is my issue.
I have several movieclips I put together that will eventually be a menu for my website. When you roll over a menu option (movieclip) I am trying to get another movie clip to fade in giving the description of the menu item.
For example - when you roll your mouse over the 'Live Chat' option a brief text description would appear telling you what the live chat is about. This description is a seperate movie clip appearing away from the original menu.
I have made the movieclips for the menu and the movie clips for the descriptions. I tried this action on the menu option to get the description to fade in:
Code:
onClipEvent (load) {
this._parent.mc_text_discussionBoard._alpha = 0;
}
onClipEvent (enterFrame) {
this.onRollOver = function() {
if (this._parent.mc_text_discussionBoard._alpha<100) {
this._parent.mc_text_discussionBoard._alpha += 5;
}
};
}
But the alpha only increases on the description (mc_text_discussionBoard) by 5 when I keep rolling my move over and out and over again. It makes sense why it does that, but I'm not exaclty sure how to get it to continually increase the alpha by 5.
any help would be great and I am anxiously waiting to get this solved!
Kevin
Code 4 MovieClip Button To Load A Movie Clip Into A Placeholder Movie Clip.
Yeah that title sounds a little confusing...so i will explain:
Is there a way to tell a "movie clip button" that once it is clicked on to load a "movie clip" into a "movie clip placeholder". So instead of loading an external swf into the placeholder, it will be a movie clip from within the same library. Putting every single custom clip on the timeline would take a while, so that is why I thought it would be easier like this, and the other movie clips are not that large that I want to load into it so there is no need for external swfs, trying to keep it clean. Here is the code along the lines I am trying to go for.
__________________________________________
this.profile_mc.onRelease = function() {
placeholder_mc.loadMovie("profileSection_mc","plac eholder_mc","_root.content");
}
__________________________________________
- "profile_mc is the button I am trying to activate to load the
"profileSection_mc" into the "placeholder_mc". but so far no good.
- the movie clips are within the same library, not on the timeline or external library.
- Is this possible?
Loaded Clip Last Frame Keep Open?
Hi,
I've created a swf in Swish and loaded it into the main swf. How do I keep the last frame of the loaded movie visible indefinitely, as opposed to the main swf background appearing?
Thanks for any help!
Jennifer
Open A Popup W/ New Clip Within Flash
Hi there,
I'm looking for a line or two of script which I can attach to a button in a movie clip and which will launch a controlled-size popup window with a new flash movie clip in it.
I had a script I was using and it launches the popup fine, but then the clip behind the new window goes blank! Which sucks!
Any help really appreciated. Also let me know if anyone's interested in a bit of programming. I have a job coming up. Thanks,
Necia
Keeping Track Of Which Clip Is Open?
Hello --
I have a problem in a navigation model I am doing.
I have three movie clips which launch three different sections of my flash site when clicked. These clips are tiny images of three products.
When you click them I want another group of 3 clips which contain animations of the products zooming in to play an appropriate frame when they are clicked to zoom in.
Then, once the animation is done... the appropriate section loads.
Here is the problem. I can do the button actions fine.
BUT -- When the next product has to zoom up I cannot get the one that is already zoomed up to zoom down and then play the next products zoom up animation.
Anyone know of a way to track and update the states of these? Or determining which of the 3 products was clicked and let them zoom in and out dynamically?
Been crazy on this one... if anyone can please help it would be appreciated as I do not want to scrap the idea.
thanks.
--vagabond007
[AS2] Open Flash With Random Clip
Hello!
I'm working on a flash project where there're four animations developed on the timeline in the main root.
The animations start, for example, from the frame 1 to 25, 26 to 36, 37 to 45, 46 to 50.
I would like the animation to start randomly on the timeline everytime that the flash is opened...is this possible?
Keeping Track Of Which Clip Is Open?
Hello --
I have a problem in a navigation model I am doing.
I have three movie clips which launch three different sections of my flash site when clicked. These clips are tiny images of three products.
When you click them I want another group of 3 clips which contain animations of the products zooming in to play an appropriate frame when they are clicked to zoom in.
Then, once the animation is done... the appropriate section loads.
Here is the problem. I can do the button actions fine.
BUT -- When the next product has to zoom up I cannot get the one that is already zoomed up to zoom down and then play the next products zoom up animation.
Anyone know of a way to track and update the states of these? Or determining which of the 3 products was clicked and let them zoom in and out dynamically?
Been crazy on this one... if anyone can please help it would be appreciated as I do not want to scrap the idea.
thanks.
--vagabond007
Using A Button In A Movie Clip To Control The Movie(and Not Movie Clip) Timeline
Ok i have a button placed in a movie clip. I want this button, when released, to go in another scene, frame one, on the movie(scene) timeline and not on the movie clip timeline.
So i tried: gotoAndPlay("mission", 1); (mission is the name of my scene)
But it goes to the frame 1 of my movie clip, It would be great if someone could tell me how i can control the movie timeline while my button is in a movie clip
thaks
Vakarm
How To 'stop' A Movie Clip Within A Movie Clip Within A Movie Clip Loop
I've done searches, laughed, cried, and punched holes through the wall, but I can't figure this out.
I'm in Flash MX (pro) and I have a MovieClip on my main timeline (frame 1). Inside that clip is another animation (the static animation scrolling across the screen), and another inside of it of the static animation (6 characters on a train each animated uniquely).
Confused yet? Ha! OK, so I just want the damned animation on the main timeline to run once and then stop (or to 270 frames). I've tried:
myMovieClip.stop()
to no avail. I've tried attaching the script to the movie clip itself, and also to the frame.
Any suggestions?
Making A Draggable Movie Clip Control The Location Of Another Movie Clip
http://www.kineticz.net/jba/residental.jpg that is a picture of what i am trying to do. the white bar at the bottom is the draggable movie clip and the group of 3 pictures right above that is the movie clip that i am trying to control w/ the draggable clip. I am having trouble writing a script that will do this. any help you can give will be much appreciated.
A Button Inside A Movie Clip, Within A Movie Clip, Calling Another Scene:
Is it even possible?
I have been trying to do it for the last few days for a site I am working on.
I have done searches in many forums and it's foolish looking for an answer that way, because quite frankly every thread I opened was something to do with LoadMovie or GetURL, etc.
What I have right now is on the button in my Menu Bar Movie Clip:
on (release) {
gotoAndPlay(285);
}
Which plays a fancy little animation in the movie clip and then on the last frame of that movie clip I had:
gotoAndPlay("Contact", 1);
Which is the Scene for the "Contact Us" Scene named "Contact"
One would think that it would load up the scene and play at frame 1, however all that happens is it reloads the movie clip of the "Menu Bar" at frame 1 and starts over, not even realizing what I asked.
Anyways, I figured there's a script or something that tells it to look outside of the movie clip or to the _Root, or whatever.
If someone has a solution, it would be greatly appreciated.
Sorry I have no example to show, since I have yet to upload it. (It's my company's web site, and I don't think customers would want to see some half-arsed web site that's not complete.
Thanks in advance.
On Mouseover Show Movie Clip, On Mouseout Close Movie Clip *HELP*
Basically what I am trying to do is this...
I have a movie clip that is a name. When you put your mouseover the name I want another movie clip to display to the right of the name. This clip has a photo and bio of the person.
The photo and bio have an animation that fades it in and an animation to fade it out. I have 5 frames for the fade in, then stop frame, then 5 frames for the fade out.
What actionscript do I need to use to make that second movie clip load when a user mousesover the name (first movie clip) and to make the second half of the second movie clip play when the user removes their mouse from name (first movie clip).
NOTE: I tried using loadMovie and unLoad movie but I couldn't do it loading another swf. The reason being this is already an swf loaded inside a main movie. I guess you can't load an swf inside an swf that's already loaded inside an swf. I hope this all makes sense!
I appreicate all the help!
Thanks a lot!
Create An Empty Movie Clip Inside An Existing Movie Clip?
I'm making sort of a tabbed navigation scheme by reading the data for each tab in from an XML file. What I'm wondering is if it's possible to use createEmptyMovieClip() to make a new empty movie clip inside a movie clip that already exists on the stage.
Using
ActionScript Code:
m_anchor.loadMovie(bg_image);
works as I would expect. bg_image is just the relative path to an image file, and m_anchor is a movieclip already on the stage. However, doing a similar thing:
ActionScript Code:
m_anchor.createEmptyMovieClip("textbox", this.getNextHighestDepth());
and then drawing a shape (a rounded rectangle, which I then want to put text on top of) doesn't work. It works if I just say "this.createEmptyMovieClip" instead of attempting to create it inside the m_anchor clip, but if I do that, the "textbox" is created at the root level and I can't unload it along with everything else in the "m_anchor" clip. Is it possible to create a new empty movie clip inside of one that is already on the stage?
Thanks!
Load An Internal Movie Clip To An Empty Movie Clip On The Stage
Can any of you shed some light as to why this is not working:
on (release) {
emptyMC.attachMovie("mrimc","instance1",this.getNe xtHighestDepth());
}
what I want to have happen is when the user clicks a button it loads the mirmc into emptyMC on the stage.
I have double checked that my empty movie clip does indeed have an instance name of emptyMC and that the movie I want to load into does in fact have the name mrimc in the library. Any ideas?
Problem Getting Movie Clip Inside Of Movie Clip To Face Mouse
I used the code below to make a movie clip face the mouse, it works when I use it on a movie clip that's not embedded in another movie clip, but when I used it on an embedded movie clip, it's axis seems to change.
Attach Code
var stickGun:MovieClip = this.stick_holder.stickGun_mc;
//stick_holder.stick_mc.stickGun_mc
stage.addEventListener(Event.ENTER_FRAME, onMove);
//stick_holder.stick_mc.stickGun_mc.addEventListener(MouseEvent.MOUSE_MOVE, onMove);
function onMove(event:Event):void {
// get the radian value of the angle between the clip and the mouse...
var myRadians:Number = Math.atan2(mouseY - stickGun.y, mouseX - stickGun.x);
// convert it to degrees...
var myDegrees:Number = Math.round((myRadians * 180 / Math.PI));
// get the horizontal and vertical distance between the clip and the mouse...
// rotate the clip toward the mouse...
stickGun.rotation = myDegrees;
}
Placing Actionscript Movie Clip Inside A Movie Clip Symbol
I'm loading an external image into an empty actionscript movie clip (holder1) using MovieClipLoader(); on frame one of my movie and is invisible. Then when the movie plays, there is an empty movie clip symbol (image1_mc) that is placed manually on the stage within another movie clip symbol (flash_mc), and is also on a bottom layer of a mask layer which is animated. Is it possible to place "holder1" inside of "image1_mc" so that I can treat it as if it were an embedded image? In other words, have the image in "holder1" inside of the manually placed movie clip symbol "image1_mc" so that I can use it like a regular symbol on the stage?
|