View Full Version : button in movie clip
AN828
November 19th, 2004, 03:31 AM
I put a button in a movie clip to control actions in the main scene. Shouldn't that work? For some reason it doesn't. Any advice would be greatly appreciated.
dboers
November 19th, 2004, 04:00 AM
What action did you apply to the button?
AN828
November 19th, 2004, 04:09 AM
I tried rollOver, rollOut and onrelease actions to call targets in other movieclips.
dboers
November 19th, 2004, 04:15 AM
Can you write down your code, because I think it has something to do with the path
AN828
November 19th, 2004, 04:23 AM
on (rollOver) {
tellTarget ("/overbuttons") {
gotoAndPlay("ourteam");
}
}
on (rollOut) {
tellTarget ("/overbuttons") {
gotoAndPlay("freephotos");
}
}
on (release) {
tellTarget ("/overbuttons") {
gotoAndPlay("ourteam");
}
}
on (release) {
tellTarget ("/bigdoor") {
gotoAndPlay("close");
}
}
on (release) {
gotoAndPlay("ourteam");
}
I use this in other buttons that are on the main movie and it works fine.
Johnny64
November 19th, 2004, 04:29 AM
on (rollOver) {
_root.gotoAndPlay("ourteam");
}
Johnny64
November 19th, 2004, 04:36 AM
on (rollOver) {
_root.overbuttons.gotoAndPlay("ourteam");
}
on (release) {
_root.bigdoor.gotoAndPlay("close");
}
but i don't think this will work.
You can better give too much info then too little.
where are your buttons?
where are the movieclips that you want to control?
do you know how to use on() events?
=)
dboers
November 19th, 2004, 04:38 AM
Wich Flash version are you using? tellTarget is an old syntax!
First of all you shoul use the new syntax and secondly it isn't working because your button is inside a movieclip so you have to refer to the main timeline first. When we take your first action:
on (rollOver) {
tellTarget ("/overbuttons") {
gotoAndPlay("ourteam");
}
}
Should be:
on (rollOver) {
// _root is the main timeline
_root.gotoAndPlay("ourteam");
}
nipi
November 19th, 2004, 05:06 AM
Don’t use buttons, use scripted MC-s. Put them anywhere you like, but describe their actions on the main timeline ( layer “actions”). Much easier to work, then you have clear and compact overview of your code.
There is one very important thing – instance names. Without them nothing happens.
No matter how deep inside of MC – s your “button” is, it always work perfectly.
Take a look this fla below.
AN828
November 19th, 2004, 05:33 AM
I use MX. My clip is on the main timeline and so are the clips I'm calling to. Ultimately I just want to use the button inside the mc as a link to another site. That doesn't work either. I tried _root but that didn't work.
nipi: I can't view your file. I get an "unexpected file format" error.
nipi
November 19th, 2004, 05:46 AM
yeah, i use MX 2004 prof.
but i saved this vers for MX
try now
freeskier89
November 19th, 2004, 06:34 PM
ya I was having the same problem with one of my drop down menus. Tried to do mc for the all the buttons and have induvidual buttons within. I used the on(press) method, and it wouldnt recognize it being pressed for some reason. I finally resulted in having to switch each to an MC and have them on the main level and script them all to move dynamicaly based on their induvidual position. It kinda was a nusence(sp).
A solution to the problem would be quite beneficial. Thanks.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.