[MX] Button inside Movie Clip

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

[AS] on (release) {
tellTarget ("/") {
play();
}
}
[/AS]

when i test the swf, it works great :slight_smile:
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 :frowning:

thanks for helping me

Hey Dizain,

First off, do not use slash syntax; it’s been deprecated since Flash 5! :stuck_out_tongue:
Just call the [font=courier new]play()[/font] function:

on (release) {
play();
}

Hi kode, i was sure u will reply :slight_smile:

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 :slight_smile:

Oh! Sorry… I thought that the animation was inside the movie clip too. :stuck_out_tongue:

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

Yes :slight_smile:
it works
but
can we tell it to play from frame 30?

thanks alot

Sure! :wink:

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

Of course SURE :slight_smile:

thanks alot :slight_smile:

You’re welcome, Dizain. :slight_smile: