I’ve used a tutorial for some Movie Clip buttons, and the code used is below:-
[COLOR=blue]import mx.transitions.Tween;
import mx.transitions.easing.*;[/COLOR]
[COLOR=blue]home_mc.onRollOver = function () {
home_mc.swapDepths(this.getNextHighestDepth());
new Tween (home_mc,"_xscale",Elastic.easeOut,home_mc._xscale,130,1,true);
new Tween (home_mc,"_yscale",Elastic.easeOut,home_mc._yscale,130,1,true);
}[/COLOR]
[COLOR=blue]home_mc.onRollOut = function () {
new Tween (home_mc,"_xscale",Elastic.easeOut,home_mc._xscale,100,1,true);
new Tween (home_mc,"_yscale",Elastic.easeOut,home_mc._yscale,100,1,true);
}[/COLOR]
[COLOR=#0000ff][/COLOR]
[COLOR=black]The real problem i am having now, is assigning code to these so a sound is played onRelease. I’m stuck on which code i need to put where on these.[/COLOR]
I tried the following:-
[COLOR=blue]home_mc.onRelease = function () {
Mysound = new Sound(this);
Mysound.attachSound(“CLICK7.wav”);
Mysound.start(0, 99);
}[/COLOR]
[COLOR=#0000ff][/COLOR]
[COLOR=black]Although the syntax appears to be fine on this as it doesn’t create any errors, no sound actually plays.[/COLOR]
I guess, i’m missing something here, but i can’t find what it is, can anybody please help me out?
One final quicky, Although i am currently trying to get the sounds to play onRelease, would it be possible to have two functions happening say on the [COLOR=blue]onRollOver[/COLOR] command, for example could i have a sound play and the button expand at the same time?
Please help if you can.