flash (macromedia):
I have a series of movie clips on the right side of the stage. I have a grid
set up with a timeline for the user to drag the clips into the timeline. After
all of the clips are arranged in order, I need the user to be able to press a
play button and have all of the clips play in the order that they dragged them
to the timeline. I have seen this done, but don't know how to make it happen.
Here is a sample of my swf file.
http://www.bigredrooster.com/ftp/loader5.swf See my code attached. It allows the user to "save" the postion of the clips
after they have arranged them.
Any direction or advice is appreciated. (Actionscript 2.0)
Thanks,
Rich
stop();
var btnAr:Array = new Array(lucy_mc, jd_mc, nike_mc);
var goto_ar:Array = new Array(2, 3);
var HotSpots:Array = new Array(hotspot1_mc, hotspot2_mc, hotspot3_mc,
hotspot4_mc, hotspot5_mc, hotspot6_mc, hotspot7_mc, hotspot8_mc, hotspot9_mc,
hotspot10_mc, hotspot11_mc, hotspot12_mc);
for (var i = 0; i<btnAr.length; i++) {
btnAr[i].onPress = function() {
startDrag(this);
};
btnAr[i].ivar = i;
btnAr[i].onRelease = function() {
var drag:Boolean = true;
stopDrag();
for (var j = 0; j<HotSpots.length; j++) {
if (this.hitTest(HotSpots[j])) {
if (drag) {
gotoAndStop([goto_ar[this.ivar]]);
this._x = HotSpots[j]._x;
this._y = HotSpots[j]._y;
}
}
}
};
}
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
if (Key.isDown(32)) {
lucy_mc.play();
}
if (Key.isDown(16)) {
lucy_mc.stop();
}
};
Key.addListener(keyListener);
mySharedObject_so = SharedObject.getLocal("myCookie");
saveButton.onRelease = function() {
mySharedObject_so.data.myXlucyposition = lucy_mc._x;
mySharedObject_so.data.myYlucyposition = lucy_mc._y;
mySharedObject_so.flush();
mySharedObject_so.data.myXnikeposition = nike_mc._x;
mySharedObject_so.data.myYnikeposition = nike_mc._y;
mySharedObject_so.flush();
mySharedObject_so.data.myXjdposition = jd_mc._x;
mySharedObject_so.data.myYjdposition = jd_mc._y;
mySharedObject_so.flush();
};
loadButton.onRelease = function() {
lucy_mc._x = mySharedObject_so.data.myXlucyposition;
lucy_mc._y = mySharedObject_so.data.myYlucyposition;
nike_mc._x = mySharedObject_so.data.myXnikeposition;
nike_mc._y = mySharedObject_so.data.myYnikeposition;
jd_mc._x = mySharedObject_so.data.myXjdposition;
jd_mc._y = mySharedObject_so.data.myYjdposition;
};