Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Scroll Buttons For Thumbnail Images



I am trying to figure out how to create a script to make scroll buttons that work to make a strip of thumbnail images to scroll from top to bottom and back up again when the user presses the scroll button.

The vertical strip of thumbnails are buttons that open a larger version a picture on the same page.

So far, that part works great.

But when I try to make the scroll buttons work, they don't do anything.

I used the same scroll buttons to control a text box in another Flash movie, and that worked fine, but when adapted the script for this, it seemed to die.

In the one I am struggling with, I converted the strip of thumbnail buttons to a movie clip, and gave it an instance name, which is also in the script for the frame to make the buttons work, but it seems useless.

I've checked my script for error messages, but there are none.

Also, part of the problem is where to put this script, since each of the buttons has a to have stop action associated w/the larger image.

I'm using Flash MX.

Thanks for any help.



ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 09-29-2004, 06:53 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Revising Scroll Buttons On Thumbnail Photo Gallery
I downloaded an xml gallery setup from FlashDen and need to edit the advance buttons for the thumbnail images. Currently the buttons only advance the thumbnails one at a time. Ideally, I would like them to continue to scroll the thumbnails until rollout. I also would like to add a scrollbar as well, but that's the next stage. I've posed the question to the guy who created it but he doesn't respond back on it. So I've come here for help!

Anyway, here is the code for the back button:



Code:

on (rollOver) {
if (thumb_menu._x>thumb_menu.destX-0.5 && thumb_menu._x<thumb_menu.destX+0.5 && thumb_menu._x < thumb_menu.originX -5) {
thumb_menu.destX = thumb_menu._x+(thumb_menu.thumb_mc._width+_parent.thumbSpacing);
}
}




Now here is the heirarchy for the thumbnail setup for this:
menu_mc is a movieclip that contains the bttnPrev and bttnNext advance buttons along with a group that contains the holder for the thumbnails that are loaded. Within that group is a movieclip called thumb_menu which then contains the movngs are nested.

Hope I have given enough info for help.

Thanks,
Dave

Putting Clickable Thumbnail Buttons Inside Scroll Movieclip
Hey everyone,

I have this problem with my image gallery in Flash MX 2004.
I try to put clickable thumbnails vertically inside a Scroll Movieclip.

When the images are not yet converted to symbol Movieclip, but are just buttons
they work fine. But problem is that my scroll doesn't work of course because this scroll needs to scroll the thumbnails, but before i can do that i have to convert the thumbnails to Movieclip. As soon as i convert them together to Movieclip they stop working but i can scroll now.

Could anyone please please tell me how to make it both work? Thanks so much. I added the .FLA file so please help me out thank you!

FLA file: http://members.lycos.nl/infernalmajesty/gallery.fla

Gallery Images As Buttons With Easing Thumbnail Rollovers
I've seen this done a couple times already, so I guess it's
fairly easy to do.

However, I've tried doing it but to no avail. How do I do it?
Can anyone describe it roughly how to do so?

In case, you are not familiar, I'm referring to image galleries
wherein each gallery image is a button that has a thumbnail rollover which eases into place. How do I create one of them buttons?

Please help anyone? Is there a tutorial for this?

Regards.

Slider To Scroll Thumbnail Mc W/ Buttons Inside...onRollover Text Moves With Slider
I'm using a slider to scroll a movieclip made up of thumbnail images that are buttons. When I put my mouse over each button, I want it the image to change from black and white to color, and for a text description to appear in one fixed location on the main stage. Right now the image change to color is working, and the text appears as well, BUT the text scrolls as well, since it's within the scrolling movieclip. I want the text to appear static at a fixed location of: x=-947 and y=65. HELP!!!

It should look similar to: http://www.ehdd.com

Here's my code:

for my movieclip:
onClipEvent (enterFrame) {
_root.scrollMC._x = -.295*(_root.slider.b);
}

for my slider (set to scroll along "path"):
on (press) {
startDrag(this, false, 4, 270, 802,270);
}
on (release, releaseOutside) {
stopDrag ();
}
onClipEvent (enterFrame) {
a = new Object();
a.y = this._y;
a.x = this._x;
_root.path.globalToLocal (a);
b = int(a.x*2);
}

Scrolling Images With Scroll Buttons
can someone tell me how to or point me to a tutorial to build a navigation bar like the one on: http://nothingrecords.com/index2.html
(at the bottom of the page).

Horizontal Scroll Images With Buttons?
I wish to create an horizontal scroll of five pictures, each one with text attached. I need to do it with buttons rather than those srollers that move when you hover over them. I am uploading a pic also so you can see what I mean. So when button 1 is pressed, image 1 slides into place etc, I need to do all this within a movie clip. Do you know any tutorials about how to do this?

Many thanks

Willing To Pay For Thumbnail Scroll Bar Box
hello:

I have about 85 thumbnails I want in a scroll bar box like you can do with the text but I can figure out how to do it? Let me know what your price is.

[F8] How To Scroll Thumbnail
I load php into flash and I want to scroll my thumb but I don't know how.


Code:
var my_var = new LoadVars();
my_var.onLoad = function(done) {
if (done) {
row = 0;
col = 1;
totalRow = this.numTotal;
totalCol = 1;
initX = 1800;
initY = -800;
gapX = 600;
gapY = 550;
page_txt.text = this.page;
for (var i = 0; i<=this.numTotal; i++) {
posX = initX+(col-1)*gapX;
posY = initY+row*gapY;
createEmptyMovieClip("working", i);
working.createEmptyMovieClip("load_pic"+i, i);
working["load_pic"+i]._xscale = 20;
working["load_pic"+i]._yscale = 20;
working["load_pic"+i].createEmptyMovieClip("pic", i);
working["load_pic"+i].pic.loadMovie(_root.BG.luminaire.my_var["picture"+i]);
working["load_pic"+i].pic._x = posX;
working["load_pic"+i].pic._y = posY;
working["load_pic"+i].thisPage = i;
working["load_pic"+i].onRelease = function() {
product_name_txt.text = _root.BG.luminaire.my_var["product_name"+this.thisPage];
detail_txt.text = _root.BG.luminaire.my_var["detail"+this.thisPage];
large_pic.loadMovie(_root.BG.luminaire.my_var["picture"+this.thisPage]);
dimension.loadMovie(_root.BG.luminaire.my_var["dimension_pic"+this.thisPage]);
};
if (col%totalCol == 0) {
row++;
col = 1;
} else {
col++;
}

product_name_txt.text = this.product_name0;
detail_txt.text = this.detail0;
large_pic.loadMovie(this.picture0);
large_pic._xscale = 80;
large_pic._yscale = 80;
dimension.loadMovie(this.dimension_pic0);
dimension._xscale = 100;
dimension._yscale = 100;
folder_name_txt.text = this.folder_name0;
}
} // end if
};
my_var.load("/show.php", "POST");
I don't know how to scroll it because I don't know which movie clip I have to relate to.How to relate createEmptyMovieClip.

Thumbnail Gallery Scroll Through
Would anyone know how to create a thumbnail gallery that uses only 2 scroll buttons to move through the gallery. Also including the use of actionscript

Thumbnail Gallery In Scroll Bar Box
Hello:

I don't even know if this is possible but this is what I'm looking for. I want to have a Scroll Bar Box that contains numerous thumbnail pictures where the person can click on the thumbnail and display the larger version on the otehr side of frame. Is this possible? I already knwo how to link the thumbnail to another frame, but just not sure on how to get thumbails in a scroll bar box.

Jonathan

