Actionscript HJÆPL
Jeg har downloadet et galleri til fri afbenyttelse som jeg rigtig godt kan lide, men når jeg loader den som en ekstern .swf fil ind i min main movie kan jeg ikke få den til at fungere, når jeg klikker på billederne sker der ingenting, og det håber jeg at der er en der kan hjæpe mig med.Her er actionscriptet som den bruger:
--------------------------------------------------------------------
onClipEvent (load) {
this.pics.gotoAndStop(_root.frame_offset++);
bounce = _root.bounce;
speed = _root.speed;
final_width = _root.thumb_x;
final_height = _root.thumb_y;
final_x = this._x;
final_y = this._y;
startx = this._x;
starty = this._y;
}
onClipEvent (enterFrame) {
width = width*bounce+(final_width-this._width)*speed;
this._width += width;
if (Math.abs(final_width-this._width)<1) {
this._width = final_width;
}
height = height*bounce+(final_height-this._height)*speed;
this._height += height;
if (Math.abs(final_height-this._height)<1) {
this._height = final_height;
}
x = x*bounce+(final_x-this._x)*speed;
this._x += x;
if (Math.abs(final_x-this._x)<1) {
this._x = final_x;
}
y = y*bounce+(final_y-this._y)*speed;
this._y += y;
if (Math.abs(final_y-this._y)<1) {
this._y = final_y;
}
this._alpha = _root.alphamin+(100-_root.alphamin)*(this._x-_root.thumb_x)/(_root.big_x-_root.thumb_x);
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_parent._parent.swapDepths(10000);
_parent.swapDepths(10001);
this.swapDepths(10002);
_parent._parent[_root.url].image.final_width = _root.thumb_x;
_parent._parent[_root.url].image.final_height = _root.thumb_y;
_parent._parent[_root.url].image.final_x = _parent._parent[_root.url].image.startx;
_parent._parent[_root.url].image.final_y = _parent._parent[_root.url].image.starty;
_root.url = _parent._name;
final_width = _root.big_x;
final_height = _root.big_y;
final_x = _root.offset_x-_parent._x;
final_y = _root.offset_y-_parent._y;
}
}
-------------------------------------------------------------------
Og her kan i se hvor jeg har hentet filen.
http://www.emanueleferonato.com/2006/08/24/customizable-flash-gallery/
