Help With Movie Clips
Hi there
I need to develop an flash movie where the user can select an object on my movie for instance a tshirt and then select a specific color on my movie and change the color of that object selected.
Is there a tutorial that can maybe help me on this?
THanks
FlashKit > Flash Help > Flash General Help
Posted on: 08-26-2005, 09:04 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How To Remove All Movie Clips/array: Movie Clips Carry Over To Next Frames/ Scenes
Hi: I am creating a small game. So far so good, but only problem I have come across is when I jump to another frame or scene, previous movieclips (using an array) that are still running carry over to the next frame/scene.
See attached if you have some time- start clicking on answers in the game, and when time runs out some movie clips that are still running will remain on top of my end frame and carry over to the next scene as well.
Is there any sort of remove all movie clips or "clear all" type of actionscript?
thanks in advance!
Maintaining Event Behavior For Movie Clips Nested In Movie Clips
Is there any way to maintain a clip's event callbacks when said clip is nested in a parent clip that has its own definitions for those callbacks?
In other words, if clip B has a definition for .onPress and clip A has a definition for .onPress, is there anyway to maintain clip B's definition if it is nested in clip A?
I have tried doing it by making clips into movie clip subclasses but it doesn't work... but how do components work then?
How Do I Load/stream Individual Movie Clips Within Other Movie Clips
I am using flash 5
I have a movie with a huge movie clip in it and that movie clip has lots of movie clips inside that. how do I load each one individually so when the viewer clicks on abutton it starts to laod the related movie clip.
Please help.. I'm working on borrowed time and borrowed money
Movie Clips Within Movie Clips: Text Link Problem
Hello.
I have a Movie Clip that is my main one with another Movie Clip inside of it. In the subordinate Movie Clip, I wish to have text linking frame (13) to frame (14) for instance. The problem that manifests is that while buttons is the subordinate Movie Clip link to frames within it with no complications, the text link from 13 to 14 with its respective code links to the last frame (would be 14) in the main Movie Clip.
Am I doomed to convert all text links to buttons in the subordinate Movie Clip or is there (what I am praying for) a code to work around this and keep frame links confined to the subordinate Movie Clip? I would appreciate any help that anyone can offer regarding this problem. Many Thanks.
Movie Clips Acting As Buttons Can't Load Other Movie Clips
Frame 1 has three movie clips on it, instance names are A, B, C. I have the following actionscript on frame 1 as well:
stop();
import flash.filters.GlowFilter;
ar = [A, B, C];
for(var z=0; z<ar.length; z++) {
ar[z].onRollOver = rollover;
ar[z].onRollOut = rollout;
}
function rollover() {
this.swapDepths(0);
this.filters = [new GlowFilter(0x333333, .20, 7, 7)];
}
function rollout() {
this.filters = null;
}
This code creates a glow, obviously, on whatever movie clip I rollover. What I want to do as well is this:
I want to click on mc "A" and have it launch a different movie clip (let's say "X") on top of everything else (so that A, B and C are still visible in the background). "X" is in a sub-folder of "A" if that makes any sense or is relevant. Same kind of action for mc's B and C. B should launch mc "Y" and C should launch mc "Z".
What is the actionscript for this? Any questions please let me know. Please respond, I need this info as soon as possible. Much appreciated!!
Text
External Movie Clips With Multiple Menu Movie Clips
It's pretty late and I don't think i have enough time to search this question in the forums but here I go. Sorry If I upset someone for making a topic that already exists.
I have a main timeline that im importing an external movie clip in. This external movie clip is named "members" it has several buttons that load other external movie clips into a window within "members" . What do I need to do to make this work. Do I need to use "this, _parent, _root, level(s) or "whatever.swf". If you can help me out that will be great. I'll make it up to you down the road. No sexual favor please.
I'm using flash mx 2004 btw.
Thanks in advanced
[MX04]Movie That Works Fine When Clips Apart Acts Strange When Clips Are Together.
Hi,
I have a pretty basic movie in which a ball moves along a track.
The track is made up of 3 sections & all I want the movie to do is trace an ID number (num) that is an individual property of that clip when it goes over it.
In the first movie attached below “trackOne” the whole thing works great! However in the other movie “trackTwo” I have moved the clips closer together & the whole thing has gone crazy with the following issues.
1.)The “trace” command fires on every “onEnterClip” event
2.)A text field that is used to show the ID number only changes when the ball is fully over the clip not as it first touches it, as it does in the first movie
3.)Although the ball is full off a clip it keeps tracing it’s ID number together with the new clips number?
Anybody able to help me on this?
Screwy Stuff With Movie Clips Within Movie Clips
This is kind of difficult to explain but here it goes...
I have created a Barney's like slide site and have gotten it to work fine. the problem I'm having is when I take scroll text box and try to place it on the movie clip that is going to be the part of the site that is going to slide out.
The whole thing slides fine and the scroll box is visible. However, the text is not visible therefore I'm not sure if the up/down buttons are actually working.
The scroll box is a movie clip itself with "on(release)" commands on the buttons. The "onClipEvent" commands are added to the textbox when the scroller movie clip is brought into the slider movie clip.
Is this something that just isn't supposed to work or I am doing some thing dreadfully wrong?
Thanks in advance,
Fakeout
[F8] Help Making Movie Clips Load Other Movie Clips...
well i have miraculously figured out how to make my buttons grow and shrink simultaneously reacting to mouse overs... and even stay large when they are clicked on... however the only way i found to do this was by making them movie clips and not buttons...
now luckily the task at hand i'm assuming will be quite a bit easier than what i've already accomplished...
i am looking to now make those movie clip instances (when clicked on)... load photos into an empty movie clip that will be a separate swf... in the same dreamweaver file...
i have made each photo into a small movie clip that simply tweens the photo from alpha 0 to alpha 100 and back to alpha 0...
so i'm hoping for some code that will call up the first part of the movie clip (the fade up) when the corresponding movie clip is clicked on... and hold it... until another button is clicked... making the current movie clip play to end (fade out)... and then load the new movie (up to the middle... alpha 100) into the empty movie clip...
Intersecting Movie Clips/ Dividing Movie Clips
I've bee trying all day to find out how to find the intersection point on two moive clips with non linear lines in them.
If I use the Hit Test method it seems to recognise only the hit point when the imaginary rectangle arounf the two clips collide. Is there any way of determining the point where the lines themselves cross over.
If not I think I've got another method but I can't figure it all out.
I know at what x point the lines will cross over (the more horizontal of the two lines will be crossed every by one of the verticle lines every 1/108th of it's width) but I can't determine exactly where the Y co-ordinate of this line will be at the time.
I could sort this out if I was able to delete all of the more horizontal move clip except the point of intersection I'm looking for, I'd then then be able to determine the y co-ordinate at this point. But I havn't been able to determine how to delete a move clip for example from x=0 to x=51 but leave the rest of the movie clip on the screen.
Any help with this would be much appreciated.
Cheers
Scifo
Creating Movie Clips Inside Movie Clips
Hello,
I am having difficulties creating movie clips within other movie clips. The following works to create a movie clip on stage with no problems...
Code:
//Create movie clip and load image into it
_level0.createEmptyMovieClip("tn1",this.getnextHighestDepth());
mcl.loadClip(String(albums[0].photos[0].image),"tn1");
However, I want these movie clips inside another movie clip (mcPics1). For this I attempt...
Code:
mcPics1.createEmptyMovieClip("tn2",this.getnextHighestDepth());
mcl.loadClip(String(albums[0].photos[0].image),"myPics1.tn2");
Can anyone tell me where I have went wrong?
Thanks!
Targeting Movie Clips Inside Of Movie Clips
I am a AS3 newbie and am working on an animated cell phone text demo for my company's web site. I have three phones, each are a movie clip with a time line animation. The three phones are all inside of another movie clip where I animate their intro. I have a stop on the first frame of each of the three cell phones so that their screens are static as they fall into place. Their animations begin on the second frame of each of their respective time lines, and I would like the animations to begin when the phones are clicked. I'm not sure if these clips should be targeted from the main time line with the rest of the global script or if it should be on the time line of the nested MC. Even if I knew where to put it, I'm not really sure exactly what the script should be. Please help! My boss wanted this done last week!!!
Movie Clips Controlling Movie Clips, Problem
Hello.
I've been trying to make some drop down menus for awhile and I've run into a snag.
I have a button that when you roll over it, a movie clip appears [jumps to frame 2, frame 1 is blank.] This mc is the drop down menu. The drop down menu mc consists of other buttons that when you roll over them they stay green, but all other buttons go blue. [done by making certain mc jump to frame 2 and others jump to frame 1 to dissappear.]
So this all works fine.
My problem now comes when I try to attach on (release) functionality to the buttons inside the drop down mc. I have the following code on one of the buttons inside the 1st drop down menu:
// Drop down menu colour changes.
on (rollOver) {
_parent.about.gotoAndStop(1);
_parent.what_about.gotoAndStop(1);
_parent.what_else_about.gotoAndStop(1);
_parent.where_about.gotoAndStop(2);
}
// Trying to get wherewestarted movie clip to jump to frame 2 on release.
// Also making other movie clips jump to frame 2 to dissapper.
on (release) {
_parent.wherewestarted.gotoAndStop(2);
_parent.mainlogo.gotoAndStop(2);
_parent.address.gotoAndStop(2);
}
So the on (rollOver) part workds great, and I'm quite pleased with the resluts... however when you click a button in the menu, nothing happens. No movie clips appear, or dissappear. I've tried it without using _parent, I've tried _root... I just don't know what to do.
How can I get a rollover AND a release action?
Help!!
DryCow
How To Make Movie Clips React To Other Movie Clips?
I'm designing this menu system that has four square buttons in a horizontal line. The premise of the menu system is when one button is clicked that button expands horizontally and the other buttons shrink horizontally and slide to the right. How would I go about doing this with actionscript? I'm using Flash 8 and Actionscript 2.0.
Movie Clips Controlling Movie Clips, Problem
Hello.
I've been trying to make some drop down menus for awhile and I've run into a snag.
I have a button that when you roll over it, a movie clip appears [jumps to frame 2, frame 1 is blank.] This mc is the drop down menu. The drop down menu mc consists of other buttons that when you roll over them they stay green, but all other buttons go blue. [done by making certain mc jump to frame 2 and others jump to frame 1 to dissappear.]
So this all works fine.
My problem now comes when I try to attach on (release) functionality to the buttons inside the drop down mc. I have the following code on one of the buttons inside the 1st drop down menu:
// Drop down menu colour changes.
on (rollOver) {
_parent.about.gotoAndStop(1);
_parent.what_about.gotoAndStop(1);
_parent.what_else_about.gotoAndStop(1);
_parent.where_about.gotoAndStop(2);
}
// Trying to get wherewestarted movie clip to jump to frame 2 on release.
// Also making other movie clips jump to frame 2 to dissapper.
on (release) {
_parent.wherewestarted.gotoAndStop(2);
_parent.mainlogo.gotoAndStop(2);
_parent.address.gotoAndStop(2);
}
So the on (rollOver) part workds great, and I'm quite pleased with the resluts... however when you click a button in the menu, nothing happens. No movie clips appear, or dissappear. I've tried it without using _parent, I've tried _root... I just don't know what to do.
How can I get a rollover AND a release action?
Help!!
DryCow
Problems Creating Movie Clips Within Movie Clips
Okay, I'm creating yet another game and need to create a vehicle. So I wanted to create one movie clip for the vehicle and within that movie clip create multiple movie clips for all of the parts.
So I created a new symbol, let's call it vehicle and then within that area I created all of the vehicle parts as symbols within that symbol. At least I think I did. Anyway, when you look at the library, sure enough you see all of parts for the vehicle and the vehicle itself. Within actionscript, however, I can create an instance of the vehicle. I can create instances of all of the parts, but not the vehicle.
The reason why I was going this route is that I wanted more realistic movement. I wanted certain parts of the vehicle to move depending on what the user did, but not other parts. Can anybody shed some light on this subject? Thanks in advance.
Embedding Smart Clips In Movie Clips Causes Crashes...?
i noticed that if you use more than one of those drop-down menu smart clip in the common library, you can't see all the choices...
e.g.
drop in one instance
then another directly below it.
publish the movie
select the third or fourth choice from the second drop-down
let go so that your choice is selected
now re-select the second drop-down menu...
the other choices are hidden by the menu above it.
this is also the case if you try the procedure in reverse...
i.e. if the second instance is on a higher z-plane, the choices in the first will be hidden.
it seemed logical to drop the smart clip into a movie clip then use mc.swapDepth to set the z-index
got swapDepth working perfectly
(thanks, Mac8myPC): http://www.flashkit.com/movies/Scrip...98/index.shtml
but as soon as you put an instance of the smart clip into a movie clip, flash (5 for mac, PPC, OS 9.1, g4 466, 384MB) crashes as soon as you try to publish/export/test movie.
i tried it in a button as well... same thing
i've been trying to rebuild the menu in a normal movie clip form but it seems like more pain than it's probably worth...
any suggestions?
thanks in advance,
--cera
Movie Clips Inside Move Clips. How To Control?
I have an object in this case a foot with toes on it. the toes animate as well as the whole foot moving with the nails on it. I have instance names assigned for all the mc's problem is that the toes are buried about 3 layers down inside the foot_mc so they will move with the foot as well. When I assign a function to them the error compiler does not know where the nails are . What is the best way to fix or re-do this layout?
I am a total newbie to Flash and AS3, so any help would be great
I FIGURED IT OUT.
Aligning Movie Clips To Movie Clips Within Movie Clips?
hi, i want 2 align a movie clip, with a movie clip nested within a movie clip using actionscript. When I try to do this it aligns to the top of the screen. I know movie clips have like different _y and _x cooridnates relative to the stage or whateva or something like that. Neway any one know how to align movie clip with another movie clip within a movie clip like for instance:
_root.ball._y =_root.square.triangle._y
and get them 2 be at equal positions on the stage. If u understand please help
Tanx in advance4
Movie Clips, Vs. Smart Clips Vs My Brain
I am having a difficult time trying to wrap my head around the MC process and its usefulness. I know they are very beneficial, make things easier, file sizes smaller etc. but I can't seem to make logic mesh with my brain cells.
Does anyone have a good way of explaining the "How to's" and "Why for's" of Movie Clip's????
Also, what is the difference between a Movie clip and a Smart clip?? (The latter I have the same questions about as well.)
Thanks,
Controlling Instances In Movie Clips From Other Clips
I am trying to get a button on my level 2 in my main movie to point to a frame inside a movie that has been loaded in on level 3 on the main movie. I have tried all different kinds of combinations and no success. I even tried putting the level 3 movie in an empty movie clip on the root, and naming the instance "music", and then writing in the button _root.music.GotoAndPlay(3); I need it to target frame 3 in my level 3 movie. Should I put the level 3 movie in its own empty movie clip? I was able to get the button to unload movie3, but I don't want it to dissapear, I just want it to go to frame 3 in the movie clip to turn off the music.. You can see what I mean at the address below. I have my audio player in the bottom right with an on/off that works fine, but when I go to the link in my site "Music" there are some downloadble MP3's, and when you click on one I want the "equalizer bars" you see in the audio in the lower right corner to stop, and it means I need it to go to frame "3" of tha movie clip for that to happen, just like it does when you click on "off" in the audio movie. Anyway, sorry this is long winded, but wanted to make sure it was clear as to what I am trying to do..
Thanks in advance,... Here is the link
http://www.incogneato.tv/stales
Mike
Movies Clips Called Within Other Movie Clips
I started this flash porject a while back and haven't touched it in a long time...a few problems to it, that I will fix one problem and then ask for the next problem.
I have a flash file called playin.fla with 2 frames, frame one has a movie clip that is a intro, frame 2 is my main screen with the nav and all the good stuff.
I have 4 buttons on that with a blank screen to load my stuff in, and it is called 'screen'
So here is my code that isn't working:
on (release) {
loadMovie("portfolio.swf", "_root.screen");
}
Easy to fix I am sure, I have tried _parent.screen as well, doesn't work....
Thank you very much for your help in advance.
Clips Within Movie Clips And Instance Troubles
I'm trying to create ultimately 9 seperate instances that function seperate from each other perhaps after being click on within their own hit box.
directions: up and down to cycle squares, click (anywhere) to rotate.
As it stands the first instance is the only one that reacts to the up and down commands and both react at the same time (bad) to the clicking for rotation...
go here http://maroonedmoon.com/cubes.swf to see the swf if action...
I need these two squares to act independent of each other, i've tried naming them different things, and even duplicating the symbol with different names... but it's not working. I imagine the issue is with my simplified actionscript...
any help is greatly appreciated
and here's my .fla
Empty Movie Clips And Duplicating Clips
I've been trying to reproduce an animation effect I've seen on the Armani website, but I'm stuck trying to duplicate an empty movie clip with image loaded into it. The duplicates exist and I can move them, but they are invisible. Since the duplicates reside on depths above the intitial clip I'm confused about why they are invisible. The duplicates are scripted to follow behind the initial clip - each offset by 30 pixels (though I don't have that working perfectly).
I'm attaching a simplified version of my file to isolate just the duplication troubles. Thanks for the help!
Controlling Movie Clips With Movie Clips...?
I have created four movie clips which appear on stage together. They are still images which become active when clicked. (first frame in each clip is a button). How can I make each movie clip return to its initial inactive state when another clip is clicked.?
i.e. only one clip is active at a time..the others always revert to initial frame 1 position..
Help very much appreciated!!
Controlling Movie Clips In Movie Clips
Hi there,
I have an array of movie clips in a grid 4 x 5
so I have 20 movieclips looping themselves on a page.
I want to be bale to pause, and resume play of all these movieclips as one.
Is it as easy as making the movieclips one BIG movieclip and then just assigning the stop, play, rewind commands to it?
Is this possible?
Thanks!
Glynis the Menace
Movie Clips Controlling Other Movie Clips
I am having problems.
I have 2 movie clips in the main timeline. One MC is a bunch of links and is named "topnavbar", and the other MC is the content pages for each of those links and is named "content".
How do I code the links so that when one of the links is clicked the "content" mc jumps to a specific frame?
Thanks in advance for the help
Dropping Movie Clips On Movie Clips
When I select a movie clip and drag and drop it over another movie clip sometimes when I release the mouse button the movie clip is not released. Has anyone seen this before? Any suggesstions would be great.
My movieclip contains a button that contains a text box with a number. So whats happening is when I drop one number on top of another the number is sometimes not realesed when I release the mouse button.
Thanks
Movie Clips Controlling Movie Clips
Hi i'm creating a game which involves hitting meteorites but i keep hitting the same problem (notice the rubbish pun there). I need the 'hittest' function to only work on the meteror and not on it's trail (see picture below):
i think the way to do this is to add the trail separately after the metoer (which falls down from the top of the screen) but i have no idea how to make a movie follow another movie plus there will be multiple meteors.
also when the meteor is hit it needs to dissapear (to stop the 'hittest' working when it shouldn't PLUS open a movie showing an explosion).
hope i've explained that all well, spent days trying to get the code for it,
basically ......... hit-test on metoer (not it's trail) set's another movie clip off which will not respond to the original hit-test
thanks, Explosive Sheep
Movie Clips Inside Of Movie Clips
I'm having a dilemma using movie clips inside of movie clips, and I'm sure you can do this, right?
I'm creating my website, and all the actionscript is coded the way it should be. What I have is the first movie clip (we'll call it "clip1" with buttons, and when you click the buttons, they are supposed to move clip1 to a certain frame, and this works fine. But it is also supposed to move "clip2" (which is inside of clip1) to a certain frame as well, and this does not work. Here is the code for the button as follows:
on(release) {
clip2.gotoAndPlay(80); //move clip2 to certain frame
this.gotoAndPlay(60); //since buttons are inside clip1
}
I've also tried this with frame labels and that does not work either. If you want, I can post the project for you to take a look at and I appreciate all the help you can offer. Thanks!
Movie Clips Calling Movie Clips
help..... please ....
I can't get my Nav to work the way I want it to. Would somebody please take a look at www.MissMaryMac.org. this is my portfolio site. On the nav box you will notice three sections 1. print 2. web and 3. Graphics & Illustration. Notice that this nav is a draggable movie clip. Below the nav (because I can't figure out how to make it work from within the nav movie clip) are the next and back arrows. right now the next and back buttond are placed inside of each of the three sections and their code looks like this:
on (press){
slideClick = 1;
transition.gotoAndPlay("start");
}
This works fine but I would like to take the next and back buttond and place it within the draggable nav movie clip and have them work from there but have been unsuccessfull in speaking to the different sections from within the nav movie clip. Woe is me
P.S. The different sections are movie clips placed on the main timeline and the nav is also a movie clip placed on the main time line. each movie clip is named ie; web, print & Ilustration
When I place the next and back buttons inside the Nav movie clip this script did not work:
on(press){
tellTarget(_root.print){
slideClick = 1;
transition.gotoAndPlay("start");
}
}
Any Ideas???
Thanks much!
-M
Do Movie Clips Not Work Within Another Movie Clips?
I'm using Flash 8, AS 2.0...
Is it possible to have an action on a movie clip that is INSIDE another movie clip.
I created a drop down menu movie clips with the following code. I have a simple 15 frame timeline that when you rollover it, it tweens and when you rollout is rewinds...
Code:
stop();
this.onEnterFrame = function(){
if(rewind == true){
prevFrame();
}
}
this.onRollOver = function(){
rewind = false;
play();
}
this.onRollOut = function(){
rewind = true;
}
I want this same effect and code on a nested movie clip. But I'm having trouble figuring out how to make the movie clip work inside this movie clip. It would be the same code... it just doesn't seem to work... and any other things I've tried and read about hasn't yet worked.
Please help me!
Attaching Movie Clips Over Movie Clips...
The swf is supposed to be some sort of image gallery with 2 levels. Here is the image illustration of the movie structure (I would upload the fla but its too big for the site)
Everything works just the way I want it too. After about 20 seconds of constant clicking and loading new movie clips the load to the root gets really sluggish.
I am pretty sure the problem is all of the movie clips are loading over top of one another so after time it gets to crowded. I am not sure how to fix it though.
My code to get to the first level movie clips looks like this:
PHP Code:
on (release) { _root.attachMovie ("image 4 att", "newatt", _root.getNextHighestDepth(), {_x:302.7, _y:209.6});}
My code to get to the next movie clip on that level looks like this:
PHP Code:
on (release) { _root.attachMovie ("image 5 att", "newatt", _parent.getNextHighestDepth(), {_x:302.7, _y:209.6});}
My code to get back to the main level looks like this:
PHP Code:
on (release) { _root.attachMovie ("mainMovie2", "newatt", _root.getNextHighestDepth(), {_x:302.7, _y:209.6});}
Confused About Movie Clips In Movie Clips...
Help! I have scoured pages and pages of books and forums, and cannot seem to find a straight answer on this. Even on the recent posts in this forum the answers seem very muddled.
I have created a drop down menu, which consists of a movie clip with an onRollover action, which "drops down" a movie clip that contains movie clip buttons. for example:
menu_mc (has onRollover and RollOut action to reveal menu)
contains button1_mc, button2mc, etc.
which are supposed to link to outside urls.
i am to understand that by using onRollover and onRollout on the menu_mc to animate it negates the movie clip button's actions underneath...I just don't understand what action (tellTarget?) to use (AND WHERE...frame? instance?) to get the buttons inside the menu_mc to work.
please help! thanks so much!!!
Attaching Movie Clips To Other Movie Clips
I have mc1 nested like this
_root.mc3.mc2.mc1;
If i want to attach the mc1 from within mc2 timeline to the _root timeline how can I do this?... I don't want to reattach it from the library it must be the nested mc1 that is attached to the root timeline.
Is there a way to attach movie clips to other m.c's in this way?
regards J
Edited: 11/22/2007 at 06:31:42 AM by jonnybennett
How To Affect Movie Clips In Other Movie Clips.
Anyways... I've got these movie clips within another movie clip which work perfectly. They use simple action script to get things done.
this.onRollOver = function(){
gotoAndPlay(2);
}
this.onPress = function(){
gotoAndPlay(49);
}
However I want to add something like this to tell the movie clip that they're inside of collectively to start something too.
Something like:
this.onRelease = function(){
buttonsfull.gotoAndPlay(2);
}
buttonsfull is the instance name of the movie clip they're all in collectively. How would I go by making this work so it actually does something. If I put the code in the movie clip which they're all in it overrides what I want them to do with the earlier code I showed you.
Basically looking at the code each movie clip acts as a button. onRollOver they do a little animation with themselves in their own little timeline. onPress they do another little animation in the same area.
Now I want to be able to access and mess with the timeline up one level (to the movie clip which holds all these buttons) with an onRelease thing. This timeline is one a movie clip with the instance name of buttonsfull.
Help please. I used to know but forgot. Something that doesn't stop the current animation in the button either.
Edited: 04/24/2008 at 11:24:28 AM by DumbFudge
Loading Movie Clips From Movie Clips?
Hi..Is it possible to load movie clips from other loaded clips as opposed to just loading onto the main movie?
I have tried to do this but it doesn't want, to play....any ideas people?
Creating/using Movie Clips Outside Of Movie Clips
Hello... again.
Here's what I'm trying to do (in example form): I have a movie clip called "dude". Dude is animated to walk around, then drop a cigar (all inside the movie clip). But the problem is, dude moves, so if you try and move dude as the cigar is dropping, the cigar moves with him. So what I want to do is create a new movie clip instance called "cigar" OUTSIDE of the movie clip dude right as he's dropping it, so that you can move him without moving the cigar. Get it? I've attached another helpful animation to explain.
What I have right now is, on the 13th frame of dude, a few lines of code that create and place an instance of cigar. In that frame I also have an invisible instance of cigar for me to duplicate. Inside of the cigar movie clip is the animation that makes it fall to the ground. I need to change that code so that the instance of cigar is created outside of the movie clip dude. Here's the code I have now (inside of dude, on frame 13):
Quote:
mc_cigar.duplicateMovieClip("cigar", 1);
EDIT: Hmm, attachment ain't working... =
Thanks a lot,
-Raven~Storm.
Movie Clips And Blank Movie Clips
Hello! I was wondering if it is possible to load a movie clip into a blank movie clip?
On my main timeline I have a button (mode_btn) and I want to be able to click it and load another movie clip (mode_options_mc) into a blank movie clip I have (mode_empty_mc). Is this even possible?
Thanks in advance!
Movie Clips Within Movie Clips Issue
Hello friendly people at Kirupa,
Was wondering if I could get some help with this, I'm workinh on my first full screen flash website and trying to get this menu working on it with the tween class. Now I got the menu moving like I want when you rollover and rollout it and when you resize the screen it goes where it is suppose to be but inside the menu_mc I got my navigation buttons as movieclips, and I go in there do my rollOver and rollOut states and do the coding for it and it does not work. I figure because on the main part for the menu_mc I need to use a onClipEvent on the actual menu_mc movielclip. Now I have done this before but only for rollover states ive never used a onClipEvent so when you rollOver and rollOut that it uses the tween class. Ive attached my fla and the exact math for the tween I want to do in the actions layer so right now its like I said its moving but the button mc's inside the menu_mc dont work so if someone can just show me how to use the tween class on a onClipEvent or just fix my fla which should take two minutes, I understand what I need to do just havent done it before. Thank you, my fla is below...
Manipulating Movie Clips Within Movie Clips
I have this code:
on (release) {
_root.principalsContent_mc.text_mc.gotoAndPlay(6);
}
But it doesn't do anything. Are there problems with trying to manipulate mcs two-levels down? That is, this code resides inside a mc inside a mc inside a mc, and is trying to move a mc that resides inside a mc. Does all this nesting just not work?
Coding For Movie Clips Within Movie Clips
All right, here's the thing:
I'm currently trying to develop a flash-based game. Right now, i've gotten to the point where the basic interface is almost done except for achieving hit-testing.
To that end, I've gone to this forum to ask for help. Yes, I'm trying to do hit testing for a movie clip within a movie clip.
Right now, I am not willing to change it back to another way, especially since by solving one issue, I'll solve another.
Below is a link to the file in question.
Any and all help would be apreciated.
(view line 676.)
http://www.megaupload.com/?d=ZK4QC51P
The type of hit-test is...
Code:
player.onEnterFrame = function(){
if(bolder.hitTest(newX, newY, true)){
//nothing happens
} else {
player._x += newX;
player._y += newY;
}
}
Keep in mind, this is not a literal taking from the file, just an example.
Fast Forward And Rewind Buttons To Control Movie Clips AND Main Movie
I am creating a software training movie in Flash (MX). The main movie has text, sound and animations directly on the main timeline, and also includes external swfs (video screen captures) that are loaded dynamically into a movieclip target.
loadMovie("bkr_openpgm.swf", "mc_finvideo");
I'm not importing these videos because they can be quite large after importing (my video capturing software can export as swf and avi). I will never play more than one movieclip at a time (so I use the same movieclip to load all movies: mc_finvideo), and there can be many frames in between movie clips where there's only non-movieclip stuff going on on the main timeline. After I finish playing a movie clip , I unload the movie from the movieclip using the following on the frame on the main timeline where the movieclip should end
mc_finvideo.unloadMovie()
I have play, pause, fast forward and rewind buttons on the main timeline that control the main movie just fine. The play and pause buttons also control the movieclip fine.
However, I'm having problems with the rewind and fast forward controlling the movieclip. The button logic works fine (moves play ahead or back 100 frames) UNLESS I click the rewind button at a point within 100 frames AFTER a movie clip has unloaded. Then (assuming the last movie clip was at least 100 frames long), the movie goes back to a frame where there should be a movie loaded, but of course there isn't, since the frame that loaded the movie clip wasn't hit.
Here's the code for the rewind button's on release event:
intCurrFrame = math.round(_currentframe);
intMCCurrFrame = math.round(mc_finvideo._currentframe);
//if the movieclip is closer than 100 frames
// to the beginning, go back 100 frames
// otherwise unload it
if ((mc_finvideo._currentframe - 100) > mc_finvideo._totalframes) {
mc_finvideo.gotoAndPlay(intMCCurrFrame - 100);
} else {
mc_finvideo.unloadmovie();
}
this.gotoAndPlay((intCurrFrame - 100));
The fast forward button is similarly problematic -- if I click fast forward within 100 frames of a frame where a movie clip will load, the frame that the movie fast forwards to has no movie clip playing because the frame that loads the clip was skipped over.
Can anyone help me make this work? (Maybe I'm going about this whole thing the hard way?)
I can post a sample fla if it will help clarify.
Thanks
Movie Clip Runs Slow When There Are Multiple Movie Clips Running
Hi, Can someone help me out? I have made a flash where a movie clip containing text runs at the same time that a second movie clip runs (movie clip 2). I used function updateCursor() to replace the standard mouse symbol with the movie clip symbol (movie clip 2). After the scene runs a few times at the correct speed, everything within it slows down markedly, which I don't want. Why is this happening? Any ideas? I have actually seen something similar in Flash 5...but I can't figure out how to keep this from happening!!
Problem Loading External Movie Clips Into Target Movie Clip
Hello,
I've been desperately trying to figure how to get this function to work. I created a target movie clip, then assigned an external one to it, but I can't seem to get it to work. Can anyone help me with this and fully explain it so I don't miss anything? I'm using flash professional 8.
Thanks so much!
Rob
Targeted Movie Clips Don’t Work Once Loaded Into A Container Movie.
Here’s my problem…
I have several external SWF (child) movies that are to be loaded upon demand into another SWF container (parent) movie file. Pretty straight forward.
Each of the child movies has MCs communicating with other MCs within the same child movie.
For instance the timeline of one MC will have a frame action, which targets another MC instance to play(). Again, Pretty straightforward stuff.
These files work beautifully when viewed independently. The problem is when they are loaded into the parent container movie the target MC functionality no longer works.
I believe it’s because once the child movie is loaded into the parent movie the absolute path of the targeted MC has changed and what was once the “_root” in the child movie is no longer the actual root?
I have tried both methods in the child movie:
//method without using ‘with’
_root.ContentWindow.play();
And using the “with” action like so:
//method using ‘with’
with (_root.ContentWindow) {
play();
}
It would seem that in theory once the Child SWF file is loaded into the Parent SWF file the targeted path would have to have another level in it – cuz now the MC “ContentWindow” is no longer one level down from the “_root” but two levels?
For example: _root.LoadedChildMovie.ContentWindow.play()
Can anybody please help me with this? I’m afraid I have a ton of work that’s relying on this functionality and my deadline is dangerously drawing near!
|