Scroll In Thumbnail Menu
I need to make a menu of thumbnails scroll in from the left and stop.
Example of this is at http://www.dmwdesign.com/ go to the flash side then portfolio then corporate id. The thumbnails at the top slide in.
I can't get the menu to stop and I believe I have the wrong script.

The code I have in there is

onClipEvent(enterFrame) {
speed = 3;
this._x += speed;

}
Which moves the clip across the screen but I need it to stop in the middle.
Still new to action script
Please help

XML Thumbnail Scroll Problem
Having a problem with the scroller. My hit left and right are not working properly so the images dont position correctly or scroll.
The fla as well as all the support files are here.
Thanks

David

My Self Made Thumbnail Scroll
i created my own thumbnail scroll ( i had to do it becuase i couldnt figure out how to use the ready made one with loading the thumbnails from an XML):

Code:
function buildStrip() {
for (m; m<total; m++) {
this.createEmptyMovieClip("targetClip"+m, this.getNextHighestDepth());
_root["targetClip"+m]._y = dijPictureHeight*m+150;
_root["targetClip"+m].loadMovie(image[m]);
this.createEmptyMovieClip("BtnClip"+m, this.getNextHighestDepth());
_root["BtnClip"+m]._y = _root["targetClip"+m]._y;
_root["BtnClip"+m].attachMovie("btn", "blue"+m, this.getNextHighestDepth());
}
stripLength = dijPictureHeight*m;

}
i managed to connect the up/down arrows to the thumbnails but i have difficulties whith the dragger . the default place for the dragger is at the top of the scroll but when i repeat the scroll down, each time it will go less and less down and i dont know why?:examp here:
http://www.tamisivan.com/temp/scroll/elite_eng.html

Code:
bottomMoveBtn.onPress = function() {
this.gotoAndStop("down");
this.onEnterFrame = function() {
trace(totalScrolling);
if (_root["targetClip"+(total-1)]._y>434) {
totalScrolling = stripLength-line._height;
scale = totalScrolling/(line._height);
dragger._y += 5/scale;
m = 0;
for (m; m<total; m++) {
_root["targetClip"+m]._y = _root["targetClip"+m]._y-5;
_root["BtnClip"+m]._y = _root["BtnClip"+m]._y-5;
if (_root["targetClip"+m]._y<130) {
//removeMovieClip(_root["BtnClip"+m]);
_root["BtnClip"+m]._x = 300;
}
}
}
};
};
also when i use the dragger to move the thumbnails it jumps....

Code:
dragger.onPress = function() {

this.startDrag(true, 150, 160, 150, 370);
this.onEnterFrame = function() {
m = 0;
totalScrolling = stripLength-line._height;
scale = totalScrolling/(line._height);
l = this._y;
for (m; m<total; m++) {
_root["targetClip"+m]._y = m*dijPictureHeight-(l*scale);
_root["BtnClip"+m]._y = m*dijPictureHeight-(l*scale);
}
};
};
is this could be solved?

Scroll Pane And Thumbnail Gallery
Hi.

I have an example of multiple .jpg loaded in a thumbnail gallery. Each .jpg has his own preloader and when you click on it it shows up at the right.

The thumbnail works just fine when I put the movie clip on the main timeline. When I try to put it inside a Scroll pane doesn't work anymore.

I'm sure this is a stupid error but I can't figure it out! Can anyone help me???


In the .fla file I have both ways (with scroll pane and without it)

* TOP : Scroll Pane with movieclip (doesn't work)
* BOTTOM : Moviclip in main time line (works)


Thanks for any help

Sasa

Gallery Thumbnail Scroll With Easing.
Hello, i have a little problem. I make gallery with thumbnails scrolling. When i test my movie, 1st image of the thumbail appears at the beginning of the mask mc, but when i scroll thumbs to the end, and back again to the beginning, 1st image doesn't appear at the beginning of the mask. To thumb scroll i used Interactive Image Panning tutorial. Plz help me to find better solution. I'd like to add and remove images to the thumb without correcting thumb position every time I add image. I notice that position of the 1st image in the thumbnail is
0 - thumbwidth[i] / 2. Of course i'd like to use easing with scroll. To modify scrolling use thumbMove function and _root.onMouseMove function, or help me make better. Thx anyway

XML PhotoGallery Thumbnail (scroll Vertical)
I used the tutorial from this site (http://www.kirupa.com/developer/mx2004/thumbnails.htm). My question is how to edit the code so that the thumbnails scroll vertical instead of horizontal. Can someone help me?

XML Photogallery Thumbnail Scroll Width
i'm using the XML photo gallery (with vertical thumbnails, instead of horizontal)..and i have an issue that i'm trying to resolve.

whenever i scroll up or down and move off of the thumbnails, the thumbnails continue to scroll. i would like the thumbnails to quit scrolling once my mouse is off of the thumbnail area.

does anyone know how i can go about doing this? thnx!

Scroll Thumbnail Not Wrking Properly
The problem is the scroll isn't working properly.
You will see what I mean if you click here

When I export for flash player 9 instead of 6 I also have a couple of problems.

1) the first image doesn't load.
2) the image loads before the border changes size. (Look at the last image and any of the other images and you will see what I mean)

Here's the code

PHP Code:



