Groups | Blog | Home
all groups > flash (macromedia) > september 2004 >

flash (macromedia) : Very simple problem, but have brain freeze


paul_the_brickwall
9/28/2004 11:08:55 PM
ok guys i'm havin a dumb moment. How do i make it so that when a button is rolled over it plays a movie clip that is on a different layer but in the same scene?

pwiop
9/28/2004 11:13:54 PM
myButton.onRollOver=function(){
myMc.play()
}

badabing

paul_the_brickwall
9/28/2004 11:21:48 PM
just for reference how would i do this through the menus, not typing code straight in

thanx by the way mate

paul_the_brickwall
9/28/2004 11:33:25 PM
can't actually get this working!!

clicked on the button i wanted then actions, then on roll over, logo.play and nothing.

What obvious thing am i missing?

oceanfeeling
9/28/2004 11:53:55 PM
Hi there,

holder.loadMovie("mc.swf",2);
btn.onRollOver = function() {
holder.play();
}

Propably, this is not your case but it might be helpful.
holder is an empty movie clip where i load the movie that i want to trigger
play when i roll over the button

pwiop
9/28/2004 11:53:59 PM
The code I suggested you place on the main timeline NOT on the button.

If you wish to place the code directly on the button you would ned to do this

on (rollOver) {
_root.myMc.play() //presuming of course your mc is on the root timeline

}

There are any number of reasons why one would choose to code a buttons
functions either on the button or on the main timeline. Code on the button can
travel with the button if say cut and pasted however, code on the main timelin
keeps all the code in one place - that is sometimes a blessing - often again it
is a matter of preference

By the way the code in the timeline may not work in older versions of Flash

p a u l
pwiop
9/29/2004 12:06:54 AM
Using an empty movieclip in which to load and external swf permits you to
control that swf as if it were a movieclip inside your main swf. This is quite
useful for large files such as perhaps a videoclip. By saving it externally it
keeps the file size of the main swf smaller

p a u l
paul_the_brickwall
9/29/2004 10:06:11 AM
cool thanx for the help guys

paul_the_brickwall
9/29/2004 10:16:15 AM
Still can't get the dam thing working. On the button i put

on (rollOver) {
_root.myMc.play() //presuming of course your mc is on the root timeline

}

and changed myMc to "logobutton" and nothing!

Paul
Paul Hayward
9/29/2004 6:09:37 PM
I really do feel stupid people, but i really need a solution. I can't move
on until i fix this. Please help!

Paul

[quoted text, click to view]

pwiop
9/29/2004 10:29:45 PM
paul_the_brickwall
9/30/2004 3:56:54 PM
i shall try

paul_the_brickwall
9/30/2004 10:21:13 PM
i tried but the smallest i can get it to is 1.8mb which is too big for the servers

paul_the_brickwall
9/30/2004 10:22:03 PM
shall i email it to you?

pwiop
9/30/2004 11:00:31 PM
Our email might not permit that.
I have attached an example that uses both the on and off buttin code as a demo
- have a look and see if you can make any sense of it with regard to your own

p a u l
paul_the_brickwall
10/2/2004 11:10:10 PM
thanx man, i'll have a look

laythss
10/3/2004 2:39:13 AM
paul, did you remember to call your movieclip logobutton. This might be the problem.

paul_the_brickwall
10/3/2004 10:26:16 PM
if you mean call it as in it is a movieclip called logobutton then yeah i think so lol

paul_the_brickwall
10/6/2004 11:33:56 AM
Hey pwiop, When i tried to open the file you sent it just says unexpected file format, must be an error. Do you have another version?

AddThis Social Bookmark Button