I am everywhere, yet no where. If that makes any sense
Posts
21
Controlling Movieclips with buttons
Ok here is the problem. I've created 3 movie clips that fades in an image and fades out.
Home Clip 1. fades in from 1-10 then fades out from 11-20
About Clip 2. fades in from 20-30 then fades out from 30-40
Contact Clip 3. fades in from 40-50 then fades out from 50-60
I have 3 buttons that I want to control the movie clips with.
Home button, About button and Contact button.
How can I make one movie close and have another open after?
For example: If HomeClip is on frame 10 and I click on the Contact button then goto frame 11 and Play and after Home Clip has closed the Contact Clip plays from 40-50.
I want to be able to control a movieclip only if it's in a certain frame number.
1.) you need to take your "HOME" animation and make it a movie clip
..do the same with your "ABOUT" frames and "CONTACT" frames...
you will probably have to cut and paste the frames into new movie clips.
Make sure these 3 movie clips are on the stage with the instance names of
about_mc
home_mc
contact_mc
make sure each of them has a "stop;" action on the frame in the middle on the in/out parts of the animation.
when you get this far...post back..we'll go over step 2
I have attached a generic .fla for you to examine.
basically how this works:
you have a button (three), that does a few things:
a.) it checks for the status of a variable "focusClip"..if empty (no value) it starts playing its matching movie (button 1 starts movie 1..etc)
b.) if there "IS" a value for "focusClip" set..it plays "focusClip"'s "fadeOut" frameLabel
c.) it sets the value of a variable "newClip" to be clipX ("X" being the number for each clip..if button 1..then it will say clip1..if button 2= clip2...etc)
in your "animations" clip1, clip2 clip3....it does several things as FRAME ACTIONS:
a.) on the middle (stop frame.. you add a frame Lable of "fadeOut"
b.) on the same frame as above you set the variable focusClip = to that clips instance name (example: _root.focusClip = _root.clip1; )
c.) on the last frame you have an action that starts the variable "newClip" (set above by each button press) to play. (example: _root.newClip.gotoAndPlay(2); )
here is the .fla....if you have any questions..let me know.
I am everywhere, yet no where. If that makes any sense
Posts
21
Hey Whisper
I want to put the 3 buttons into a movie clip so that they can fade in after the preloader loads the movie. I put them in a movieclip called "BUTTONANIMATIONCLIP"
The code for button 1 is this:
on (release) {
if (focusClip == "") {
_root.clip1.gotoAndPlay(2);
} else {
_root.focusClip.gotoAndPlay("fadeOut");
_root.newClip = clip1;
}
}
How can I control Clip1 if I put the button in the movie clip "buttonanimationclip"?
I want to put the 3 buttons into a movie clip so that they can fade in after the preloader loads the movie. I put them in a movieclip called "BUTTONANIMATIONCLIP"
The code for button 1 is this:
on (release) {
if (_root.focusClip == "") {
_root.clip1.gotoAndPlay(2);
} else {
_root.focusClip.gotoAndPlay("fadeOut");
_root.newClip = _root.clip1;
}
}
How can I control Clip1 if I put the button in the movie clip "buttonanimationclip"?
Inside of there, I have the menu that pops out in the menubg_mc, I have the "profile" instance of profile_mc in the mainstage_mc on it's own layer. the focusClip="" is in there on it's own movie clip. I did that in an effort to duplicate the way your timeline worked in your example. I want to be able to transition in a different movie clip for each item on the menu. I haven't gotten so far as to create the movie clips for each, I just wanted to get it to work on the Profile link.