var spacing = 10; var thumbspace = 65;     containerMC._alpha = 0; var pArray = new Array(); var tArray = new Array(); var nArray = new Array(); MovieClip.prototype.loadPic = function(pic) {     _root.containerMC._alpha = 0;     this.loadMovie(pArray[pic]);     //tnborder.loadMovie(nArray[pic]);     this._parent.onEnterFrame = function() {         var total = _root.containerMC.getBytesTotal();         var loaded = _root.containerMC.getBytesLoaded();          bar._visible = 1;          per = Math.round((loaded/total)*100);         if (total != 0 && Math.round(loaded/total) == 1 && _root.containerMC._width != 0) {             var w = _root.containerMC._width+spacing, h = _root.containerMC._height+spacing;             _root.border.resizeMe(w, h, pic);             _root.bar._visible = 0;             _root.loadText._visible = 0;             delete this._parent.onEnterFrame;         } else {             _root.bar._width = per;             _root.loadText.text = per;         }     }; }; MovieClip.prototype.resizeMe = function(w, h, pic) {     var speed = 5;     this.onEnterFrame = function() {         this._width += (w-this._width)/speed;         this._height +=(h-this._height)/speed;         picinfo.info.text = tArray[pic];               if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) {         this._width = w;         this._height = h;         containerMC._x = this._x-this._width/2+spacing/2;         containerMC._y = this._y-this._height/2+spacing/2;         containerMC._alpha = 100;         delete this.onEnterFrame;         }     }; }; var gallery_xml = new XML(); gallery_xml.ignoreWhite = true; gallery_xml.onLoad = function(success) {     if (success) {         var gallery = this.firstChild;         for ( var i = 0; i<gallery.childNodes.length; i++) {             tArray.push(gallery.childNodes[i].attributes.title);             pArray.push(gallery.childNodes[i].attributes.source);                          thumbHolder = tnborder.createEmptyMovieClip("thumb"+i, i);                          thumbHolder._x = i*thumbspace;             thumbLoader = thumbHolder.createEmptyMovieClip("thumbnail_image", 0);             thumbLoader.loadMovie(gallery.childNodes[i].attributes.thumbnail);             thumbHolder._index = i;                          //Makes thumb transparent//             thumbHolder.onRollOver = function() {                 this._alpha = 40;                              };             thumbHolder.onRollOut = function() {                 this._alpha = 100;                              };                      //Click to change image//                 thumbHolder.onRelease = function() {                 _root.containerMC.loadPic(this._index);                 _root.picinfo.text = tArray[this._index];             };             //nArray.push(gallery.childNodes[i].attributes.thumbnail);                  }        // load first picture         _root.containerMC.loadpic(0);     } else {         picinfo.info.text= "Error!";              }      }; //containerMC.onEnterFrame = function (firstimage) {     //if (loaded == total) {         //_root.containerMC.loadpic(0);         //_root.containerMC._alpha = 0;     //} // } //Set mask tnborder.setMask(mask_mc); //makes thumb scroll tnborder.onRollOver = panelOver; function panelOver() {     this.onEnterFrame = scrollPanel;     delete this.onRollOver; } var b = Bound_MC.getBounds(_root); function scrollPanel() {     if (_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.yMax) {         this.onRollOver = panelOver;         delete this.onEnterFrame;      }          //if (tnborder._x>=0) {         //tnborder._x = 0;     //}          if (_root.tnborder._x<=_root.mask_mc._width-_root.tnborder._width) {         _root.tnborder._x = _root.mask_mc._width-_root.tnborder._width;     } var xdist = _xmouse-(_root.Bound_MC._width); _root.tnborder._x +=-xdist/50; }           gallery_xml.load("gallery.xml"); 





Thanks
vxd

Thumbnail With Images.
Ill try to explain what i have in mind.

I'am working on a site for my little baby, so i have a question to all of you flashers..

I want to ad some photo's to the website, the idea will be like this.

When you press the button photo book, you will go to A frame there you will see little windows with images inside, when you press the little window (it's also a button) you will go to another frame where you see the photo bigger with some text on the left side. If you press the back button you will be transported to the frame where all the little images are. I dont want a slide show.

and is there a way to load the images from a server?? I dont know much about action scripts

Please can some one help me I'm stuck on it.

Thank you all.

Thumbnail Images
I was wondering if anybody knows of a tutorial that teaches you how to create a tumbnail gallery.

What i would like is to have a group of thubnail images say on the right hand side of the stage. When you click on the thumbnail image the image fades in bigger in the center of the stage.

Replies Appreciated.
Cheers!

Thumbnail Images
I was wondering if anybody knows of a tutorial that teaches you how to create a tumbnail gallery.

What i would like is to have a group of thubnail images say on the right hand side of the stage. When you click on the thumbnail image the image fades in bigger in the center of the stage.

Replies Appreciated.
Cheers!

Thumbnail Navigation W/ Scroll Pane Question
I am using a Scroll Pane in Flash MX (horizontal scroll only) and I want a MC to reflect the movement of the Scroll Bar when it is moved.

What I have is a large map within the Scroll Pane and above is a thumbnail version. Over this thumbnail version I want a box that moves to show where on the large map you are.

Can this be done using the Scroll Pane?

Thanks!

Text Scroll And Thumbnail Album Question
Hey guys, im building a website for a recording studio and was just after a solution to 2 problems.

1. I have been looking for a simple, clean thumnail photo viewer/image carousel. I have found a few decent ones but have come across a problem with them.

I am loading these external files within a placeholder on the main index page with the following command:

on (release){
loadMovie("tour.swf", _root.placeholder_main);
}

Though these templates seem to work fine by themselves, they don't work when loaded as an external .swf

2. I am also after a text scroller, basically to do the the same thing as the standard .html scroll bars in Internet Explorer, Firefox etc.

I'm still a bit of a newbie when it comes to these simple things so any help would be greatly appreciated!

Cheers,
Maurice

Auto Scroll Thumbnail Menu For Gallery
Could someone point me to a tutorial that shows how to make this auto scroll thumbnail menu for a gallery:

http://www.phpjabbers.com/flash-gallery/index.php

This uses no scrollbar, and moves the thumbnails faster left and right the closer the mouse gets to the left and right edges - without ever clicking on anything.

It has a slightly different feel from the Kirupa tutorial on thumbnails here:

http://www.kirupa.com/developer/mx2004/thumbnails.htm


The difference seems to be that the kirupa method depends on mouse entering a certain zone before the thumbs move left and right. Whereas the first one seems to have a push and glide effect over the scrolling thumbs (without ever having to touch a thumbnail).

Thanks.

XML Thumbnail Photo Gallery - I Want To Scroll Vertically
I completed kirupa's handy little thumbnail photogallery tutorial. I would like to scroll vertically and I realize I need to change the x and y values at different spots and I was able to make it face vertically and I can get it to scroll up but not back down. Any help would be appreciated. here is the code

function thumbNailScroller() {
thumbnail code!
//this.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 5;
tscroller.onEnterFrame = function() {
if ((_root._ymouse>=thumbnail_mc._y) && (_root._ymouse<=thumbnail_mc._y+thumbnail_mc._heig ht)) {
if ((_root._xmouse>=(hit_right._x-40)) && (thumbnail_mc.hitTest(hit_right))) {
thumbnail_mc._y -= scroll_speed;
} else if ((_root._xmouse<=40) && (thumbnail_mc.hitTest(hit_left))) {
thumbnail_mc._y += scroll_speed;
}
} else {
delete tscroller.onEnterFrame;
}
};
}

function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._y = hit_left._y+(eval("thumbnail_mc.t"+k)._height+2)*k ;
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};

Reversing Scroll Direction In Thumbnail Gallery?
example:

http://www.epic-pc.com/SRD/collection.swf

I am working on this gallery and right now when you move the mouse up over the thumbnails, the images go up and when moving the mouse down, the images go down making it hard for the user to find the thumb they are looking for.

All I need to do is switch it so that moving the mouse down makes the images scroll upward and moving the mouse up makes the images go downward. Any Suggestions? Here is the as:


Code:
spacing = 10;
containerMC._alpha = 0;
pArray = new Array();
pictArray = new Array();
captiont=new Array();
MovieClip.prototype.loadPic = function(pic) {
this._alpha = 0;
this.loadMovie(pArray[pic]);
caption_txt.text=captiont[pic];
this._parent.onEnterFrame = function() {
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
bar._visible = 1;
per = Math.round((l/t)*100);
if (t != 0 && Math.round(l/t) == 1 && containerMC._width != 0) {
var w = containerMC._width+spacing, h = containerMC._height+spacing;
border.resizeMe(w, h);
bar._visible = 0;
delete this.onEnterFrame;
} else {
bar._width = per;
}
};
};
MovieClip.prototype.resizeMe = function(w, h, pic) {
var speed = 3;
this.onEnterFrame = function() {
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) {
this._width = w;
this._height = h;
containerMC._x = this._x-this._width/2+spacing/2;
containerMC._y = this._y-this._height/2+spacing/2;
containerMC._alpha = 100;
delete this.onEnterFrame;
}
};
};
my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success) {
if (success) {
for (var i = 0; i<this.firstChild.childNodes.length; i++) {
pictArray.push(this.firstChild.childNodes[i].attributes.thumb);
pArray.push(this.firstChild.childNodes[i].attributes.image);
captiont.push(this.firstChild.childNodes[i].attributes.captiontx);
}
}
delay = setInterval(makeMenu, 100);
};
my_xml.load("newgallery.xml");
var menu = this.createEmptyMovieClip("menu_tot", 99);
menu.setMask(mask);
menu._x = mask._x;
menu._y = mask._y;
var sub_menu = menu.createEmptyMovieClip("menu", 100);
var p = 0;
var q = 0;
var loadper = 0;
function makeMenu() {
clearInterval(delay);
var item = sub_menu.createEmptyMovieClip("pic"+q, q);
item.loadMovie(pictArray[p]);
var temp = _parent.createEmptyMovieClip("tmp", 9999+q);
temp.onEnterFrame = function() {
var tot = item.getBytesTotal();
var loa = item.getBytesLoaded();
var per = Math.round(((loa/tot)*100)/(pictArray.length*2));
loadBar._xscale = loadper+per;
if (tot == loa && tot>4) {
item.id = p;
loadper += per;
if (q>0) {
item._y = sub_menu["pic"+(q-1)]._y+sub_menu["pic"+(q-1)]._height+10;
} else {
item._y = 0;
}
item.onRelease = function() {
containerMC.loadPic(this.id);
};
nextItem();
delete this.onEnterFrame;
}
};
}
var amount = pictArray.length-1;
function nextItem() {
if (q<((pictArray.length*2)-1)) {
q++;
if (p<(pictArray.length-1)) {
p++;
makeMenu();
} else {
p = 0;
makeMenu();
}
} else {
activateMenu();
}
}
var center = mask._height/2;
var speed = .05;
function activateMenu() {
containerMC.loadPic(0);
var turnPoint = mask_mc._y;
loadBar._visible = 0;
menu.onEnterFrame = function() {
var distance = mask._ymouse-center;
if (mask.hitTest(_root._xmouse, _root._ymouse)) {
this._y += (distance*speed);
if (this._y<mask._y-sub_menu._height/2) {
this._y = mask._y;
}
if (this._y>mask._y) {
this._y = mask._y-sub_menu._height/2;
}
if (this._y<turnPoint-d) {
this._y += d;
}
if (this._y>turnPoint) {
this._y -= d;
}
} else {
//3 is the constant speed, change it to your needs
this._y += -1;
}

};
}
Thank you very much!

