la consulta es esa:
tengo una galeria de imagenes donde las miniaturas corren hacia la derecha o izquierda segun pasa el raton.
lo que sucede es que las imagenes estan todas en diferentes tamaños y lo que yo quiero es que queden ubicadas sobre el borde inferior, digamos como si el punto de registro estubiera en la parte inferior y al centro.
esto para las imagenes grandes y para las miniaturas lo mismo pero la posicion seria al centro del borde superior para que puedan mantener alineacion ya que son todas de tamaños distintos-(y esto tiene que ser asi)
bueno espero haber sido clara
y muchas gracias por cualquer ayuda!
Código ActionScript :
stop();
pauseTime = 3000;
//incase if you want to add more categories add another keyframe at the end and create one movie
//clip for thumbimage for example you have created sunset add an blank MC named "sunsetthumb_mc"
//in fourth keframe and copy and paste the full codes in keyframe 3 and paste in keyframe 4 and change
//the MC names to "carsthumb_mc" to "naturethumb_mc" etc... and also other variable names respectively.
//added 3 MC as per the categories and making them visible on the click
flowerthumb_mc._visible=true;
//rollover start here//
heading_mc.allCat_mc.flowers_btn.onRollOver=function() {
heading_mc.allCat_mc.rollflo_mc.gotoAndPlay(2);
}
//rollover effect ends//
//!!transition for image start here!!//
import mx.transitions.*;
import mx.transitions.easing.*;
//import mx.transitions.Tween;
//^^creating xml^^//
var slideShow:XML=new XML;
slideShow.ignoreWhite=true;
slideShow.onLoad=function(success){
if(success){
var mc_Menu;
var totalnatureImages =slideShow.firstChild.childNodes[0].childNodes.length;
//trace("Total images: "+totalImages)
//trace(slideShow.firstChild.childNodes[1].childNodes)
////////////////////////
refMenu = function () {
// This positions the menu
var menu_xPos:Number = 0;
//var menu_yPos:Number = 0.5;
var menu_gap:Number = -44; //gap between the thumb images
//validating the "thumbPosition" attribute from xml and saying the thumb image to play upwards
if(thumbPos=="up"){
flowerthumb_mc._x=0//to change thumbmail image position
flowerthumb_mc._y=0;//to change thumbmail image position
bigImage_mc._x=64;//to change white border(bigImage) position
bigImage_mc._y=95;//to change white border(bigImage) position
//validating the "thumbPosition" attribute from xml and saying the thumb image to play downwards
}else if(thumbPos="down"){
flowerthumb_mc._x=0;//to change thumbmail image position
flowerthumb_mc._y=530;//to change thumbmail image position
bigImage_mc._x=64;//to change white border(bigImage) position
bigImage_mc._y=40;//to change white border(bigImage) position
}for (var i = 0; i<totalnatureImages; i++) {
var shownatureDes = slideShow.firstChild.childNodes[0].childNodes[i].childNodes;//assigning description text
var thumbnatureImg = slideShow.firstChild.childNodes[0].childNodes[i].attributes.small;//assigning thumbimages
//var animalImg = slideShow.firstChild.childNodes[1].childNodes[i].attributes.small;
//var menuName = menName.childNodes;
//trace(thumbnatureImg)
mc_Menu = flowerthumb_mc.attachMovie("mBox_mc", "item"+i+"_mc", i, {_x:menu_xPos, _y:menu_yPos});
mc_Menu.ID = i;
loadMovie(thumbnatureImg, mc_Menu.thumb_mc);//to load all the thumb image
loadMovie(slideShow.firstChild.childNodes[0].childNodes[0].attributes.big, bigImage_mc)//to load first image automatically
menu_xPos = menu_xPos+mc_Menu._width+menu_gap;//allowing gap between images
//
mc_Menu.onRollOver = function() {
//nodeVal = this.ID;
//%%comparing the callout position and making it appear accordingly%%//
if(_global.callupPos==true){;
_global.calldownPos=false;
this.aniCall_mc.gotoAndPlay(2);
this.aniCall_mc._x=0;
this.aniCall_mc._y=65.2;
}else if(_global.calldownPos==true){
_global.callupPos=false;
this.aniCall_mc.gotoAndPlay(2);
this.aniCall_mc._x=-31;
this.aniCall_mc._y=-58;
}
//%%comparing the callout position and making it appear accordingly ends here%%//
//var shownatureDes = slideShow.firstChild.childNodes[0].childNodes[nodeVal].childNodes;
this.gotoAndStop(2);
mc_Menu.aniCall_mc.mText_txt.htmlText=shownatureDes;//due to loading problem i am refering description text once again here
};
mc_Menu.onRollOut = function() {
this.gotoAndStop(1);
};
mc_Menu.onRelease = function() {
preloader();
nodeVal = this.ID;
if(pp_mc.imgNo_txt.text>"09"){
pp_mc.imgNo_txt.text=nodeVal;
}else{
pp_mc.imgNo_txt.text="0"+nodeVal+1;
}
pp_mc.imgNo_txt.text=nodeVal+1;
var bignatureImg = slideShow.firstChild.childNodes[0].childNodes[nodeVal].attributes.big;//assigning big image for loading
fadeImageIn();
loadMovie(bignatureImg, bigImage_mc);//loading big images
}
};
}
}
refMenu();//calling the whole functionality here
}
//for thumb scroll//
flowerthumb_mc.onRollOver = panelOver;
function panelOver() {
this.onEnterFrame = scrollPanel;
delete this.onRollOver;
}
var b = stroke.getBounds(_root);
function scrollPanel() {
if (_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.yMax) {
this.onRollOver = panelOver;
delete this.onEnterFrame;
}
if (flowerthumb_mc._x>=5) {
flowerthumb_mc._x = 5;
}
if (flowerthumb_mc._x<=-flowerthumb_mc._width/3.2) {//decrease the value as you add more images
flowerthumb_mc._x = -flowerthumb_mc._width/3.2;
}
var xdist = _xmouse-Stage.width/2;
flowerthumb_mc._x += Math.round(-xdist/15);
}
//for thumb scroll ends here//
slideShow.load("slideshow.xml");Código XML :
<?xml version="1.0" encoding="utf-8"?> <slideShow bigImgXaxis="center" bigImgYaxis="up" thumbXaxis="up" thumbYaxis="up" thumbPosition="down"> <images> <thumbImage small="images/1s.jpg" big="images/1b.jpg"></thumbImage> <thumbImage small="images/2s.jpg" big="images/2b.jpg"></thumbImage> <thumbImage small="images/3s.jpg" big="images/3b.jpg"></thumbImage> <thumbImage small="images/4s.jpg" big="images/4b.jpg"></thumbImage> <thumbImage small="images/5s.jpg" big="images/5b.jpg"></thumbImage> <thumbImage small="images/6s.jpg" big="images/6b.jpg"></thumbImage> <thumbImage small="images/7s.jpg" big="images/7b.jpg"></thumbImage> <thumbImage small="images/8s.jpg" big="images/8b.jpg"></thumbImage> <thumbImage small="images/9s.jpg" big="images/9b.jpg"></thumbImage> <thumbImage small="images/10s.jpg" big="images/10b.jpg"></thumbImage> <thumbImage small="images/11s.jpg" big="images/11b.jpg"></thumbImage> <thumbImage small="images/12s.jpg" big="images/12b.jpg"></thumbImage> <thumbImage small="images/13s.jpg" big="images/13b.jpg"></thumbImage> <thumbImage small="images/14s.jpg" big="images/14b.jpg"></thumbImage> <thumbImage small="images/15s.jpg" big="images/15b.jpg"></thumbImage> </images> </slideShow>
