Llevo todo el día intentando cambiar (con mi nulo conocimiento de actionscript) unos pequeños detalles en una galería. La galería es la numero 175 de flashmo.com.
http://www.flashmo.com/preview/flashmo_175_photo_gallery
La barra de thumbnails debería tener solo una columna, y el tamaño de las miniaturas debería ajustarse a la anchura del área del thumbnail. Otra solución sería que pudiera definir un tamaño para los thumbnails.
También estaría bien que cuando se pase el ratón por encima del thumbnail apareciese el titulo de la foto (en hover box).

aqui os dejo el código:

codigo escribió:

// Copyright © flashmo.com
// Developed by Min Thu

// Tweener
// http://code.google.com/p/tweener/
import caurina.transitions.*;

var folder:String = "photos/";
var i:Number;
var tn:Number = 0;
var current_no:Number = 0;
var no_of_column:Number = 1;
var tween_duration:Number = 0.7;
var total:Number;
var flashmo_xml:XML;
var flashmo_photo_list = new Array();
var flashmo_pic:MovieClip = new MovieClip();
var thumbnail_group:MovieClip = new MovieClip();

this.addChild(flashmo_pic);
this.addChild(thumbnail_group);

flashmo_pic.x = flashmo_photo_area.x;
flashmo_pic.y = flashmo_photo_area.y;
flashmo_pic.mask = flashmo_photo_area;

thumbnail_group.x = flashmo_thumbnail_area.x;
thumbnail_group.y = flashmo_thumbnail_area.y;
thumbnail_group.mask = flashmo_thumbnail_area;

flashmo_scrollbar.visible = false;
thumbnail_info.text = "";
loading_info.text = "";
photo_title.text = "";
photo_description.text = "";

function load_gallery(xml_file:String):void
{
var xml_loader:URLLoader = new URLLoader();
xml_loader.load( new URLRequest( xml_file ) );
xml_loader.addEventListener(Event.COMPLETE, create_thumbnail);
}

function create_thumbnail(e:Event):void
{
flashmo_xml = new XML(e.target.data);
total = flashmo_xml.photo.length();
for( i = 0; i < total; i++ )
{
flashmo_photo_list.push( {
thumbnail: flashmo_xml.photo[i].thumbnail.toString(),
filename: flashmo_xml.photo[i].filename.toString(),
title: flashmo_xml.photo[i].title.toString(),
description: flashmo_xml.photo[i].description.toString()
} );
}
load_photo();
load_tn();
}

function load_photo():void
{
var pic_request:URLRequest = new URLRequest( folder + flashmo_photo_list[current_no].filename );
var pic_loader:Loader = new Loader();
pic_loader.load(pic_request);
pic_loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, on_photo_progress);
pic_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, on_photo_loaded);

photo_title.text = flashmo_photo_list[current_no].title;
photo_description.text = flashmo_photo_list[current_no].description;
flashmo_pic.alpha = 0;
}

function on_photo_progress(e:ProgressEvent):void
{
var percent:Number = Math.round(e.bytesLoaded / e.bytesTotal * 100);
loading_info.text = "Loading... " + percent + "%";
}

function on_photo_loaded(e:Event):void
{
loading_info.text = "";
flashmo_pic.addChild( Bitmap(e.target.content) );
Tweener.addTween( flashmo_pic, { alpha: 1, time: tween_duration, transition: "linear" } );
}

function load_tn():void
{
var pic_request:URLRequest = new URLRequest( folder + flashmo_photo_list[tn].thumbnail );
var pic_loader:Loader = new Loader();
pic_loader.load(pic_request);
pic_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, on_thumbnail_loaded);
tn++;
thumbnail_info.text = "loading thumbnail " + tn + " of " + total;
}

function on_thumbnail_loaded(e:Event):void
{
if( tn < total )
{
load_tn();
}
else
{
flashmo_scrollbar.visible = true;
flashmo_scrollbar.scrolling("thumbnail_group", "flashmo_thumbnail_area", 0.25);
thumbnail_info.text = "";
}

var flashmo_bm:Bitmap = new Bitmap();
var flashmo_mc:MovieClip = new MovieClip();

flashmo_bm = Bitmap(e.target.content);
flashmo_bm.smoothing = true;

var bg_width:Number = flashmo_bm.width + 10;
var bg_height:Number = flashmo_bm.height + 10;

flashmo_mc.addChild(flashmo_bm);
flashmo_mc.name = "flashmo_" + thumbnail_group.numChildren;
flashmo_mc.buttonMode = true;
flashmo_mc.addEventListener( MouseEvent.MOUSE_OVER, tn_over );
flashmo_mc.addEventListener( MouseEvent.MOUSE_OUT, tn_out );
flashmo_mc.addEventListener( MouseEvent.CLICK, tn_click );
flashmo_mc.x = thumbnail_group.numChildren % no_of_column * bg_width;
flashmo_mc.y = Math.floor( thumbnail_group.numChildren / no_of_column ) * bg_height;

thumbnail_group.addChild(flashmo_mc);
}

function tn_over(e:MouseEvent):void
{
var mc:MovieClip = MovieClip(e.target);
var s_no:Number = parseInt(mc.name.slice(8,10));
Tweener.addTween( mc, { alpha: 0.5, time: tween_duration, transition: "easeOut" } );
}

function tn_out(e:MouseEvent):void
{
var mc:MovieClip = MovieClip(e.target);
Tweener.addTween( mc, { alpha: 1, time: tween_duration, transition: "easeIn" } );
}

function tn_click(e:MouseEvent):void
{
var mc:MovieClip = MovieClip(e.target);
var s_no:Number = parseInt(mc.name.slice(8,10));
current_no = s_no;
Tweener.addTween( flashmo_pic, { alpha: 0, time: tween_duration,
transition: "linear", onComplete: unload_photo } );

}

function unload_photo():void
{
flashmo_pic.removeChildAt(0);
load_photo();
}