[F8] Pop Up From Flv Thumbnail Like Getty Images
I need to mimic the pop up window linked from a flv thumbnail as in Getty images http://********tyimages.com/Footage/FootageRR.aspx, I have the thumbnail working fine it can link to another page with an xml file (I am using the SWFObject as well), its how to size the new window, cant get a javascript to work with the xml. (the site will run dynamically). Help please

XML Menu With Thumbnail Images
Hello all,

I am trying to create a dynamic menu for a video player. Much like the one found here (MTV OverDrive. )Obviously this is a Flash site and I can only assume the video list is being generated via XML. I am trying to accomplish the same thing, only I am not using FCS.

I just want to create the buttons dynamically with thumbnail images and text via XML, and in turn load the video based on a button click. I have the video part working fine, using a video object, I just need to know how to create the buttons WITH THUMBS from an XML file. I can figure out how to load the video once the button is clicked. The problem is the menu itself and loading the different thumbnail with the button.

I am sure it has something to do with "attachMovie, DuplicateMovie, or CreateEmptyMovieClip" but I am not sure how to do this with XML.

I really want to stay away from using the pre-built components and want to code this myself so a list component is out of the question.

I have search for many hours now and can not find anything that is like what I am looking for yet. So any help pointing me in the right direction would be much appreciated.

From what I can gather it has something to do with creating what the button is going to look like (mainly the Background for mouse on and over states) and save it off as a MC then giving it a linkage ID. Within that MC I would think there would be another MC to hold the Thumbnail image with its own linkage ID and another MC that has a named dynamic text filed with it own linkage ID. Am I total off base here?

Thanks

Help With Scrolling Thumbnail Images
Hi
I'm trying to make something in flash mx 2004. Basicaly it's concept contain three things.
First part is where I place external swf files, second part is thumbnail images, and third part is navigation buttons.

Main problem is how to list those thumbnail images? I have 81 thumbnail images that I need to put in a movie clip. Since all of the images can't be placed on the screen in one time, I need to know the way how to list them using scroll?

Another problem is when I use navigation buttons, current image that is viewed have to have some kind of marking, so viewer could know what image he is viewing.

Thanks in advance.

Laki

Trying To Make Thumbnail Scroll In Relation To The _xmouse Location
I'm trying to make a group of thumbs scroll within a small window, in the opposite direction of the mouse. I've seen this done a million times, but I'm not the best with motion math. any help would be greatly appreciated.

[CS3/AS2] Thumbnail Panel To Auto Scroll Vertical On Mouse Over
I trying to make a gallery thumbnail panel to auto scroll vertical, I did see the great video on the site gotoandlearn called "Scrolling Thumbnail Panel" and base most of my code on it. But this one scroll horizontal on mouse over and is base on Root X of the mouse position.

My scroll movieclip is deep into a other one and I am trying to make it scroll vertical so far its not really scrolling well see the include fla file. :S

This is the code I am trying to use:

Code:
stop();
hiddengalbuttons_mc.onRollOver = panelOver;
function panelOver() {
this.onEnterFrame = scrollPanel;
this._parent.gall_but.gotoAndPlay("s1");
delete this.onRollOver;
}
var b = stroke.getBounds(this);

function scrollPanel() {
if (_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.yMax) {
this.onRollOver = panelOver;
this._parent.gall_but.gotoAndPlay("s2");
delete this.onEnterFrame;
}
if (this._parent.gall_but.butt_gall.photo._y<=0) {
this._parent.gall_but.butt_gall.photo._y = 0;
}
if (this._parent.gall_but.butt_gall.photo._y>=-411.0) {
this._parent.gall_but.butt_gall.photo._y = -411.0;
}
var ydist = _ymouse-5;

this._parent.gall_but.butt_gall.photo._y += Math.round(-ydist/7);
}


hiddengalbuttons_mc is use to make the thumbnail panel slide in and out on mouse over that all is working so far.
But like I only just learn this mouse related actionscript I am kind of clueless what I am doing wrong

Please please help!

Also is there a way to make this more dynamic?

Links Are Carrying Through Image/Scroll Thumbnail Bar Problem.
Oh wow, have I got some problems going on here.
Ok first of all I have my page set up like this... Well Ill just give the rundown of the focused problem...
I designed images that looked like old torn paper that I have stacked in my stage to imitate a state of exactly that paper.. And I have them set up with links from the right that brings a particualr one forward with information and links. My problem is that when these pages are in behind others, the links are remaining clickable. Anyone know a code to nix this links behavior once it has been sent back a level.


Also, in my scroll bar I dont know WHAT the problem is with this thing I had done this over and over and over again and I cannot seem to get it to work... haha

I ahve this current code set up for the file. (its a vertical on mouse over movement scrolling thumbnail bar).

panel.onRollOver = panelOver;

function panelOver() {
this.onEnterFrame = scrollPanel;
delete this.onRollOver;
}

var b = stroke.getBounds (_root);

function scrollPanel() {
if (_ymouse<b.yMin || _ymouse>b.yMax || _xmouse<b.xMin || _xmouse>b.xMax) {
this.onRollOver = panelOver;
delete this.onEnterFrame;
}

if(panel._y >= 110) {
panel._y = 110;
}

if(panel._y <= -245) {
panel._y = -245;
}

var ydist = _ymouse - 425;

panel._y += -ydist / 7;
}



Needless to say it acts as though my limits are incorrect, but i have double checked them till my eyes hurt. And it just wont scroll up far enough and scrolls to far down, with jitters in each far direction. My stage area is 850. And I have roughly a 517 size (height: its a vertical scroller) mask.

If anyone has any idea what may be going on in these two problems I would be highly appreciative....

