-
Distant buttons
This is what I have:
A movie clip and four buttons that play different parts of it.
This is what I would like to have:
The buttons should be placed so far away from the movie that they must (I think) be on a separate file.
This is what I don't have:
A way to send GotoAndPlay commands from the "Button movie" to the "Movie movie".
This is what I need:
Help.
Thanks
-
Senior Member of Toon Army
Hi
The distance of one mc to another physically on the stage doesn't matter at all!
You need to give your mc's an instance name .. say buttons and movie.
If you name a mc you can target it (control it)
On the actions for the buttons you can now have this code
Code:
on(release){
movie.gotoAndPlay(5);
}
This will goto frame 5 of the 'movie' mc and play when the button is released.
-
You mean that everything (including the other stuff) has to be inside then same flash object? I'm not sure if I can fix the *(%·#& page that way.
-
Senior Member of Toon Army
No, they don't need to be in anything ... they are on the 'stage'
your diagram looks fine.
Click on the movie, and in the properties box under movieclip (top left) type in an instance name. ie movie
Now put the code I posted earlier on the actions for your buttons changing the frame number to whatever you wish.
-
O.K. I think i've got the idea. I'll tell you later.
Thanks.
-
how do i give my movies an instance name... ?
i can't find it :/
(got mx btw)
-
Senior Member of Toon Army
Hi Shanks,
After you have created your movie clip (mc) and it is in the library.
You can create as many 'instances' of the mc as you want.
You can control these copies of the mc as seperate mc's by giving them an instance name.
You do this by left clicking on the mc on the stage, look at the Properties box, in the top lefthand corner it should say Movie Clip, under this there is a box to type in your mc's instance name.
-
aaah.. the problem i had before is that they weren't movice clips :P
i done that now.. but i have new problem: my animation is 200 keyframes long... i want that as one movie clip. its all in one layer..
how do i do this please?
-
ok. IGnore that :P
I've got my mc (cubes) and i've got my buttons (remote)...
the code on the button in remote, is:
on (release) {
cubes.gotoAndPlay(1);
}
.. this should restart the cubes animation.. but it doesn't do any thing
i tried adding _root. infront of the main line, and no change. >:|
any ideas?! :/
-
Senior Member of Toon Army
Hi Shanks
You have created a movie clip called cubes -- yes?
It's in your library CTRL/L -- yes?
Click on the instance of the mc cubes on the stage -- done?
Look at the properties panel top left corner,
see the box below where it says Movie Clip -- yes?
type in cubes1 -- this names that copy of cubes 'cubes1'
Change the line on remote to cubes1.gotoAndPlay(1);
If you have already done all this and it still doesn't work ... you should have placed remote and cubes on different layers of the timeline? So that they are both on the timeline at the same time. ie remote (layer1) and cubes1(layer2) are both on Frame 1
It seems complicated ... its easy once you do it.
You will soon see that there are good reasons for naming mc's
-
Thanks lucky =))
The problem was that they were on diff. timelines.. but i put them into the same movie, and now just use _root.cubes. ... and it all works =)
http://shanks.*****nut.net/test.html for what i got so far :P
thanks again for it all.
l8z
-
Senior Member of Toon Army
Hi Shanks,
Checked out your page .. love the cubes .. really good
-
thx
i was wondering (this is a little off topic btw) if you could help me with the next prob...
for the stop button, i don't want it to simple stop..
i want it to continue playing the movie until it reaches frame X, and then go to frame Y.
....
It could get more complicated, in the form of disabling the play button unless the movie is on frame Y... but thats a minor point i not worried about atm... :O
Any ideas?
-
Senior Member of Toon Army
Hi,
You could have a variable say .. pressed which you set to = false ... and on the button have ..
Code:
on(release){
pressed = true;
}
on frame X have ..
Code:
if(pressed){
cubes.gotoAndPlay("Y");
}
Disable the play button by creating an instance of it with no on(event) attached to it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|