re: Genin
Sziasztok, szóval itt az actionscriptje:
// TN2Gallery is using gs.TweenLite class for all tweening internally
// It is documented at http://blog.greensock.com/tweenliteas2/
import gs.TweenLite;
// custom gallery grid appereance
tn2ctrls.gridHandler = function(eo)
{
// hide bg and buttons
eo.bg._visible = false;
eo.next._visible = false;
eo.prev._visible = false;
galThumbs = eo.mcs;
// create scaling fx for each gallery clip
for ( var i = 0; i < galThumbs.length; i++ ){
gs.TweenLite.from(galThumbs[i], 0.4, {
delay:(galThumbs.length-i-1)*0.08,
_xscale:1,
_yscale:1,
ease:mx.transitions.easing.Strong.easeOut,
onComplete:onGalInit,
onCompleteParams:[eo.bg,eo.next,eo.prev]
});
galThumbs[i].bg.onRollOver = onGalleryThumbOver;
galThumbs[i].bg.onRollOut = onGalleryThumbOut;
}
}
function onGalInit( bg, next, prev )
{
// show background and buttons
bg._visible = true;
next._visible = true;
prev._visible = true;
}
// when mouse is over gallery button, dim other gallery buttons
function onGalleryThumbOver()
{
for ( var i = 0; i < galThumbs.length; i++ ){
// exclude gallery button where mouse is over
if ( galThumbs[ i ] == this._parent ) continue;
gs.TweenLite.to(galThumbs[i].cover, 0.6, {
_alpha:80,
ease:mx.transitions.easing.Strong.easeOut
});
}
}
// when mouse is out of gallery button area, display all normally
function onGalleryThumbOut()
{
for ( var i = 0; i < galThumbs.length; i++ ){
gs.TweenLite.to(galThumbs[i].cover, 0.8, {
_alpha:0,
ease:mx.transitions.easing.Strong.easeOut
});
}
}
//
// position of imgInfo should have imager component as reference
tn2ctrls.definePosition( "imgInfo", {
callback:onImageInfoPosition
});
// inside function, "this" will reffer to imgInfo movieclip
function onImageInfoPosition( init:Boolean )
{
// resize imgInfo background to fit the image
this.bg._width = tn2.TN2Gallery.imager.current._width;
this.bg._height = 22;
this.title_txt._width = this.bgd._width;
// create mask moviclip (to avoid title text overlaping image border)
var mask:MovieClip = this._parent.attachMovie( "TN2_imgInfo_bg", "imgInfoMask", 2008 );
mask._x = this._x;
mask._y = this._y;
mask._width = this.bg._width;
mask._height = this.bg._height;
this.setMask( this._parent.imgInfoMask );
// reset previous tweens in case that user selects another image while tween is lasting
gs.TweenLite.killTweensOf( this );
// tween alpha and y with delay so that main image transition is finished
if ( init ) gs.TweenLite.from( this, 0.5, {delay:0.8,_y:this._y+22,_alpha:0,ease:mx.transitions.easing.Strong.easeOut});
}
tn2ctrls.definePosition( "gallery", {
ref:tnailer,
horizontal:"left",
vertical:"top",
x: -80,
y: 8
});
tn2ctrls.definePosition( "tags", {
ref:tnailer,
horizontal:"left",
vertical:"top",
x: -80,
y: 8
});
tn2ctrls.definePosition( "slideshow", {
ref:tnailer,
horizontal:"left",
vertical:"top",
x: -54,
y: 8
});
tn2ctrls.definePosition( "timer", {
ref:timager,
horizontal:"left",
vertical:"bottom",
x: 3,
y: -28
});
nem tudom ezt ki látja át:)
ezzel akarok beágyazni:
galery_button.onRelease = function() {
mcLoader.loadClip("gallery.swf",myLoader);
stick("about_mc");
}}