I truly hope i was clear enough. If there is some clearing up need with my explanation, Please let me know.

Thank you.
RECasper

Flash Image Gallery Thumbnail Scroll Sometimes Works...
this is probably an easy fix but i am at odds... I built my gallery and import it a parent page (foo)... Sometimes the scroll of thumbnail scroll works... it is choppy.... Sometimes does not work at all.... When i view the movie outside of foo - it works beautifully... Any ideas how to troubleshoot this - i took it word for word from the tutorial...

Thanks!

Modifying Lee's Auto Scroll Thumbnail Panel Tutorial
In Lee's tutorial, there is a left and right end point to the scroll panel where the scroll effects stops.

Is there a way to modify this tutorial so that the thumbnail buttons would appear to continuously scroll by repeating? Seems that with a panoramic photo, this could give the appearance of a continous 360 degree scroll (without all the lens-bending effects).

Thanks,
Brandon

Creating Sheets Of Thumbnail Images?
I've a directory of images that I'd like to make a thumbnail sheet for. Preferably, some automated script that creates the page regardless of how many images the directory has.

This is a long shot, but is there some technique to allow this? (Reminds me of the time I was asking people back in the late 80's if there's something that can translate Apple software into IBM compatible programs LOL)

Here's what I'm doing right now, and it works great! But thing is I have to manually edit the code any time an image is added or removed. If there's a better way of doing this that's completely different than what I have started, I'm all ears! Even if it's just the name of a concept, and I'll go research it on my own.

Thanks!
Liam

this.createEmptyMovieClip("mc1", -101);
this.mc1.createEmptyMovieClip("imgHolder_mc1", -101);
this.mc1.imgHolder_mc1.loadMovie("images/creation/animals/Aquatic004.jpg", "ai1");
this.mc1.imgHolder_mc1._x = 196.2;
this.mc1.imgHolder_mc1._y = 40.0;
this.mc1.imgHolder_mc1._xscale = 20;
this.mc1.imgHolder_mc1._yscale = 20;
this.mc1.onPress = function() {
_root.gotoAndStop(2);
_global.mainimage = "images/creation/animals/Aquatic004.jpg";
}
//
this.createEmptyMovieClip("mc2", -102);
this.mc2.createEmptyMovieClip("imgHolder_mc2", -102);
this.mc2.imgHolder_mc2.loadMovie("images/creation/animals/Bird014.jpg", "ai2");
this.mc2.imgHolder_mc2._x = 196.2;
this.mc2.imgHolder_mc2._y = 130.0;
this.mc2.imgHolder_mc2._xscale = 20;
this.mc2.imgHolder_mc2._yscale = 20;
this.mc2.onPress = function() {
_root.gotoAndStop(2);
_global.mainimage = "images/creation/animals/Bird014.jpg";
}
//
this.createEmptyMovieClip("mc3", -103);
this.mc3.createEmptyMovieClip("imgHolder_mc3", -103);
this.mc3.imgHolder_mc3.loadMovie("images/creation/animals/Bird069.jpg", "ai3");
this.mc3.imgHolder_mc3._x = 196.2;
this.mc3.imgHolder_mc3._y = 230.0;
this.mc3.imgHolder_mc3._xscale = 20;
this.mc3.imgHolder_mc3._yscale = 20;
this.mc3.onPress = function() {
_root.gotoAndStop(2);
_global.mainimage = "images/creation/animals/Bird069.jpg";
}

etc...

Creating Sheets Of Thumbnail Images?
I've a directory of images that I'd like to make a thumbnail sheet for. Preferably, some automated script that creates the page regardless of how many images the directory has.

This is a long shot, but is there some technique to allow this? (Reminds me of the time I was asking people back in the late 80's if there's something that can translate Apple software into IBM compatible programs LOL)

Here's what I'm doing right now, and it works great! But thing is I have to manually edit the code any time an image is added or removed. If there's a better way of doing this that's completely different than what I have started, I'm all ears! Even if it's just the name of a concept, and I'll go research it on my own.

Thanks!
Liam

this.createEmptyMovieClip("mc1", -101);
this.mc1.createEmptyMovieClip("imgHolder_mc1", -101);
this.mc1.imgHolder_mc1.loadMovie("images/creation/animals/Aquatic004.jpg", "ai1");
this.mc1.imgHolder_mc1._x = 196.2;
this.mc1.imgHolder_mc1._y = 40.0;
this.mc1.imgHolder_mc1._xscale = 20;
this.mc1.imgHolder_mc1._yscale = 20;
this.mc1.onPress = function() {
_root.gotoAndStop(2);
_global.mainimage = "images/creation/animals/Aquatic004.jpg";
}
//
this.createEmptyMovieClip("mc2", -102);
this.mc2.createEmptyMovieClip("imgHolder_mc2", -102);
this.mc2.imgHolder_mc2.loadMovie("images/creation/animals/Bird014.jpg", "ai2");
this.mc2.imgHolder_mc2._x = 196.2;
this.mc2.imgHolder_mc2._y = 130.0;
this.mc2.imgHolder_mc2._xscale = 20;
this.mc2.imgHolder_mc2._yscale = 20;
this.mc2.onPress = function() {
_root.gotoAndStop(2);
_global.mainimage = "images/creation/animals/Bird014.jpg";
}
//
this.createEmptyMovieClip("mc3", -103);
this.mc3.createEmptyMovieClip("imgHolder_mc3", -103);
this.mc3.imgHolder_mc3.loadMovie("images/creation/animals/Bird069.jpg", "ai3");
this.mc3.imgHolder_mc3._x = 196.2;
this.mc3.imgHolder_mc3._y = 230.0;
this.mc3.imgHolder_mc3._xscale = 20;
this.mc3.imgHolder_mc3._yscale = 20;
this.mc3.onPress = function() {
_root.gotoAndStop(2);
_global.mainimage = "images/creation/animals/Bird069.jpg";
}

etc...

Creating Sheets Of Thumbnail Images?
I've a directory of images that I'd like to make a thumbnail sheet for. Preferably, some automated script that creates the page regardless of how many images the directory has.

This is a long shot, but is there some technique to allow this? (Reminds me of the time I was asking people back in the late 80's if there's something that can translate Apple software into IBM compatible programs LOL)

Here's what I'm doing right now, and it works great! But thing is I have to manually edit the code any time an image is added or removed. If there's a better way of doing this that's completely different than what I have started, I'm all ears! Even if it's just the name of a concept, and I'll go research it on my own.

Thanks!
Liam

this.createEmptyMovieClip("mc1", -101);
this.mc1.createEmptyMovieClip("imgHolder_mc1", -101);
this.mc1.imgHolder_mc1.loadMovie("images/creation/animals/Aquatic004.jpg", "ai1");
this.mc1.imgHolder_mc1._x = 196.2;
this.mc1.imgHolder_mc1._y = 40.0;
this.mc1.imgHolder_mc1._xscale = 20;
this.mc1.imgHolder_mc1._yscale = 20;
this.mc1.onPress = function() {
_root.gotoAndStop(2);
_global.mainimage = "images/creation/animals/Aquatic004.jpg";
}
//
this.createEmptyMovieClip("mc2", -102);
this.mc2.createEmptyMovieClip("imgHolder_mc2", -102);
this.mc2.imgHolder_mc2.loadMovie("images/creation/animals/Bird014.jpg", "ai2");
this.mc2.imgHolder_mc2._x = 196.2;
this.mc2.imgHolder_mc2._y = 130.0;
this.mc2.imgHolder_mc2._xscale = 20;
this.mc2.imgHolder_mc2._yscale = 20;
this.mc2.onPress = function() {
_root.gotoAndStop(2);
_global.mainimage = "images/creation/animals/Bird014.jpg";
}
//
this.createEmptyMovieClip("mc3", -103);
this.mc3.createEmptyMovieClip("imgHolder_mc3", -103);
this.mc3.imgHolder_mc3.loadMovie("images/creation/animals/Bird069.jpg", "ai3");
this.mc3.imgHolder_mc3._x = 196.2;
this.mc3.imgHolder_mc3._y = 230.0;
this.mc3.imgHolder_mc3._xscale = 20;
this.mc3.imgHolder_mc3._yscale = 20;
this.mc3.onPress = function() {
_root.gotoAndStop(2);
_global.mainimage = "images/creation/animals/Bird069.jpg";
}

