Log in

View Full Version : CSE using as1.0-2.0 Button to control MC won't work



saltysally
10-29-2008, 05:42 PM
Well I can't figure out whats up, I have the button on the timeline actionscript for it on the timeline, But it wont play my MC. My movieclip is all keyframes, could this be my issue?

[]TAGS

stop();
var iconDepth:Number = 0;
var down:Boolean = false;
_root.onMouseDown =function(){
if (_root.canvas_mc.hitTest(_root._xmouse,_root._ymouse)){
var x:Number = _root._xmouse;
var y:Number = _root._ymouse;
_root.holder_mc.moveTo(x,y);
down = true;
}
};
_root.onMouseUp = function(){
down = false;
};
var currentColor:String = "F7E7D9";
_root.createEmptyMovieClip("holder_mc", 100);
function draw() {
_root.holder_mc.lineStyle(0, parseInt(currentColor, 16), 100);
var x:Number = _root._xmouse;
var y:Number = _root._ymouse;
_root.holder_mc.lineTo(x, y);
}
_root.onMouseMove = function() {
updateAfterEvent();
if (down && _root.canvas_mc.hitTest(_root._xmouse, _root._ymouse)) {
draw();
}
};
window1_mc.gotoAndStop("color");
window2_mc.gotoAndStop("admin");
var topClip:MovieClip = window1_mc;
function swap(clip:MovieClip){
clip.swapDepths(topClip);
topClip = clip;
};
function changeColor(color_index:Number){
_root.currentColor = colors[colors_index];
}


function buildIconList(){
var spacing:Number = 120;
var iconY:Number = 365;
var iconX:Number = 70;
for (var i = 0; i < _root.icon_mc._totalframes; ++i) {
var newName:String = "icon_mc" + i;
var clip:MovieClip = _root.icon_mc.duplicateMovieClip(newName, 10000 + i);
clip.gotoAndStop(i + 1);
clip._x = iconX + i * spacing;
clip._y = iconY;
clip.homeX = clip._x;
clip.homeY = clip._y;
clip.icon_btn.onPress = function(){
startDrag(this._parent);
};
clip.icon_btn.onRelease = function(){
stopDrag();
_root.iconReleased(this._parent);
};
}
}
buildIconList();
function iconReleased(icon:MovieClip){
if(_root.canvas_mc.hitTest(_root._xmouse, _root._ymouse)){
++iconDepth;
var newName:String = "object" + iconDepth + "_mc";
var clip:MovieClip = icon.duplicateMovieClip(newName,iconDepth);
clip.gotoAndStop(icon._currentFrame);
clip.icon_btn.enabled = false;
clip._xscale = 150;
clip._yscale = 150;
}
icon._x = icon.homeX;
icon._y = icon.homeY;
}



function clearContent() {
_root.holder_mc.clear();
for (var i = 0; i <= iconDepth; ++i) {
var name:String = "object" + i + "_mc";
_root[name].removeMovieClip();
}
iconDepth = 0;
}
foward_btn.onRelease = function(){
icon_mc.gotoAndStop("head");

}

[]TAGS

BLiZZaRD
11-08-2008, 08:02 PM
Well, which button? I assume the forward_btn??

saltysally
11-09-2008, 01:25 AM
Thank you for the reply. I did figure it out. Any chance you might be familiar with JPEG Encoder scripts?

Medyman
11-09-2008, 02:21 AM
Any chance you might be familiar with JPEG Encoder scripts?
Post your problem. I've used them in the past and there are others who post here regularly that have as well. Doesn't hurt to ask. If someone knows about your particular issue, I'm sure they'll try to help.

Also, please use the [code] tags when you post code. It makes it much easier to read (which in turn makes it easier for us to help you).