Thumbnail Scroller On Picture Gallery
Hi everyone,I'm making a picture gallery and need a bit of a point in the right direction, coz I'm quite new to flash.Take a look at my progress so far.I'd like to be able to make the thumbs scroll continuously while the buttons are held down, and also prevent scrolling at the end and beginning of the thumbnail block (rether than scrolling to infinity!).All I've done so far is simly add the following code to the buttons:left_btn codeon(press) { thumbnail_mc._x += 25;}right_btn codeon(press) { thumbnail_mc._x -= 25;}Where thumbnail_mc is the movie clip containing the thumbs.If anyone's got any ideas or can point me in the right direction, please post them up or email me on charlie_B_04@hotmail.com.Cheers!charlie
KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 09-05-2007, 08:36 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Thumbnail Picture Gallery
In this tutorial http://www.kirupa.com/developer/mx2004/thumbnails5.htm you all explain how to make a Flash Thumbnail Photo Gallery. I am designing a bigger photo gellery based on this code how do I have the photo gallery to list 2 rows of thumbs 5 accross and 2 rows. This code is the code that designs the thumbnail movie clip.
function thumbnails_fn(k) { thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth()); tlistener = new Object(); tlistener.onLoadInit = function(target_mc) { target_mc._x = hit_left._x+(target_mc._width+5)*k; target_mc.pictureValue = k; target_mc.onRelease = function() { p = this.pictureValue-1; nextImage(); }; target_mc.onRollOver = function() { this._alpha = 50; thumbNailScroller(); }; target_mc.onRollOut = function() { this._alpha = 100; }; }; image_mcl = new MovieClipLoader(); image_mcl.addListener(tlistener); image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k); }
Picture Gallery And Thumbnail Doubts
Here's the situation: I'm making a script that will dynamically load JPG's from a file and will eventually display each JPG's thumbnail them side by side. I've got the code going and would like to know any suggestions for corrections.
ActionScript Code:
<b>// Importing Images p = 0;x = 20;y = 20; for(i=0;i<4;i++){ _root.createEmptyMovieClip("clip"+i, i+1) loadMovie("pic"+i+'.jpg',_root["clip"+i]); _root["clip"+i]._x = x; _root["clip"+i]._y = y; //attempt to change position for next image x = +100; y = +100; } _root.onEnterFrame = function(){ _root["pic"+p+'.jpg'].swapDepths(_root); //attempt to create thumbnails if(this._width>768){ this._width = 150; this._height = 113; } else { this._width = 150; this._height = 200; } p++; }</b>
Right now I'm having troubles with the resizing of images: the if statement doesn't seem to work (or maybe resizing in flash distorts the images). Any tips or suggestions for the code?
Thanks!!
Picture Gallery And Thumbnail Doubts
Here's the situation: I'm making a script that will dynamically load JPG's from a file and will eventually display each JPG's thumbnail them side by side. I've got the code going and would like to know any suggestions for corrections.
ActionScript Code:
<b>// Importing Images p = 0;x = 20;y = 20; for(i=0;i<4;i++){ _root.createEmptyMovieClip("clip"+i, i+1) loadMovie("pic"+i+'.jpg',_root["clip"+i]); _root["clip"+i]._x = x; _root["clip"+i]._y = y; //attempt to change position for next image x = +100; y = +100; } _root.onEnterFrame = function(){ _root["pic"+p+'.jpg'].swapDepths(_root); //attempt to create thumbnails if(this._width>768){ this._width = 150; this._height = 113; } else { this._width = 150; this._height = 200; } p++; }</b>
Right now I'm having troubles with the resizing of images: the if statement doesn't seem to work (or maybe resizing in flash distorts the images). Any tips or suggestions for the code?
Thanks!!
Random Moving Thumbnail To Picture Gallery
First of all i would like that im really thankfull and happy that i came across kirupa.com. all the tutorials and most threads have been very helpfull to me the last few months.
I hope i can find a quick answer to that one too.
im looking for a gallery type where thumbnails of my headlines randomly change in a thumbnail grit and than after a bit, change to one big picture over the grid still haveing the grid . a little like here
http://www.caution.de with the exception that i just have a maximum space available of 200x320 for my movie. so i thought it could be maybe about 9 thumbnails in total. on click of the big picture you will be taken to a different page.
im still a very amateur actionscripter but since being here im getting the hang of it a bit better. so please be pacient with me .
Best greetings to all you flash and AS gurus ( my personal heros) and kirupa
Dmormos
Vertical Thumbnail Scroller Gallery
Hey guys, I am having this problem and I am running out of time to make this deadline. I was able to load my vertical thumbnail scrolling gallery as an external swf into my main movie, no problem. The catch is that when loaded, the thubnails display as well as the enlarged image when you click on them. The PROBLEM is that the thumbnails don't scroll when loaded as an external swf, however they DO when the scroller is viewed as a standalone. Please advise. The correct path to the external swf from the main movie is (to unload)
_root.pages.container.unloadMovie();
the previous and next buttons DO go through the thubnails, its just the scrolling aspect that doesn't work.
here is the code for the scroller.swf
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
thumbnails = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
thumbnails[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
thumbnails_fn(i);
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.UP) {
prevImage();
} else if (Key.getCode() == Key.DOWN) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
/////////////////////////////////////
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
function thumbNailScroller() {
// thumbnail code!
_root.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 15;
tscroller.onEnterFrame = function() {
if ((_root._xmouse>=thumbnail_mc._x) && (_root._xmouse<=thumbnail_mc._x+thumbnail_mc._widt h)) {
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;
}
};
}
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._y =(target_mc._height+5)*k;
//trace(target_mc._width+" "+target_mc._parent._rotation)
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
target_mc.onRollOver = function() {
this._alpha = 50;
thumbNailScroller();
};
target_mc.onRollOut = function() {
this._alpha = 100;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}
Please advise, Thank YOU
Andrew
Image Gallery / Thumbnail Scroller AND SetInterval Help?
Hi All,
I'm trying to combine a couple different dynamic image galleries. I've got a thumbnail scroller but I'd like it to rotate 8 every eight seconds until a thumbnail is clicked.
I'm clueless here. I could probably come up with a jacked up workaround if this wasn't dynamic, but it is.
Can anyone offer some help? THANKS!
Code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
myPhoto = new XML();
myPhoto.ignoreWhite = true;
myPhoto.onLoad = function(success) {
numimages = this.firstChild.childNodes.length;
spacing = 61;
for (i=0; i<numimages; i++) {
this.picHolder = this.firstChild.childNodes[i];
this.thumbHolder = thumbnails.createEmptyMovieClip("thumbnail"+i, i);
this.thumbHolder._y = i*spacing;
this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail_image", 0);
this.thumbLoader.loadMovie(this.picHolder.attributes.thmb);
this.thumbHolder.title = this.picHolder.attributes.title;
this.thumbHolder.paragraph = this.picHolder.attributes.paragraph;
this.thumbHolder.link_one = this.picHolder.attributes.link_one;
this.thumbHolder.link_one_name = this.picHolder.attributes.link_one_name;
this.thumbHolder.main_image = this.picHolder.attributes.main_image;
this.thumbHolder._alpha = 50;
//TEXT FORMAT******************************
myformat1 = new TextFormat();
myformat1.underline = true;
myformat1.bullet = false;
myformat1.size = 11;
myformat1.bold = true;
myformat1.font = "Times New Roman";
myformat1.url = this.picHolder.attributes.link_one;
//END TEXT FORMATS*************************
//INITIAL VARIABLE*************************
var picHolder:XMLNode = this.firstChild.childNodes[0];
mainimages.loadMovie(picHolder.attributes.main_image);
paragraph_txt.text = picHolder.attributes.paragraph;
link1_txt.html = true;
link1_txt.text = picHolder.attributes.link_one_name;
title_txt.text = picHolder.attributes.title;
link1_txt.setTextFormat(myformat1);
//END INITIAL VARIABLES********************
this.thumbHolder.onRollOver = function() {
var rollOver1:Tween = new Tween(this, "_alpha", None.easeOut, 50, 100, .2, true);
};
this.thumbHolder.onRelease = function() {
mainimages.loadMovie(this.main_image);
paragraph_txt.text = this.paragraph;
link1_txt.html = true;
link1_txt.target = "_blank";
link1_txt.text = this.link_one_name;
title_txt.text = this.title;
link1_txt.setTextFormat(myformat1);
};
this.thumbHolder.onRollOut = function() {
var rollOver1:Tween = new Tween(this, "_alpha", None.easeOut, 100, 50, .2, true);
};
}
};
myPhoto.load("gallery2.xml");
createMask();
scrolling();
function createMask() {
mask_mc._x = 410;
mask_mc._y = 1;
thumbnails.setMask(mask_mc);
}
function scrolling() {
_root.onEnterFrame = function() {
thumbnails._y += Math.cos(((mask_mc._ymouse)/mask_mc._height)*Math.PI)*20;
if (thumbnails._y>mask_mc._y) {
thumbnails._y = mask_mc._y;
}
if (thumbnails._y<(mask_mc._y-(thumbnails._height-mask_mc._height))) {
thumbnails._y = mask_mc._y-(thumbnails._height-mask_mc._height);
}
};
Scroller For Picture Gallery Question
Hello everyone
I am working on creating a scrolling gallery on the bottom of a Flash presentation for a CDROM.
I want to have a scroller that shows the images from left to right, so if anyone could point me in the right direction where I could find the script that would be great.
Late
JF
Picture Gallery Scroller Too Fast
Hi guys, I used one of the Flash tutorials here on Flashkit to make this scroller. Almost got it, only issue is that it starts way too fast when the page first loads.
Preview | FLA file
Any help at all would be appreciated.
Enlarging A Thumbnail Picture On A Separate Window The Same Size Of Picture
Hi,
I feel like a dumb, but I still need to ask this question:
When you are using thumbnail size pictures acting like buttons, how can you create a link to a new window page the size of the new enlarged picture only?...I don't want a new window showing the picture with a white background covering 100% my Flash site..
You see, I told you it was a dumb question...
Any help?
Thumbnail Scroller With Titles For Each Thumbnail
I've got a tutorial from kirupa (http://www.kirupa.com/developer/mx2004/thumbnails.htm)
what i'm trying to do is give ech thumbnail a title below its image but i cant manage to do it. I think I know hat i need to do, that is assign/createe a dynamic text field within the image_mc and assign the title from the array at the beginning. But i cant seem to get it to work
i can do it if i just put a text field on the main time line but then this is only the title for one
heres the code for the thumbnails:
Code:
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = hit_left._x+(eval("thumbnail_mc.t"+k)._width+5)*k;
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
target_mc.onRollOver = function() {
this._alpha = 50;
thumbNailScroller();
};
target_mc.onRollOut = function() {
this._alpha = 100;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}
can any one help?
Much appreciated
Thumbnail Scroller With Titles For Each Thumbnail
I'm trying to modify the Gallery with a thumbnail scroller thats on here.
What I want to do is add it so that each thumbnail has a title below it as well.
Does anyone know if this has been covered anywhere? i@ve spent the weekend searching google and here and i'm at my wits end now..
Any help or pointers much appreciated.
Cheers in advance
Xml Thumbnail Gallery - How To Leave Thumbnail Blank?
There was a thread a few days ago on how to leave the caption or description blank. If anyone knows could you explain how to leave the thumbnail and/or url blank for some and to show for others? Where if there is no information that flash can read a field that is undefined as ""?
FLV Video Thumbnail + Thumbnail Gallery With LinkIDs From XML
Let's say for instance, our XML file:
<videos>
<video linkid="AK0001" thumb="http://www.site.com/pathtofile/filename.flv">
<link>http://www.site.com/pathtofile/filename.flv</link>
</video>
</videos>
Is it possible to use the source flv file as the thumbnail? Or, is it better to create a thumbnail of all the content?
With this said, how would I create the event handler to satisfy when each thumbnail is clicked, it stores it's linkid in the $_GET variable?
Thank You,
b0gui
Dynamic Thumbnail Picture Issues
Here's my scenario:
MovieClip1
MovieClip2
MovieClip3 ThumbNailMovie
...
on rollOver for each MovieClip, I want the thumbNailMovie to load an appropriate thumbnail picture for the corresponding movie clip.
Issues that have arisen using:
ThumbNailMovie.loadMovie("pictureX.jpg");
followed by adjusting the x,y,height,and width properties
of the thumbNail to allign it into the right place are:
1) the full size image appears on the screen and I have to select another clip before it is properly alligned
- I believe loadMovie places the image onto the stage
before applying the properties to it. I want the
properties applied first! (setting _visible isnt
working)
2) if I move my mouse too quickly between the clips, the thumbNail will actually go blank and stop working completely
I'd appreciate some feedback. Thank you in advance.
-Darin
Listbox With Text And Thumbnail Picture
Hi!
I'd like to have a scrolling listbox. EACH LINE of the listbox will have two fields:
Field #1 text string
Field #2 jpg thumnail picture displayed (next to the text string).
I searched the messages, but couldn't find a solution to this particular scenario.
Please help! I'm counting on you guru's.
LumpyTheLizard
Small Thumbnail ---> Large Picture
Hello all,
I have a rather simple question, it shouldnt be to hard for you guys to figure out. Ok basically I made a thumbnail and when you click it it shall show a much larger version of the picture, without going to a new frame or scene. And when you click on the picture it will go away. How will I be able to do this??
Thanks, and I hope you all had enjoyable Holidays.
[F8] Launch Bigger Picture From Thumbnail
Hi,
Can someone please show me a way of loading a bigger picture from a thumbnail?
What action code do I use, an example would be great.
I have small thumbnails through the page and I would like when someone clicks or hoover over it to open a bigger version of the same picture in the middle of the page.
Can this be done?
Thank you in advance.
Loading Picture When Thumbnail Is Clicked
I have a MC (instanced: mc_fotos), in it i have 2 others MC...
one is instanced as mc_show and is where the pics should be loaded,
the other one is where the thumbnails are (sidescrolling menu)...
i wanna click the thumbnail and open the pic inside mc_show (H=410;W=280).
I've tried this:
Code:
this.f_3.onRelease = function () {
_root.mc_fotos.mc_show.loadMovie("f3.jpg");
}
it almost worked, except by that the pic is giant, and at (0,0) in _root.
this code is on the 1st frame of the thumbnails MC.
Any hint?
tks in adv...
Thumbnail Gallery Tutorial - Gallery Within Movieclip
I've taken the Adding Thumbnail tutorial http://www.kirupa.com/developer/mx2004/thumbnails.htm and it works perfect. However when I play the photogallery swf file within a movie clip (playing as externail swf from main timeline) and the gallery pulls up. The links work and all is good. All until I try and scroll to more thumbnail files. It's now scrolling. Scrolls fine when swf played indendently.
This couldn't have come a worse time as my finals are due in hours.
Please help if you can.
Thanks
Thumbnail Scroller
Hello,
I have been trying to mimick the scrolling action from the site
http://www.flashlevel.com for ages now, but have had no luck getting it so smooth or acurate.
Does anyone know how they did the code on the thumb nail scollers on their site.
Thanks.
Thumbnail Scroller
i have a MC called 'thumbs' that is supposed to scroll thumbnails / buttons vertically according to the mouses position, but it only goes down.
this is my script:
code:
panel.onRollOver = panelOver;
function panelOver() {
this.onEnterFrame = scrollPanel;
delete this.onRollOver;
}
var b = stroke.getBounds(this);
function scrollPanel() {
if(_ymouse<b.yMin || _ymouse>b.yMax || _xmouse<b.xMin || _xmouse>b.xMax) {
this.onRollOver = panelOver;
delete this.onEnterFrame;
}
if(panel._y >= 20) {
panel._y = 20;
}
if(panel._y <= -1697.0) {
panel._y = -1697.0;
}
var ydist = _ymouse - -250;
panel._y += -ydist / 100;
}
i think this is the problem in the script above:
code:
function panelOver() {
this.onEnterFrame = scrollPanel;
delete this.onRollOver;
}
how can i fix this?
any help would be great!
thanks!
austin
Thumbnail Scroller
hello.. do you have an idea how to create the thumbnail scroller like this. http://www.fourseasons.com/losangeles/photo_gallery/
thnks in advance
Thumbnail Scroller Help
I have this attached script that works with an xml and external images, and I am trying to make the automatic scrolling smooth. Right now it is at an odd interval with bad easing. I want to make it scroll smoothly without any breaks.
You will see when you check out the file...It is in CS3
If you have any advice to how this would work better, I would appreciate it.
MX: Thumbnail Scroller
I have a scroller that scrolls my panel based on the cordinates of my mouse. I also have a nav on the side that need to controll the panels location as well.
Issue:
The scroller is still checking where my mouse is even outside the the masked area so when I rollover the secondary nav and it moves the panel and then once I rollout the scroller slide the panel back baased on my mouses location.
here is my script.
Code:
///////////////////////////////////////
///// Primary Navigation
///////////////////////////////////////
fitsMenu.b1.onRollOver = function() {
fitsMenu.gotoAndStop(2);
};
fitsMenu.b1.onRollOut = function() {
fitsMenu.gotoAndStop(1);
};
fitsMenu.b1.onPress = function() {
gotoAndStop("video", 1);
};
fitsMenu.b3.onRollOver = function() {
fitsMenu.gotoAndStop(3);
};
fitsMenu.b3.onRollOut = function() {
fitsMenu.gotoAndStop(1);
};
fitsMenu.b3.onPress = function() {
gotoAndStop("details", 1);
};
///////////////////////////////////////
///// Secondary Navigation
///////////////////////////////////////
nav.b1.onRollOver = function() {
nav.gotoAndStop(1);
panel._x = 208;
};
nav.b2.onRollOver = function() {
nav.gotoAndStop(6);
panel._x = 58;
};
nav.b3.onRollOver = function() {
nav.gotoAndStop(11);
panel._x = 8;
};
nav.b4.onRollOver = function() {
nav.gotoAndStop(16);
panel._x = -102;
};
nav.b5.onRollOver = function() {
nav.gotoAndStop(21);
panel._x = -262;
};
nav.b6.onRollOver = function() {
nav.gotoAndStop(26);
panel._x = -306;
};
///////////////////////////////////////
///// Panel Scroller
///////////////////////////////////////
panel.onRollOver = panelOver;
function panelOver() {
this.onEnterFrame = scrollPanel;
delete this.onRollOver;
updateAfterEvent();
}
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;
updateAfterEvent();
}
if (panel._x>=200) {
panel._x = 200;
}
if (panel._x<=-306) {
panel._x = -306;
}
var xdist = _xmouse-416;
panel._x += -xdist/12;
}
///////////////////////////////////////
///// Panel Buttons
///////////////////////////////////////
panel.jean1.onRollOver = function() {
nav.gotoAndPlay(1);
};
panel.jean2.onRollOver = function() {
nav.gotoAndPlay(6);
};
panel.jean3.onRollOver = function() {
nav.gotoAndPlay(11);
};
panel.jean4.onRollOver = function() {
nav.gotoAndPlay(16);
};
panel.jean5.onRollOver = function() {
nav.gotoAndPlay(21);
};
panel.jean6.onRollOver = function() {
nav.gotoAndPlay(26);
};
Thumbnail Scroller
I need to edit this code
Code:
function thumbNailScroller() {
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;
}
};
}
So that the thumbnails scroll when a btn is pressed. I do not want scrolling based on mouse position. I have two columns of thumbnails and I want the thumbnails to scroll when an up and down arrow are pressed. I also need the buttons to be disabled when the thumbs reach the beginning and the end. Can anyone help me?
Thumbnail Scroller In A MC?
I've successfully completed the the thumbnail scolling tutorial and added my own pics with ease.
http://www.kirupa.com/developer/mx2004/thumbnails.htm
However, trying to copy these layers to a movieclip for my flash site is a problem. The images all load up when the previous and next buttons are clicked, but the scroller images will not move.
I suppose I could have all these layers on the main timeline, but it wouldn't make good structure.
Is there a part of the actionscript i'm not understanding?
Thumbnail Scroller
Last edited by r_bartoli : 2005-12-04 at 20:01.
Hi all.
I've this code for a thumbnail scroller. Any suggestion for smoothing the movement and implementing this code?
ActionScript Code:
stop();
// ************** Classes ************* \
import mx.transitions.Tween;
// ************** Variables ************* \
var THUMB_WIDTH:Number = 52;
var THUMB_HEIGHT:Number = 143;
var THUMB_PADDING:Number = 7.5;
var SPEED:Number = 22;
var fadeCounter:Number = 0;
_global.SITE_PATH = "";
_global.THUMB_PATH = SITE_PATH + "assets/2006pe/sfilate/donna/thumb/";
_global.FOTO_PATH = SITE_PATH + "assets/2006pe/sfilate/donna/";
// ************** Photo Panel Loader ************* \
var photoLoader:MovieClipLoader = new MovieClipLoader();
var photoLoaderListener:Object = new Object();
photoLoaderListener.onLoadStart = function(target:MovieClip):Void {
target._parent.thumb_preloader._visible = true;
};
photoLoaderListener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
var percent:Number = (bytesLoaded / bytesTotal) * 100;
target._parent.thumb_preloader.bar._xscale = percent;
};
photoLoaderListener.onLoadInit = function(target:MovieClip):Void {
target._parent.thumb_preloader._visible = false;
};
photoLoader.addListener(photoLoaderListener);
// ************** Photo Panel ************* \
function createPhotoPanel():Void {
arPhotos = new Array("foto.jpg", "foto.jpg", "foto.jpg", "foto.jpg", "foto.jpg", "foto.jpg", "foto.jpg", "foto.jpg", "foto.jpg", "foto.jpg", "foto.jpg", "foto.jpg", "foto.jpg", "foto.jpg", "foto.jpg", "foto.jpg", "foto.jpg", "foto.jpg", "foto.jpg", "foto.jpg", "foto.jpg", "foto.jpg");
var thumbPanel:MovieClip = this.createEmptyMovieClip("thumbPanel", this.getNextHighestDepth());
thumbPanel._x = THUMB_PADDING;
thumbPanel._y = THUMB_PADDING;
thumbPanel.setMask(mask);
for (var i:Number = 0; i < arPhotos.length; i++) {
thumbPanel.attachMovie("thumb", "thumb_" + i, i);
var path = thumbPanel["thumb_" + i];
path._x = (THUMB_WIDTH * i) + (THUMB_PADDING * i);
path._alpha = 0;
path.id = i;
path.num.text = i;
path.filename = arPhotos[i];
photoLoader.loadClip(THUMB_PATH + arPhotos[i], path.thumb_photo);
path.onPress = function() {
this._parent._parent.mcPhoto.loadMovie(FOTO_PATH + path.filename);
};
}
thumbPanel.onRollOver = panelOver;
FadeID = setInterval(fadeIn, 250);
b = mask.getBounds(stroke);
}
// ************** Fade Photo Panel ************* \
function fadeIn():Void {
if (fadeCounter < arPhotos.length) {
var path = thumbPanel["thumb_" + fadeCounter];
var tween:Tween = new Tween(path, "_alpha", None, 0, 100, 1, true);
fadeCounter++;
} else {
clearInterval(FadeID);
trace(thumbPanel._width);
}
}
// ************** Photo Panel Scrolling ************* \
function panelOver():Void {
this.onEnterFrame = scrollPanel;
delete this.onRollOver;
}
function scrollPanel():Void {
if (_xmouse < b.xMin || _xmouse > b.xMax || _ymouse < b.yMin || _ymouse > b.yMax) {
this.onRollOver = panelOver;
delete this.onEnterFrame;
} else {
var xdist:Number = _xmouse - (mask._width / 2);
thumbPanel._x += Math.round(-xdist / SPEED);
if (thumbPanel._x >= THUMB_PADDING) {
thumbPanel._x = THUMB_PADDING;
}
if (thumbPanel._x <= -(thumbPanel._width - mask._width + THUMB_PADDING)) {
thumbPanel._x = -(thumbPanel._width - mask._width + THUMB_PADDING);
}
}
}
// ************** Fire-Up! ************* \
createPhotoPanel();
http://www.rblab.com/ultrashock/productBrowser.rar
Drag Thumbnail To Area, Load Picture
Hi, this is my first post
How can i alter this AS from a thread here into something where the person drags the thumbnail to a certain movieclip on the stage(say a red X), then the big actual image loads into another movieclip on the same stage.
So basically instead of dragging the thumbnail to on top of the already loaded image to load the new thumbnail, the new thumbnail will be dragged to a different area (the red X) to the left of the already loaded image. If it isnt dragged and dropped on the certain area (the red X) then it eases back to it's thumbnail spot.
This is the thread im talkin' about:
http://www.kirupaforum.com/forums/sh...7&page=1&pp=15
I uploaded a visual example of what im talking about.
Any ideas? I'm kind of new to AS, though.
Drag Thumbnail To Area, Load Picture
Hi, this is my first post
How can i alter this AS from a thread here into something where the person drags the thumbnail to a certain movieclip on the stage(say a red X), then the big actual image loads into another movieclip on the same stage.
So basically instead of dragging the thumbnail to on top of the already loaded image to load the new thumbnail, the new thumbnail will be dragged to a different area (the red X) to the left of the already loaded image. If it isnt dragged and dropped on the certain area (the red X) then it eases back to it's thumbnail spot.
This is the thread im talkin' about:
http://www.kirupaforum.com/forums/sh...7&page=1&pp=15
I uploaded a visual example of what im talking about.
Any ideas? I'm kind of new to AS, though.
Load Picture No Picture Gallery
i dont want a picture gallery!!!! i just want the commands or what i have to do so when they get to the frame! just download the picture...without clickin a button!!!! can somebody send me a example? mi mail is leerabanal@hotmail.com
PLEASE HELP ME
Thumbnail Scroller/enlarger
I am intersested in making an thumbnail image scroller, rough draft to be found @ http://www.qozmiq.com/test.html I would like to know if it is possible to have the images enlarge slightly when there is a mouse over, and simultaneously have the ability to scroll left or right, depending on which side of the "filmstrip" the mouse is hovering over...it could be a constant looping filmstrip, going in one direction without user input, but I really need the images to enlarge when there is a mouse over. I tried to make one image move across the screen, which I did. I put a goto and stop action on it, but it did not seem to hold it. I published, and the action did not work...I double checked to make sure he action was still there, and it was...what gives>? I thank everyone in this forum, for all the wonderful help I have been given, and desperatly hope that someone can guide me towards the path to be on...
Qozmiq
Horizontal Thumbnail Scroller
Hey, can someone show me how to create a horizontal scrollbar to scroll through photo thumbnails.
Reference - http://www.jaapphoto.com (Personal Work)
Flash Thumbnail Scroller
HI,
I've got a flash navigation which scrolls through a series of thumbs. The problem I'm having is when you move your mouse away from the scroller it still scrolls. The flash is in a table and is part of an html site. Link:
http://www.feildenandmawson.com/flas...rojects_01.htm
I'm sure it's something silly but please advise as this is quite urgent.
many thanks to anyone who can help.
Dan
Vertical Thumbnail Scroller
I have no idea how to make one - I know how to make a horizontal scroller, but that was created from a template, and it's much too complicated to alter myself.
I was hoping someone could tell me how to do this?
Thumbnail Scroller Error
Hi, I have a little problemo that maybe some of you have already experienced.
I have a thumbnail scroll in Flash MX ,and in about 1 out of 100 browsers I've looked at the site in, The site comes up but the thumbnail scroll is not there, just a white space. Kinda perplexed here and I dont want to send away any viewers from my site...
The site is:
www.barbaradrichards.com
Any clues? Thanx.....Shane
Continuous Thumbnail Scroller
I need to create a thumbnail scroller that loops continually. So when you scroll of the last image, it starts over with the first image. Can someone give me a head start on how to acomplish this?
Thanks
[F8] ActionScript - Thumbnail Scroller
Ok, so I've learned how to dynamically load images to a movieclip instance using an XML file, but, now I need to learn how to load more than one array into the thumbnail scroller.
At this point, I can load one thumbnail at the most. How do I go about loading more than one thumbnail into the scroller?
And to get it out of the way now, how do I link the thumbnails to their larger counterparts?
This is my AcionScript code so far.
Code:
stop();
playlist = new XML();
playlist.ignoreWhite = true;
playlist.onLoad = function (success) {
if (success) {
_global.picname = [];
_global.picimage = [];
_global.picthumb = [];
for (var i = 0; i<playlist.firstChild.childNodes.length; i++) {
_global.picname[i] = playlist.firstChild.childNodes[i].attributes.name;
_global.picimage[i] = playlist.firstChild.childNodes[i].attributes.image;
_global.picthumb[i] = playlist.firstChild.childNodes[i].attributes.thumbnail;
trace(picname[i]+" "+picimage[i]+" "+picthumb[i]);
}
_root.createEmptyMovieClip("picture", 1);
_root.createEmptyMovieClip("bigpicture", 1);
}
else { display_txt.text="Error loading XML" }
picture.loadMovie(_global.picthumb[0]);
bigpicture.loadMovie(_global.picimage[0]);
name.text=_global.picname[0];
}
playlist.load("images.xml");
Advanced Thumbnail Scroller ?
Advanced thumbnail scroller ?
I'm trying to produce a thumbnail scroller as shown here.
http://www.flashloaded.com/flashcomp.../example1.html
This example seems to work better than most tutorials I've found, which just scroll the thumbnails in the opposite direction of the mouse movement and then you have to bring the mouse to the center of the mc to stop the movement and click on the thumbnail.
The example shown seems to stop when you roll over the thumbnail.
I bought the component that is shown in the example in a hope to work out how it was achieved, I have since found out that is not possible - I need to add other functionailty to the example shown.
Does anyone know of any good tutorials on producing an expandable scroller.
Thanks in advance
Help With Thumbnail Image Scroller
Hi, everybody,
I will really appreciate your help with this. I have the code for an image scroller and its working fine. A test site is at www.alexojeda.com . But besides the capabilities the scroller now has on "mouse over, out and on release", I'd like the thumbnail scroller to start looping to the left side as soon as the page is loaded, with out loosing the capabilities mentioned above.
THE IMAGE THUMBNAIL CODE MODULE:
// function to move thumbnail slider ("this" = thumbs_mc)
function sliderControl() {
var w:Number = this._width/2;
var hw:Number = mask_mc._width/2;
var npixels:Number;
// only do when mouse over slider mask
if (_ymouse > mask_mc._y && _ymouse < mask_mc._y + mask_mc._height) {
// mouse over left half of slider:
if (_xmouse > mask_mc._x && _xmouse < mask_mc._x + hw) {
npixels = (hw - _xmouse) / hw * MAXPIXELS;
this._x += npixels;
if (this._x >= 0) this._x = this._x - w;
// mouse over right half of slider:
} else if (_xmouse > mask_mc._x + hw && _xmouse < mask_mc._x + mask_mc._width) {
npixels = (_xmouse - hw) / hw * MAXPIXELS;
this._x -= npixels;
if (this._x <= -w) this._x = this._x + w;
Thanks a lot!!!
Thumbnail Scroller Class
I am looking for a simple scrolling thumbnail class written in AS2. Does anyone know of any tutorials or code samples anywhere? I can't seem to locate one.
I have written one but I have a problem. My thumbnails are 100px x 100px. When I have more than like 36 (can't remember the exact number), my mask (which masks a bit on the left and the right side of the horizontal thumbnail scroller) no longer works. I found out that there is a max pic size for flash so I'm assuming that I am exceeding that max pic size which causes the mask to not work when I breach that size. Just a guess. I am trying to figure out how to get around that problem if indeed that is the problem.
Any help appreciated, thanks!
Thumbnail Scroller Troubles
Hello again all. I was trying to duplicate a nice thumbnail scroller that someone posted earlier. Here's the link...http://www.miniusa.com/crm/load_mini...per_s_exterior
I have it pretty darn close and I tried incorporating Billy T's script from the easing text scrolling tutorial. When the image box is all the way to the right of the mask, the rightmost picture should be showing and vice versa (you move the mouse right, the images move left). There are 27 "images". What I can't seem to get right is the later. The first and last pictures don't line up properly. Anyone care to take a look? I'm sure there's a much better way to do this.
Here's the script
ActionScript Code:
sp = 2;
mask = the_mask.getBounds(_root);
buttons = butts.getBounds(_root);
xx = mask.xMax;
xn = mask.xMin;
yx = mask.yMax;
yn = mask.yMin;
bx = buttons.xMax;
bn = buttons.xMin;
the_mask.onEnterFrame = function() {
if (this.hitTest(_root._xmouse, _root._ymouse, false)) {
hit = 1;
} else {
hit = 0;
}
};
scroller.onEnterFrame = function() {
this._x = window._x;
this._y = window._y;
};
window.onEnterFrame = function() {
if (hit == 1) {
follow();
}
};
function follow() {
if (_xmouse-(window._width/2)<xn) {
window._x = xn+(window._width/2);
} else if (_xmouse+(window._width/2)>xx) {
window._x = xx-(window._width/2);
} else {
window._x = _xmouse+(window._x-_xmouse)/sp;
}
}
butts.onEnterFrame = function() {
scrollAmount = ((this._width)-(the_mask._width))/(the_mask._width-(window._width));
targX = -window._x*scrollAmount;
this._x -= ((this._x-targX)-1200)/5;
};
Horizontal Thumbnail Scroller
Need tutorial on setting up a horizontal thumbnail scroller, controlled by a back and forward button. I am well versed in Flash, just need help setting up the interaction.
XML / Flash Thumbnail Scroller
Hello. I have just done this tutorial and was wondering if anybody knows how to launch external sites (either by clicking the large image, or description, or link).
I am a bit of a novice with XML (and flash for that matter), have tried a few things and have been able to get the link in the xml file manifest, but not having any luck getting a clickable element working.
I would be very grateful for any input.
Thanks,
m
Help Problem With Thumbnail Scroller
Hi everyone,
I have a big/small problem with a thumbnail scroller, created with the help of the tutorial found in this great site.
Shortly, this is my problem: I need to have a website that calls up a section in which there's a gallery with some employees faces and profiles.
I decided I would use a gallery similar to the one explained in here, and then adding its scrolling thumbnails.
So, there's the movie, and by pressing the appropriate button, it loads on an empty movieclip another movieclip, on which there's the gallery and thumbs and everything.
Now, let's call the gallery MC "gallery", and the big movie simply "movie".
The Gallery MC works fine when I launch it by itself. As soon as the Gallery MC is embedded in the Movie, the scrolling won't work anymore.
I think it might be some problem with _root stuff in the AS, and I tried changing it to .this, but it wouldn't work either way.
I truly hope you got what I mean, if you need an example here's a preview of what I'm trying to do:
www.actual-design.com/rivista
You click on the button named "redazione" (sorry, it's italian, it has no int'l purposes), and you will see that thumbnails down below won't scroll.
Tell me if you need the actionscript, but you can find it in here under flash mx2004 tuts.
Please, help, this is quite important and I don't seem to have it figured out!
You're great, btw!
Thumbnail Scroller Question
I've been playing around with the thumbnail gallery tutorial on this site. However I would like to put in a vertical scroller instead. But instead of having to move your mouse to scroll through the gallery, i would like an up and down arrow, which when you rollover them they automatically scroll the thumnails.
On http://www.rockstargames.com/sanandreas/ in the screens section there is a gallery that shows you exactly what i'm talking about. basically i would like to end up with exactly the same thing they have.
Any help is much appreciated.
Thumbnail Scroller Won't Work...
I have a main movie. There are 3 buttons, each button loads a difffernt .swf (3 of them). These are image galleries. If you just open the image gallery movie by itself, the thumbnail scrollers work fine. But when you open this main movie and load the different image galleries everything works in the image galleries except for their Thumbnail Scrollers. Anyone know why?
|