etc...

Dynamically Building Thumbnail Images
Hi there

Can anyone tell me how I go about building a dynamic thumbnail image gallery. I can get the images into flash at runtime no problem but then i need to resize them and place them in a thumbnail format.

I have tried dynamically creating new movieclips and filling them with the images that i import which works but cannot then resize and space out the movieclips/images so it looks like a gallery of images

i am currently banging my head against the wall with frustration

Can anyone help me. Thanks in advance

How Do I Add An External Preloader To My Thumbnail Images?
I made myself a nice Flash photo gallery template with dynamically loading JPEG images and thumbnails.

http://www.toprival.com/temp/flashga...o_gallery.html

I have an external preloader set up for the large images (the kind that uses listeners), but I was wondering how to go about adding a simple spinner preloader to the thumbnails themselves. Since each thumbnail's MC container has a different instance name, it seems like I would have to have a separate chunk of code for each thumbnail's preloader. Is there any way I can just code the thumbnail preloader once? Does the thumbnail preloader even need to be external? Remember, the thumbnails are being loaded dynamically.

This is in Flash 8. I've posted the Flash file and preloaders here, and the photos and thumbnail images can be downloaded from here if anybody wants to fiddle with it.

[F8] Images Won't Load From Thumbnail Scroller
I created a Thumbnail Scroller based on a tutorial I found on the Net and have been trying to figure out how to load external images with it. Images load fine when I use dummy test buttons outside the scroller (as can be seen in my attachment)

Could someone take a look at my file and tell me what I'm missing. I've read it may have to do with "targeting", but I'm not advanced enough to figure it out on my own.

Thanks.

