PDA

View Full Version : [MX] Button inside Movie Clip



DizainLand
February 7th, 2004, 04:57 PM
Hi every body

I made motion of movie clip iside it a button.
the motion is like this:

from 1 to 10 then stop

when you click the button it tells the movie the contiue from 10 to 20

i attached this script to the button

on (release) {
tellTarget ("/") {
play();
}
}


when i test the swf, it works great :)
the problem is this swf is targeted to an Home swf
so when i click that button, it plays the whole movies
Home and the swf itself :(

thanks for helping me

kode
February 7th, 2004, 05:08 PM
Hey Dizain,

First off, do not use slash syntax; it's been deprecated since Flash 5! :P
Just call the play() function:

on (release) {
play();
}

DizainLand
February 7th, 2004, 05:13 PM
Hi kode, i was sure u will reply :)

but i tried this, it does not work.

remember, the button is inside the movie clip
the movie clip plays on the main timeline.

so this code is if the movie and button on the same timeline.

is it clear :)

kode
February 7th, 2004, 05:15 PM
Oh! Sorry... I thought that the animation was inside the movie clip too. :P

on (release) {
_parent.play();
}

DizainLand
February 7th, 2004, 05:18 PM
Yes :)
it works
but
can we tell it to play from frame 30?

thanks alot

kode
February 7th, 2004, 05:20 PM
Sure! ;)

on (release) {
_parent.gotoAndPlay(30);
}

DizainLand
February 7th, 2004, 05:22 PM
Of course SURE :)

thanks alot :)

kode
February 7th, 2004, 05:31 PM
You're welcome, Dizain. :)