Did you convert the button to a movie clip, if so then you have ended up with a button inside a movie clip, so your code: loadMovie("Chuck.swf", "motionmc"); which is loading chuck.swf into motionmc will not find "motionmc" because the button has changed level.
To solve your problem either way, go into "motionmc" and place this inside it: trace(this); and run your movie;
copy what ever was traced e.g _root.motionmc, and go back into your movie button, you want to be inside the movie button itself and do this, so double click the movie button to go into it, put this on the timeline:-
Code:
this.onRelease = function()
{
//replace _root.motionmc with what you got from your trace
Hello Embussy, to have different buttons spining the wheel, I have divided up the code, so you have two functions, over() and out(), check it out below. I have also included an fla attachment with a working example of two buttons calling the same wheel to spin. I put some variables for you to play around with, increase speed etc.
This is a very simple and quick code, will work for small projects, but cannot be used to launch a rocket or anything like that.lol enjoy, hope it helps :
Code:
var startspeed = 30;
var maxSpeed = 60;
var halt = 0;
var accelerateBy = 1; //this will speed up speed up spinning as you increase
var applyBrakeBy = 1; //play around with this to increase breaking
btn1.onRollOver = over;
btn1.onRollOut = out;
btn2.onRollOver = over;
btn2.onRollOut = out;
function over()
{
onEnterFrame = function()
{
startspeed += accelerateBy;
wheel_mc._rotation += startspeed;
if(startspeed >= maxSpeed)
{
startspeed = maxSpeed;
}
}
}
function out()
{
onEnterFrame = function()
{
startspeed -= applyBrakeBy;
wheel_mc._rotation += startspeed;
if(startspeed <= halt)
{
startspeed = halt;
delete this.onEnterFrame;
}
}
}