(I've degradated the images to make the attachment a smaller file size)

Thumbnail Gallery W/larger Images?
Hi, I'm new to this forum and obviously, since I'm posting in this thread, I'm a newb to flash. Are there any good tutorials or can someone explain how to create a gallery with smaller (about 70 x 70px) images that load a larger image when you click them? This is pretty much exactly what I'm looking for: Bob Tyrrell's flash image gallery here.

Thumbnail Wall (external Images)
I've found several tutorials and scripts with galleries but nothing about what I'm trying to do.
The closest thing I saw was Biochimistu's Photo Gallery that after a few teaks it became what I was aiming for: a thumbnail grid with links to other websites, you can see it here.

The problem started when I tried to integrate it in my site... after some research I found it was due to different AS versions - gallery AS3 and my site's AS2.

I started looking at how to make it myself: I don't need the fancy effects, just plain images with links. I could do this quiet easily if I just integrated everything in the flv but I'm trying to make it more flexible and dynamic where I can just add a few lines to the xml file and get another image.

After this long winded explanation I'll say that I found several examples of scroll menus that give me the scripts to make it work but nothing about grids

Does anyone used dynamic grids as containers in some project? I'm almost to the point of just giving up and making an half assed flv

Load Dynamically Images For Thumbnail
Hi, I am trying to create a thumbnail and load images located in a 2D array filled with a XML.

pArray[x][5]= preview image

Here is a sample of the XML

Code:
<project id="0">
<name><![CDATA[Test1]]></name>
<date><![CDATA[01/01/01]]></date>
<technologie><![CDATA[AS2, AS3, Kek Chose]]></technologie>
<img><![CDATA[behappyfarmer_img.jpg]]></img>
<preview><![CDATA[/behappyfarmer_preview.jpg]]></preview>
<description><![CDATA[Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque sed lectus imperdiet felis tempus aliquet. Suspendisse sem nulla, faucibus eu, eleifend at, scelerisque vitae, elit. Donec luctus dui vel urna. Integer at diam. Donec et risus. Praesent vestibulum pede ut urna. In facilisis tempus magna. Cras quis dolor sed dui pharetra blandit. Pellentesque vel arcu a nisi consectetuer iaculis. Ut.]]></description>
</project>
here is my XMLLoader Class

Code:
import mx.utils.Delegate;

class com.cc.XMLLoader
{
private var _xml:XML;
private var xml_result:Array;
public var xml_loaded:Boolean = false;

public function XMLLoader(path:String){
this._xml = new XML();
this._xml.ignoreWhite = true;
this._xml.load(path);
this._xml.onLoad = Delegate.create(this, dataLoaded);
}

private function dataLoaded(sucess:Boolean):Void {
if (sucess) {
createArray();
}
}

private function createArray():Void {
var xmlroot:XMLNode = this._xml.firstChild;
var i:Number;
var j:Number;

this.xml_result = new Array();
for (i = 0; i < xmlroot.childNodes.length; i++) {
xml_result[i] = new Array();
this.xml_result[i][0] = xmlroot.childNodes[i].attributes["id"];
for (j = 0; j < xmlroot.childNodes[i].childNodes.length; j++ ) {
this.xml_result[i][j + 1] = xmlroot.childNodes[i].childNodes[j].firstChild.nodeValue;
}
}
this.xml_loaded = true;
}

public function getXML():Array {
return this.xml_result;
}

public function getToken():Boolean {
return xml_loaded;
}
}
Here is my class

Code:

import com.cc.XMLLoader;
import mx.utils.Delegate;

class com.cc.projects.Projects extends MovieClip
{
private var objXmlLoader:XMLLoader;
private var pArray:Array = new Array();

public var container : MovieClip;

public function Projects() {
objXmlLoader = new XMLLoader("../lib/xml/Projects.xml");
this.onEnterFrame = Delegate.create(this, getToken);

}

public function getToken() {
if (objXmlLoader.getToken() == true) {
delete this.onEnterFrame;
getArray();
}
}

public function getArray() {
/*
This is the part which is supposed to show every preview images of my xml. from 0.0 to 80.0 and so on.
*/
pArray = objXmlLoader.getXML();

var k:Number = 0;
var i:Number;

for (i = 0; i < pArray.length - 1; i++) {
container.createEmptyMovieClip("mc" + i, 100);
container["mc" + i].loadClip("../lib/img/projects/" + pArray[0][5],this);
container["mc" + i]._x = k * 80;
k++;
}
}
}
Can you please tell me why it doesnt works?
The problem is obviously from the getArray function. I know that if I call them by their name manually it works but I am trying to assign them a dynamic name and call them with it which doesnt work.. please tell me how I can do that.

Thank you.

Thumbnail Images Blinking While Animating
Hello everyone,
thanks everyone who is helping me.

I have an issue with blinking (apper-dissapper).
I am calling 18 images into the empty .mc from the local drive.
MasterHomePage_mc.ImgButton1_btn.Img1_mc.Img1Holde r_mc.
ist working fine and images are NOT blinking when they called up.

But, once I have done a simple thumbnail image bar with spinning 18 images
they start blining.

I think there is a probles with speed of loading images.

Any ideas, pls, help.
Thanks
Jamolhon

XML Thumbnail Gallery Images Not Loading
I finished the tutorial on the XML Thumbnail photogallery and got it to work fine. I then started making changes to it such as adding an expanded description field and linking to my own images and thumbnails. When I test the movie with links to my images in the XML file I get an "Error Opening the URL" message. If it replace my image link with the default one from the tutorial everything works fine. I'm trying to run this from my local HD not from a server and I've made sure my jpgs are not saved as progressive.
Here is the XML code I have for my images:
<pic>
<image>images/mountain_full.jpg</image>
<caption>The best title ever</caption>
<thumbnail>thumbs/mountain.jpg</thumbnail>
<description>This is an example description</description>
</pic>
Anyone have any suggestions?

Thumbnail Grid Instead Of Scrolling Images
Hello,

I followed the tutorial for the thumbnails and xml gallery, but I'm having trouble getting the images to load in a grid instead of scrolling.

i know taht i will have 5 rows of ten thumbnails.

Any help would be great!

Thanks!

Function To Control The Scroll Speed At Which A Thumbnail Rolling Bar Moves
The thumbnail scroll bar starts speeding slow and than it gets faster and faster. I would like to slow down this speed.

I need to slow down the speed at which the thumbnail rolling bar moves from left to right. The slideshow I have includes a thumbnail brownsing bar. The speed at which the thumbnails move at the begining is just fine but as the user scrolls down further it starts to move the thumbnails way to fast.

Can someone take a look a the Controller I am using which is attached and let me know what I am missing?
I am attaching the code I am using and also here is the link to the slideshow

THank you so much

Fernanda InchaustiWorking slideshow







Attach Code

/*
---------------------------------------------------------
Classe Controlador
---------------------------------------------------------
Controla tudo o que ocorre no slide show...
---------------------------------------------------------
*/

class Controlador {

// atributos

var nPics:Number;
var nThumbs:Number;
var picsLoaded:Number;
var thumbsLoaded:Number;
var picAtual:Number;
var thumbAtual:Number;
var dirImg:String;
var dirThumbs:String;
var modoShow:Boolean;
var razaoPorc:Number;
var scrollLimite:Number;
var base:MovieClip;
var clipAtual:MovieClip;
var showPlaying:Boolean;
var movendoThumbs:Boolean;

// métodos

function Controlador(clip:MovieClip) {

nPics = 45;
dirImg = "images/fullsize/";
dirThumbs = "images/thumbnails/";

nThumbs = 0;
picsLoaded = 0;
thumbsLoaded = 0;
razaoPorc = 100 / nPics;
base = clip;
modoShow = true;
showPlaying = false;
}

function iniciar() : Void {
var a, b : Number;
var txt, txtFoto : String;
var objThumb : Object;

ocultarTudo();

base.listaThumbs.thumb1.ativo = false;
base.listaThumbs.thumb1.numero = 1;
base.foto1.numero = 1;
base.foto1.pronto = false;

// cria os espaços para cada foto e thumbnail
for(a = 2; a <= nPics; a++) {
b = a - 1;
txt = "thumb" + a;
txtFoto = "foto" + a;

base.listaThumbs.thumb1.duplicateMovieClip(txt, b);
base.foto1.duplicateMovieClip(txtFoto, b);

base.listaThumbs[txt].ativo = false;
base.listaThumbs[txt].numero = a;
base[txtFoto].numero = a;
base[txtFoto].pronto = false;
}

base.loadingPics._visible =
base.loadingThumbs._visible = true;

// ajuste de profundidades
base.fade.swapDepths(nPics);
base.btPlay.swapDepths(nPics + 1);
base.loadingPics.swapDepths(nPics + 2);
base.loadingOnePic.swapDepths(nPics + 3);

picAtual =
thumbAtual = 1;
clipAtual = base.foto1;
base.infoSlides.slideTotal.text = nPics;

carregarFoto(1);
carregarThumbs();
}

function ocultarTudo() : Void {
var a : Number;

base.btNext._visible =
base.btPrevious._visible =
base.btPlay._visible =
base.infoSlides._visible =
base.loadingPics._visible =
base.loadingThumbs._visible =
base.listaThumbs._visible =
base.loadingOnePic._visible = false;
for(a = 1; a <= nPics; a++) {
base["foto" + a]._visible = false;
}
}

function carregarThumbs() : Void {
var a : Number;

for(a = 1; a <= nPics; a++) {
base.listaThumbs["thumb" + a].img.loadMovie(dirThumbs + a + ".jpg");
}
}

function avisarThumbCarregado(clip:MovieClip) : Void {
thumbsLoaded++;
base.loadingThumbs.barra._xscale = thumbsLoaded * razaoPorc;
base.loadingThumbs.barra._alpha = 100;
if(thumbsLoaded >= nPics) {
base.loadingThumbs.barra._visible = false;
posicionarThumbs();
}
}

function posicionarThumbs() : Void {
var anterior, atual : MovieClip;
var a : Number;

anterior = base.listaThumbs.thumb1;
ajustarBordaThumb(anterior);
anterior.img._alpha = 60;
for(a = 2; a <= nPics; a++) {
atual = base.listaThumbs["thumb" + a];
atual._x = anterior._x + anterior._width;
atual.img._alpha = 60;
ajustarBordaThumb(atual);
anterior = atual;
}
base.listaThumbs._visible = true;
base.loadingThumbs._visible = false;
scrollLimite = (base.listaThumbs._width > 600) ? 600 - base.listaThumbs._width : 4;
base.listaThumbs.ret = this;
base.listaThumbs.onEnterFrame = function () {
if(_root._ymouse > 435 && _root._ymouse < 600) {
if(_root._xmouse < 300) {
this.ret.moverThumbsDir(10 - _root._xmouse * 10 / 300);
} else if(_root._xmouse > 300) {
this.ret.moverThumbsEsq(_root._xmouse * 10 / 300 - 10);
}
this.ret.movendoThumbs = true;
} else {
this.ret.movendoThumbs = false;
}
}
}

function ajustarBordaThumb(clip:MovieClip) : Void {
var x, y : Number;

clip.borda._visible = false;
// desenha a borda
x = clip.img._width + 4;
y = clip.img._height + 4;
clip.borda.lineStyle(0, 0xFFFFFF, 100);
clip.borda.lineTo(x, 0);
clip.borda.moveTo(x, 0);
clip.borda.lineTo(x, y);
clip.borda.moveTo(x, y);
clip.borda.lineTo(-1, y);
clip.borda.moveTo(-1, y);
clip.borda.lineTo(-1, -1);
// ajusta a área de link
clip.link._width = clip.img._width;
clip.link._height = clip.img._height;
}

function moverThumbsEsq(passo) : Void {
if(base.listaThumbs._x > scrollLimite) {
base.listaThumbs._x -= passo;
}
}

function moverThumbsDir(passo) : Void {
if(base.listaThumbs._x < 4) {
base.listaThumbs._x += passo;
}
}

function selecionarFoto(num:Number) : Void {
clipAtual._visible = false;
picAtual = num;
clipAtual = base["foto" + picAtual];
exibirFotoAtual();
atualizarInfo();
atualizarBotoes();
}

function atualizarAtivoThumb() : Void {
var a : Number;
var txt : String;

// desativando o thumb anteriormente selecionado
txt = "thumb" + thumbAtual;
base.listaThumbs[txt].img._alpha = 60;
base.listaThumbs[txt].borda._visible = false;
base.listaThumbs[txt].ativo = false;
base.listaThumbs[txt].link._visible = true;

// ativando o thumb selecionado
txt = "thumb" + picAtual;
base.listaThumbs[txt].img._alpha = 100;
base.listaThumbs[txt].borda._visible = true;
base.listaThumbs[txt].ativo = true;
base.listaThumbs[txt].link._visible = false;
thumbAtual = picAtual;
// reposicionando os thumbs para que o ativo fique visível
if(!movendoThumbs) {
centralizarThumbAtivo();
}
}

function centralizarThumbAtivo() : Void {
var pos : Number;
var thumb : MovieClip;

thumb = base.listaThumbs["thumb" + thumbAtual];
pos = base.listaThumbs._x + thumb._x + thumb._width;
if(pos < 0 || pos > 600) {
base.listaThumbs._x = Math.max(Math.min(0, base.listaThumbs._x + 350 - pos), scrollLimite);
}
}


function carregarFoto(indice:Number) : Void {
base["foto" + indice].img.loadMovie(dirImg + indice + ".jpg");
}

function contarFotoCarregada(indice:Number) : Void {
var txt : String;
var prox : Number;

txt = "foto" + indice;
picsLoaded++;
base[txt].pronto = true;
base[txt]._visible = false;
atualizarLoadingFotos();
centralizarFoto(indice);
prox = proximaFotoNaoCarregada(indice);
//trace("indice = " + indice + " prox = " + prox);
if(picsLoaded < nPics) {
carregarFoto(prox);
}
if(modoShow && !showPlaying && prox > 0) {// se está no modo slide show e as 4 próximas fotos já estão no cache, dá o play
if(prox - picAtual > 3) {
continuarShow();
}
} else if(indice == picAtual && !modoShow) {// se não está no modo slide show e está carregando a foto que se deseja visualizar, exibe imediatamente
exibirFotoAtual();
}
}

function proximaFotoNaoCarregada(indice:Number) : Number {
var a, cont : Number;

a = indice;
for(cont = 0; cont < nPics; cont++) {
if(!base["foto" + a].pronto) {
return a;
}
a = (a == nPics) ? 1 : a + 1;
}
return 0;
}

function atualizarLoadingFotos() : Void {
base.loadingPics.barra._xscale = picsLoaded * razaoPorc;
base.loadingPics.barra._alpha = 100;
base.loadingPics.nPic.text = picsLoaded + " / " + nPics;
}

function centralizarFoto(num:Number) : Void {
var clip : MovieClip;

clip = base["foto" + num];
clip._x = 300 - (clip._width / 2);
clip._y = 230 - (clip._height / 2);
}

function continuarShow() : Void {
modoShow = true;
showPlaying = true;
fadeinFotoAtual();
atualizarInfo();
atualizarBotoes();
}

function atualizarInfo() : Void {
base.infoSlides.slideAtual.text = picAtual;
base.infoSlides._visible = true;
if(base.listaThumbs._visible) {
atualizarAtivoThumb();
}
}

function atualizarBotoes() : Void {
base.btPrevious._visible = (picAtual > 1);
base.btNext._visible = (picAtual < 110);
}

function proximaFoto() : Void {
clipAtual._visible = false;
picAtual = (picAtual == nPics) ? 1 : picAtual + 1;
clipAtual = base["foto" + picAtual];
exibirFotoAtual();
atualizarInfo();
atualizarBotoes();
}

function fotoAnterior() : Void {
clipAtual._visible = false;
if(picAtual > 1) {
picAtual--;
}
clipAtual = base["foto" + picAtual];
exibirFotoAtual();
atualizarInfo();
atualizarBotoes();
}

function exibirFotoAtual() : Void {
if(modoShow) {
if(clipAtual.pronto) {
fadeinFotoAtual();
} else {
base.fade.gotoAndPlay(1);
showPlaying = false;
base.loadingPics._visible = true;
base.btPlay._visible = false;
carregarFoto(picAtual);
}
} else {
if(clipAtual.pronto) {
base.fade.gotoAndStop("parado");
clipAtual._visible = true;
base.loadingOnePic._visible = false;
base.btPlay._visible = true;
} else {
base.loadingOnePic._visible = true;
base.btPlay._visible = false;
carregarFoto(picAtual);
}
}
}

function fadeinFotoAtual() : Void {
base.fade.gotoAndPlay("fadeIN");
clipAtual._visible = true;
base.loadingPics._visible = false;
base.btPlay._visible = true;
}

function alternarModo() : Void {
if(modoShow) {
modoShow = false;
showPlaying = false;
base.btPlay.texto.text = "PLAY SLIDE SHOW";
exibirFotoAtual();
} else {
modoShow = true;
showPlaying = false;
base.btPlay.texto.text = "PAUSE SLIDE SHOW";
proximaFoto();
}
}

}

Using The Photo Gallery Thumbnail Scroll Code For Independent Movieclips
I'm using the xml gallery vertical scrolling thumbnails code for my portfolio site. But, I have another section in the site that is separate from the gallery section where I want a movieclip to scroll the same way the thumbnails are scrolling (speed, same hit test, etc.) but I'm not sure how to alter the code to simply make a movie clip move the same way. I tried just changing the movieclip name, but it didn't work. Am I over-thinking it?
This is the code that is being used for the gallery.


Code:
function thumbNailScroller() {
// thumbnail code!
this.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 10;
tscroller.onEnterFrame = function() {
if ((_root._xmouse>=thumbnail_mc._x) && (_root._xmouse<=thumbnail_mc._x+thumbnail_mc._width)) {
if ((_root._ymouse>=(hit_right._y-40)) && (thumbnail_mc.hitTest(hit_right))) {
thumbnail_mc._y -= scroll_speed;
} else if ((_root._ymouse<=(hit_left._y+40)) && (thumbnail_mc.hitTest(hit_left))) {
thumbnail_mc._y += scroll_speed;
}
} else {
delete tscroller.onEnterFrame;
}
};
}

Display Thumbnail Rows From External Images
Hello,

I am developing a photo gallery using Flash MX 2004, ColdFusion MX and Flash Remoting and have, what is probably a simple question. I am new to Actionscript, so this is probably pretty basic; my apologies.

I have a folder which contains from 4 to 8 images (number can vary -- client will be updating these via ColdFusion admin area I have created), named image1.jpg, image2.jpg, etc. I have been able to display the images in a rotating manner, but also need to display the images in thumbnail-size below the large image version, in 1-2 rows. Row 1 would display image1.jpg - image4.jpg and row 2 just below it would display image5.jpg - image8.jpg (if these are present). I cannot seem to display these in rows. I have the .cfc file created fine and the services calling section in my actions frame working, but just can't seem to figure out the actionscript required to display these, as indicated. My actionscript that displays the full-size version of each image in a rotating manner looks like this:

code:
function slideProvider_Result(result) {
var imgURL = "MG214/"+result.items[0].name;
imageHolder.loadMovie(imgURL);
thisImage = setInterval(showImage, 7000, i=1);
function showImage() {
imageHolder.loadMovie("MG214/"+result.items[i].name);
if (i<result.items.length-1) {
i++;
} else {
i = 0;
}
}
}

// create the MC to hold the images
_root.createEmptyMovieClip("imageHolder", 1);

// position it in top left corner
imageHolder._x = imageHolder._y=0;


The above works fine for the rotating part -- what code would be added to display all images in the folder in rows? Any help would be very much appreciated!

Copyright © 2005-08 www.BigResource.com, All rights reserved