I have successfully attached four buttons to the stage which all function fine using the following code. The only thing is the content is not re-aligning upon resize. Can someone tell me what I’m doing wrong here? TIA
import com.mosesSupposes.fuse.*;
ZigoEngine.simpleSetup( Shortcuts, PennerEasing, Fuse );
Stage.align = “TL”;
Stage.scaleMode = “noscale”;
var activeClip:MovieClip;
var stageListener:Object = new Object();
stage.addListener(stageListener);
function positionStuff(): Void {
c_01._x = (Stage.width/2) - 168;
c_01._y = (Stage.height3)/4;
c_02._x = (Stage.width/2) - 83;
c_02._y = (Stage.height3)/4;
c_03._x = (Stage.width/2) + 2;
c_03._y = (Stage.height3)/4;
c_04._x = (Stage.width/2) + 87;
c_04._y = (Stage.height3)/4;
}
stageListener.onResize = function():Void {
positionStuff();
};
this.attachMovie(“clip”,“c_01”, 2, {_alpha:0});
this.attachMovie(“clip”,“c_02”, 3, {_alpha:0});
this.attachMovie(“clip”,“c_03”, 4, {_alpha:0});
this.attachMovie(“clip”,“c_04”, 5, {_alpha:0});
positionStuff();
c_01.alphaTo(100, 2, “linear”, 1);
c_02.alphaTo(100, 2, “linear”, 1);
c_03.alphaTo(100, 2, “linear”, 1);
c_04.alphaTo(100, 2, “linear”, 1);
c_01.onRelease = function() {
activeClip.tintTo(0xA4A4A4,1);
c_01.tintTo(0x999900,100,.3);
activeClip = this;
}
c_01.onRollOver = function() {
if (this != activeClip) {
c_01.tintTo(0x333333,100,.3);
}
}
c_01.onRollOut = function() {
if (this != activeClip) {
c_01.tintTo(0xA4A4A4,100,.6);
}
}
c_02.onRelease = function() {
activeClip.tintTo(0xA4A4A4,1);
c_02.tintTo(0x999900,100,.3);
activeClip = this;
}
c_02.onRollOver = function() {
if (this != activeClip) {
c_02.tintTo(0x333333,100,.3);
}
}
c_02.onRollOut = function() {
if (this != activeClip) {
c_02.tintTo(0xA4A4A4,100,.6);
}
}
c_03.onRelease = function() {
activeClip.tintTo(0xA4A4A4,1);
c_03.tintTo(0x999900,100,.3);
activeClip = this;
}
c_03.onRollOver = function() {
if (this != activeClip) {
c_03.tintTo(0x333333,100,.3);
}
}
c_03.onRollOut = function() {
if (this != activeClip) {
c_03.tintTo(0xA4A4A4,100,.6);
}
}
c_04.onRelease = function() {
activeClip.tintTo(0xA4A4A4,1);
c_04.tintTo(0x999900,100,.3);
activeClip = this;
}
c_04.onRollOver = function() {
if (this != activeClip) {
c_04.tintTo(0x333333,100,.3);
}
}
c_04.onRollOut = function() {
if (this != activeClip) {
c_04.tintTo(0xA4A4A4,100,.6);
}
}