home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sears Catalog 2006 Spring/Summer (French Canadian)
/
SearsCanada-AutomneEte2006-FrenchVersion-WinMac.bin
/
fr
/
main.swf
/
scripts
/
DefineSprite_70_ultimateScroller_button_right
/
frame_1
/
DoAction.as
Wrap
Text File
|
2005-12-05
|
8KB
|
269 lines
this.useHandCursor = false;
this._focusRect = false;
setSkins();
this.onPress = function()
{
if(this._parent.enabled == false)
{
gotoAndStop("disabled");
return undefined;
}
this._parent.scrollDown();
this._parent.scrollDelay = true;
this._parent.delayTimer = setInterval(this._parent,"clearDelay",300);
this._parent.scrolling = "DOWN";
gotoAndStop("down");
updateAfterEvent();
};
this.onRelease = this.onReleaseOutside = function()
{
if(this._parent.enabled == false)
{
gotoAndStop("disabled");
return undefined;
}
this._parent.scrolling = false;
this._parent.clearDelay();
gotoAndStop("up");
updateAfterEvent();
};
this.setSkins = function()
{
this.drawButtons();
};
this.drawButtons = function()
{
w = 16;
h = _parent.c_scrollWidth;
arrowX = w / 2;
arrowY = h / 2;
x = 0;
y = 0;
this.createEmptyMovieClip("buttonG",1000);
this.buttonG._rotation = 90;
this.buttonG._x = 16;
switch(this._currentframe)
{
case 1:
if(_parent.c_buttonsVisible)
{
this.buttonG.createEmptyMovieClip("darkshadow_mc",1000);
with(this.buttonG.darkshadow_mc)
{
beginFill(_parent._parent._parent.c_darkshadow);
lineStyle();
moveTo(x,y);
lineTo(x + w,y);
lineTo(x + w,y + h);
lineTo(x,y + h);
lineTo(x,y);
endFill();
}
w -= 1;
h -= 1;
this.buttonG.createEmptyMovieClip("highlight3d_mc",1001);
with(this.buttonG.highlight3d_mc)
{
beginFill(_parent._parent._parent.c_highlight3d);
lineStyle();
moveTo(x,y);
lineTo(x + w,y);
lineTo(x + w,y + h);
lineTo(x,y + h);
lineTo(x,y);
endFill();
}
x += 1;
y += 1;
w -= 1;
h -= 1;
this.buttonG.createEmptyMovieClip("shadow_mc",1002);
with(this.buttonG.shadow_mc)
{
beginFill(_parent._parent._parent.c_shadow);
lineStyle();
moveTo(x,y);
lineTo(x + w,y);
lineTo(x + w,y + h);
lineTo(x,y + h);
lineTo(x,y);
endFill();
}
w -= 1;
h -= 1;
this.buttonG.createEmptyMovieClip("highlight_mc",1003);
with(this.buttonG.highlight_mc)
{
beginFill(_parent._parent._parent.c_highlight);
lineStyle();
moveTo(x,y);
lineTo(x + w,y);
lineTo(x + w,y + h);
lineTo(x,y + h);
lineTo(x,y);
endFill();
}
x += 1;
y += 1;
w -= 1;
h -= 1;
this.buttonG.createEmptyMovieClip("face_mc",1004);
with(this.buttonG.face_mc)
{
beginFill(_parent._parent._parent.c_face);
lineStyle();
moveTo(x,y);
lineTo(x + w,y);
lineTo(x + w,y + h);
lineTo(x,y + h);
lineTo(x,y);
endFill();
}
}
if(_parent.c_arrowsVisible)
{
this.buttonG.attachMovie("arrow","arrow_mc",1005,{_x:arrowX,_y:arrowY,_rotation:270,_xscale:-100,_yscale:100});
if(!_parent.c_arrowDefaultColor)
{
var tmp = new Color(this.buttonG.arrow_mc);
tmp.setRGB(this._parent.c_arrow);
}
}
break;
case 2:
if(_parent.c_buttonsVisible)
{
this.buttonG.createEmptyMovieClip("shadow_mc",1000);
with(this.buttonG.shadow_mc)
{
beginFill(_parent._parent._parent.c_shadow);
lineStyle();
moveTo(x,y);
lineTo(x + w,y);
lineTo(x + w,y + h);
lineTo(x,y + h);
lineTo(x,y);
endFill();
}
x += 1;
y += 1;
w -= 2;
h -= 2;
this.buttonG.createEmptyMovieClip("face_mc",1004);
with(this.buttonG.face_mc)
{
beginFill(_parent._parent._parent.c_face);
lineStyle();
moveTo(x,y);
lineTo(x + w,y);
lineTo(x + w,y + h);
lineTo(x,y + h);
lineTo(x,y);
endFill();
}
}
if(_parent.c_arrowsVisible)
{
this.buttonG.attachMovie("arrow","arrow_mc",1005,{_x:arrowX,_y:arrowY,_rotation:270,_xscale:-100,_yscale:100});
if(!_parent.c_arrowDefaultColor)
{
var tmp = new Color(this.buttonG.arrow_mc);
tmp.setRGB(this._parent.c_arrow);
}
}
break;
case 3:
if(_parent.c_buttonsVisible)
{
this.buttonG.createEmptyMovieClip("darkshadow_mc",1000);
with(this.buttonG.darkshadow_mc)
{
beginFill(_parent._parent._parent.c_darkshadow);
lineStyle();
moveTo(x,y);
lineTo(x + w,y);
lineTo(x + w,y + h);
lineTo(x,y + h);
lineTo(x,y);
endFill();
}
w -= 1;
h -= 1;
this.buttonG.createEmptyMovieClip("highlight3d_mc",1001);
with(this.buttonG.highlight3d_mc)
{
beginFill(_parent._parent._parent.c_highlight3d);
lineStyle();
moveTo(x,y);
lineTo(x + w,y);
lineTo(x + w,y + h);
lineTo(x,y + h);
lineTo(x,y);
endFill();
}
x += 1;
y += 1;
w -= 1;
h -= 1;
this.buttonG.createEmptyMovieClip("shadow_mc",1002);
with(this.buttonG.shadow_mc)
{
beginFill(_parent._parent._parent.c_shadow);
lineStyle();
moveTo(x,y);
lineTo(x + w,y);
lineTo(x + w,y + h);
lineTo(x,y + h);
lineTo(x,y);
endFill();
}
w -= 1;
h -= 1;
this.buttonG.createEmptyMovieClip("highlight_mc",1003);
with(this.buttonG.highlight_mc)
{
beginFill(_parent._parent._parent.c_highlight);
lineStyle();
moveTo(x,y);
lineTo(x + w,y);
lineTo(x + w,y + h);
lineTo(x,y + h);
lineTo(x,y);
endFill();
}
x += 1;
y += 1;
w -= 1;
h -= 1;
this.buttonG.createEmptyMovieClip("face_mc",1004);
with(this.buttonG.face_mc)
{
beginFill(_parent._parent._parent.c_face);
lineStyle();
moveTo(x,y);
lineTo(x + w,y);
lineTo(x + w,y + h);
lineTo(x,y + h);
lineTo(x,y);
endFill();
}
}
if(_parent.c_arrowsVisible)
{
this.buttonG.attachMovie("arrow","arrow_mc",1005,{_x:arrowX,_y:arrowY,_rotation:270,_xscale:-100,_yscale:100});
if(_parent.c_useDisabledColor)
{
var tmp = new Color(this.buttonG.arrow_mc);
tmp.setRGB(_parent.c_foregroundDisabled);
break;
}
break;
}
}
delete x;
delete y;
delete w;
delete h;
}