Thumbnails Sliding VerticallyPROBLEM
Hi,
I have a problem with this gallery,I would want that the images enter horizontally
of continuation place the code of the xml vertical gallery
Quote:
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!
this.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 10;
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);
}
NOW I want to insert this script for the function! where I can insert it?
Quote:
import mx.transitions.*;
import mx.transitions.easing.*;
TransitionManager.start(img1_mc, {type:Fly, direction:Transition.IN, duration:3, easing:Elastic.easeOut, startPoint:9});
you can found the exsample here
http://www.kirupa.com/forum/showthread.php?t=199861
sorry for my english
thanx for all
rogerB
KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 04-01-2006, 02:38 AM
View Complete Forum Thread with Replies
Sponsored Links:
Help With Sliding Thumbnails
So Im using a photogallery that sencolor made here is the zip file of it..
but im trying to modify it so that.. at a time only 5 thumbnails can be seen on the stage.. at a time...the rest are on the right stage.. and if i expand the Stage.. it should still stay on the right ( how do i make all teh thumbs 1 to howmany ever are loaded using the xml ) to stay off stage even if stage is increased... ( full screen flash )..
and when u move ur mouse to the right (side of the stage.. say 100 pixels area on the right)
the first of the five thumbnails slides to the left off the stage.. and the next one slides in from the right on the stage.. all easing in and out ... i can use a easing prototype for that.. but if anyone can help me figure this out.. i would appreciate it...
im using AS 2.0
View Replies !
View Related
Help With Sliding Thumbnails
So Im using a photogallery that senocular made here is the zip file of it..
but im trying to modify it so that.. at a time only 5 thumbnails can be seen on the stage.. at a time...the rest are on the right stage.. and if i expand the Stage.. it should still stay on the right ( how do i make all teh thumbs 1 to howmany ever are loaded using the xml ) to stay off stage even if stage is increased... ( full screen flash )..
and when u move ur mouse to the right (side of the stage.. say 100 pixels area on the right)
the first of the five thumbnails slides to the left off the stage.. and the next one slides in from the right on the stage.. all easing in and out ... i can use a easing prototype for that.. but if anyone can help me figure this out.. i would appreciate it...
im using AS 2.0
you can download the file here
senocular.zip
View Replies !
View Related
Thumbnails Sliding Vertically?
Hi!
I am creating a photo gallery with thumbnails with the help of a tutorial in 'kirupa'. The tutorial has just been a great help!! However, I would like my thumbnails to slide vertically instead of horizontally. How do I do it? I did change some x and y values but have not managed to get the result.....totally new with programming!! Please help!!
Thanks a lot!
View Replies !
View Related
Flash 8 Sliding Thumbnails...
Hi
Can any one help me understand why this code isnt working...
I followed a video tutorial rigouroulsy but i cant get the thumbnails to slide
panel being the instance name of the thumbnails movie clip
stroke being the name of the bounding movie clip
panel.onRollOver = panelOver;
function panelOver() {
this.onEnterFrame = scrollPanel;
delete this.onRollOver;
}
var b = stroke.getBounds(thumbs);function scrollPanel() {
if (_xmouse<b.xmin || _xmouse>b.xmax || _ymouse<b.ymin || _ymouse>b.ymax)
this.onRollOver = panelOver;
delete this.onEnterFrame;
}
if(panel._x >= 13) {
panel._x = 13;
}
if(panel._x <= -3233) {
panel._x = -3233;
}
var xdist = _xmouse - 246.6;
panel._x += -xdist / 7;
the guy in the video was working in MX and i have flash 8 is that a problem?
the build is here if you wanna check it out
http://www.victoriacharlesphotography.co.uk/VCP in the portfolio section
thanks in advance
Greg
View Replies !
View Related
Sliding Thumbnails And Nested Swf In AS2.0
Ok this is something I have done many times before, but now its giving me a bit of a problem. I'm putting a nested swf in a gallery, which slides left and right. When I play the swf with the thumbnails, the functionality runs fine, however when loaded in, it doesn't work at all.
code here:
Code:
if(this._xmouse>=0 && this._xmouse<=600 && this._ymouse>=0 && this._ymouse<=400){
onEnterFrame = function(){
slider._x -= (this._xmouse-300)/10;
}
}
do I need to relate the mouse tags to the root of the gallery? This makes it a bit more complicated because then i need to find the coords of the mouse relative to where the swf gets loaded in. Is it possible to just translate the coords of the swf?
View Replies !
View Related
Sliding Thumbnails With Throttle Acceleration V0.7 (with Zip)
I'm excited - I have been working on this for a while and it is starting to behave as I intended. AND since you all have been so helpful by posting and commenting on this website, I would like to share this with all of you! What do you think? Please post comments (good and bad). See attached file.
Features
This is a sliding thumbnail viewer that is supposed to mimic the cool transition effects found on websites. Two 'throttling' areas at either end (sizes changable)
Mouse controlled speed - as the mouse reaches the ends of 'throttle' areas, the thumbs will speed up to a percentage of the MAX_SPEED (defined as TARGET_SPEED)
Thumbnails will accelerate upon entering viewer
Thumbnails will decelerate upon exiting viewer
Wish list. I wish.. ..thumbnails would automatically detect when they are reaching the boundaries of the mask and decelerate to their "exact" respective left and right boundary.
..the thumbnails would 'snap' decelerate so that the thumbnails are never cut off.
Please feel free to post code that will help with the wish list !
Concerns I think this code is not a clean as it can be. Does anyone agree? I guess the best thing to do is to make this a class file, but I am not very confident in doing that.
The code is not using Penner easing or any other easing, I just winged it. Should I use Penner easing? If so, how do I implement?
The code
ActionScript Code:
/*
this mc reads the mouse location and accelerates the thumbnail movie called
(ThumbMaker_mc) movie left or right depending on the mouse location on the mask
Rob DiNardo - [url]http://www.robdinardo.com[/url]
*/
//make some thumbnails
for(i=0;i<30;i++){
ThumbMaker_mc.attachMovie("ThumbImg_mc",["ThumbImg_mc"+i],i);
ThumbMaker_mc["ThumbImg_mc"+i]._x = i * 135;
ThumbMaker_mc["ThumbImg_mc"+i].count_txt.text = i; //not working ????
}
var boundL:Number = 300; //left bounding area: 0 to boundL
var boundR:Number = 360; //right bounding area: boundR to 660
var CURRENT_SPEED:Number = 0; //variable for current speed
var TARGET_SPEED:Number; //variable for desired speed
var MAX_SPEED:Number = 15; //maximum possible speed
var ACCELERATION:Number = 0.25; //ratio of acceleration (also used to declerate)
var DIRECTION:String = "L"; //variable for the direction of the motion
var THUMB_WIDTH:Number = ThumbMaker_mc._width; //width of all thumbnails
var MASK_WIDTH:Number = mask_mc._width; //width of mask
var SCROLL_WIDTH:Number = MASK_WIDTH-THUMB_WIDTH; //
this.onEnterFrame = function(){
// if the mouse pointer enters thumb viewer
if(mask_mc.hitTest(_root._xmouse, _root._ymouse, false)){
MOUSE_LOC = Math.round(this._xmouse); //mouse location
//if the mouse is in the left part of the navigation
if(MOUSE_LOC < boundL){
if(ThumbMaker_mc._x > -50) {
DecelerateThumbs()
} else {
THROTTLE = (boundL-MOUSE_LOC)/(boundL-0); //percent
TARGET_SPEED = Math.round(THROTTLE * MAX_SPEED,2); //desired speed
DIRECTION = "R"; //direction to move thumbs
AccelerateThumbs(TARGET_SPEED); //move thumbs right
}
}
//if the mouse is in the right part of the navigation
if (MOUSE_LOC > boundR) {
if(ThumbMaker_mc._x < SCROLL_WIDTH + 50) {
DecelerateThumbs()
} else {
THROTTLE =(MOUSE_LOC-boundR)/(MASK_WIDTH-boundR); //percent of speed
TARGET_SPEED = Math.round(THROTTLE * MAX_SPEED,2); //desired speed
DIRECTION = "L"; //direction to move thumbs
AccelerateThumbs(TARGET_SPEED); //move thumbs left
}
}
} else {
DecelerateThumbs();
}
};
function AccelerateThumbs(ts:Number){
if (DIRECTION == "L"){ j = -1; } else { j = 1; } //set direction
if(CURRENT_SPEED <= ts){ //check current speed
ThumbMaker_mc._x += j*CURRENT_SPEED; //move the thumbnails to the left
CURRENT_SPEED += ACCELERATION; //increment current speed
} else { //if target speed reached
ThumbMaker_mc._x += j*ts; //contiue moving at target speed
CURRENT_SPEED = ts;
}
}
function DecelerateThumbs(){
if (DIRECTION == "L"){ j = -1; } else { j = 1; } //set direction
if(CURRENT_SPEED > 0){ //if in motion
ThumbMaker_mc._x += j*CURRENT_SPEED; // move the thumbnails to the left
CURRENT_SPEED -= ACCELERATION*3; //decrease speed
}
}
View Replies !
View Related
Sliding Thumbnails In A Grid XML Gallery?
Does anyone out there have code for an XML gallery that arranges the sliding thumbs in a grid of many rows and columns instead of a single row?
Something like this...
I've been searching all day for something like this, but haven't been able to find it. Maybe I've just missed it. Any help you can give pointing me in the right direction would be truly appreciated.
Thanks.
View Replies !
View Related
[F8] Sliding Horizontal Scrolling Image Gallery With Thumbnails Along The Bottom
Hi
I've been looking for a tutorial for ages to show me how to create an image gallery but can't find one.
Along the bottom of the screen would be thumbs of each individual image. When the user clicks on a thumb the a large row of images would slide across bringing the appropriate image into view.
Basically similar to the following site but with images instead of text:
http: //www.artnomad.com/marlon/ (press 1, 2 and 3 in the circles)
Can anyone describe or post some links here to any tutorials describing how to make this.
Thanks in advance
View Replies !
View Related
Thumbnails Tutorial - How Can I Make The Thumbnails Scroll By Default?
i have modified the xml photogallery on my site as i only want to use the scrolling thumbnail component but as a tool to scroll images.
2 modifications i would like to make that have me stuck!
1) how can i make the thumbnails scroll by default on load?
2) how can i add a little preloader within the empty thumbnail holder movieclip? i am loading the main gallery images directly into this clip rather than using it to display thumbnails
many thanks in advance if you can help!
natalie
View Replies !
View Related
Slideshow: Sliding Images. Repeat Sliding After Last Image
Hello.
Scenario:
I have 5 images. With a setInterval I slide the images - back-to-back - from left to right under a window (mask). When the last image is under the mask, I'm trying to figure out a way to start over again. So that when the last image is sliding out, the first image is sliding in, thus retarting the slideshow.
I figured the best way to do this is to 'move' the image that last moved out of the mask before the other images. So if im1 move out of the mask, im2 move into the mask, im1 would move to position itself after im5 (since I have 5 images.)
The problem. How to tell flash to move the image that slides out to move to a position after all my images.
im5-im4-im3-im2-im1 becomes im1-im5-im4-im3-img2
Each image is 80 pixels wide.
Any help is much appreciated.
Thanks,
/Flip
View Replies !
View Related
Sliding Menu - Need MC To Play After Sliding Has Finished
Hi,
I have created a Sliding Menu with about 12 sections. In one of the section/s I have a MC inside that I want to play. Is there a way to tell a MC to play once sliding has completed? Say based on pixel position (of the sliding MC) or something similar?
At the moment I'm using "on release" but with this method, the animation starts too early. (By the time you slide from section 1 to 12 the MC has already started playing)...
Any ideas?
Thanks in advance!!
View Replies !
View Related
Sliding In/sliding Out Images Using Actionscript
I know I should probably know how to do this by know but I'm stuck.
How do I create this effect using Actionscript?
http://synap-sys.com/in_out_slide.html
When a user clicks on button "1" the image slides in from the left. When the user chooses to view image "2" image one slides out of the way and image two then slides in. I would like to do this using Actionscript because there's going to be a bunch of pictures that are part of this slideshow. It's how to tell the Flash player how to slide out the current image and slide in the new image that I'm struggling with. Forgive my lameness.
I'm also trying to do this without dynamically loading each image everytime they click on a button. The reason for this is so all the images load at once, thereby eliminating the delay that would occur as each image loads after a user clicks a button. A fellow Flashkit member(Garbage) suggested I do this using a Library clip (all the images placed on a keyframe of a movieClip that are referenced per button click) but I'm not sure how to do this (goToAndPlay?).
Any help or guidance would be most appreciated.
I've attached the .fla if anybody wants to look at it.
Thanks
Adam
View Replies !
View Related
Sliding Nav ( Can You Make It Stop Sliding)
*USING FLAH MX
Hello Im having some issues trying to get this sliding nav to stop sliding.
I was referenced this file
http://www.flashkit.com/movies/Scrip...y-87/index.php
It seems to be controled with a button called tracker but I cant get the nave to stop sling on roll out (also the text fields in this fla are not needed)
The effect I want to achieve can be found on this site
http://www.theopiumgroup.com/index2.html
If you click mansion and then click info you will see how they set up there sub navigation
Any help would be great,thank you in advance
View Replies !
View Related
[F8] Sliding Interface With Sliding Buttons
I'm trying to get a sliding interface going with the buttons (that move the interface) moving along with it.
At the moment it looks like this: http://www.flashvista.com/details/item/746/
I got there by following by following the first page of this:
http://www.peachpit.com/articles/article.aspx?p=26319
Basically I want to encorporate the buttons with the interface images.
I tried putting the buttons in with the images_MC, but nothing happens with you click the button.
Whats the easiest way to make this work?
thanks
View Replies !
View Related
Extra Thumbnails To "Adding Thumbnails"
I've searched the forum but there is not a certain solution. (http://www.kirupa.com/forum/showthre...tra+thumbnails)
I am trying to add the gallery extra thumbnails to use as extra information. Shortly trying to make a little thumbnail which will be change when clicked the main thumbs as the example below..
Thanks for your help if u can...
View Replies !
View Related
Thumbnails?
how do i make thumbnails? - i have all the photos i want already out on the page, but i want to make them clickable into their full size in a separate window. how do i do this?
View Replies !
View Related
Help With Thumbnails...please
I'm trying to make a thumbnail picture of a web site of mine for my portfolio and am having trouble keeping the image clear. What I'm doing is taking a screen shot of my site and then cropping a section of it and then resizing it to 73x46 pixels. However once I do that the quality goes down the drain. Is there any way to keep the quality? I'd like the quality to be like it is on www.2advanced.com under their portfolio page...
Thanks for the help
View Replies !
View Related
Thumbnails
Hi, how can i make my jpegs into thumbnails, and when i do make then into thumnails, and place then in my scene, how can i make it so when somebody clicks the picture, it can be opened BIGGER in a new window?
View Replies !
View Related
Thumbnails
I have a whole bunch of thumbnails set up. In the file have a a lot of movie clips there having jpg.s loaded into them. I was wondering there is an easier way to change these pictures. I have seen things where xml files control it, but I don't know xml. i have some components too, but I can't set those up the way i want to i was wondering someone can help me an explain how I can make it get the picutres from an xml file or somewhere else.
View Replies !
View Related
Thumbnails
I'm trying to incorporate a bunch of thumbnail pictures on my site. I want to just place the pictures on a page and have people click on them and once clicked it will open up the full picture view on a seperate html page. I know there is probably an easy actionscript way to do this, can someone please help me out here? Thanks
sly
View Replies !
View Related
Thumbnails
I'm trying to incorporate a bunch of thumbnail pictures on my flash site. I want to just place the pictures on a page and have people click on them and once clicked it will open up the full picture view on a seperate html page. I know there is probably an easy actionscript way to do this, can someone please help me out here? Thanks
sly
View Replies !
View Related
Thumbnails
hey,
i needed sum help,
ive made a page of small thumbnails
and when the user clicks on any of the numbnails
i want it to open up in internet explorer,
btw the thumnails and the actual full size pix
are differenet, meaning i had make sure the size was
small for the thumbnails, so i named them like this
thumbnail BBA.gif
fullsize BBA.jpg
hope it makes sense
take care
View Replies !
View Related
Thumbnails
i have a menu of photos thumbnailed and i want to set it up so that when you click on one to view it the alpha of the thumb changes and stays...any ideas?
xxxjosh
View Replies !
View Related
XML Thumbnails
I am wanting to have images loaded into flash via XML along with a corosponding thumbnail so when a user clicks on a thumnail that image comes up. Now getting the images into a standard click through format has not been a problem.
I have found plenty of tutorials on that but none on loading a corosponding thumbnail. Can somebody point me in the right direction (please don't say search the tutorials I have a number of times).
I also want to have the images loading in the background or at least be able to have a loading bar. Help on this would be appreciated to.
Thanks in advance.
View Replies !
View Related
Thumbnails And XML
Hi,
I have some thumbnails, into which I am loading .jpg by XML.
When I try the project on website, sometimes the pictures get loaded all, sometimes only some of them. Everytime it's the different ones. Does someone know, why is it happening???
View Replies !
View Related
Need Second Row Of Thumbnails
Hi,
I have a function that creates empty movie clips for thumbnails. Right now, it only works for a limited number of thumbs because they all get placed on the stage in a line. I'm wanting to redo it so that when the number of thumbs hits a certain number -- say 5 -- it will start a new line. I already have a variable earlier in the script that will give me the number of thumbs -- it's called totalSlides -- but I can't figure out how to use it to get the function to create a second row. Here's the function:
Code:
function makeThumb(newThumbNode, index) {
imagePath = newThumbNode.attributes.thumb;
this.createEmptyMovieClip("thumb_mc" + index, index);
with (this["thumb_mc" + index]) {
var my_fmt:TextFormat = new TextFormat();
my_fmt.font = "Verdana";
my_fmt.size = 8;
my_fmt.color = 0xffff33;
createTextField("slide_txt", index, 6, 35, 50, 20);
slide_txt.setNewTextFormat(my_fmt);
slide_txt.text = "~" + (index + 1) + "~";
_x = 250 + (35 * index);
_y = 80;
createEmptyMovieClip("holder_mc", -1);
holder_mc.loadMovie(imagePath);
}
View Replies !
View Related
Thumbnails
I need help with thumbnails.
I have a photo gallery and I want to be able to have thumbnails of the images I want. And then when you click them the image opens up in a new window with the full enlarged version.
I'm using flash 5.
Can someone help me?
Thanks
View Replies !
View Related
Thumbnails
Hello,
I'd like to know how the thing, that I am now going to explain on the site www.designlicks.com, is made.
There is a several amount of thumbnails. Their number depends on the screen resolution or on the size of the window.
Anytime the screen resolution or the size of the window get smaller, the amount of those thumbnails gets smaller, too and the rest of them
moves to the other page, therefore you have to keep clicking button "next" to see all of them (thumbnails)
at the end. The question is, how this all is made. Thank you very much for any possible help. I will appreciate it.
View Replies !
View Related
Please Help Me With These Thumbnails
Hi all,
I am a photographer and I bought a one of those flash templates. I figured out everything except I need to know how to duplicate these buttons. The problem is that they arnt made as a button it looks like script. All the thumbnails reference to another swf file. What I would like to do is add another row of thumbs on the top.
Please check it out and also let me know what you think.www.paulwongphoto.com
Thanks in advance any help would be appreciated,
PaulWongPhoto
View Replies !
View Related
Thumbnails In Xml
I have thumbnails saved on my server that are listed in my xml code...
When i call themfrom the XML i cant seem to assign them a GETurl(); link..
PLEASE HELP!
ANY ideas!?
Anyone!?
Please!?
Code:
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function(success)
{
var everything = this.childNodes;
var top5 = everything[0].childNodes;
var should_be_five = top5.length;
var buffer:Number = 20;
var inbetween:Number = 40;
var xpos:Number = 565;
for(var i:Number=1;i<should_be_five+1;i++)
{
var thu = attachMovie("thumb","top_"+i,i+30);
thu._height = 40;
thu._width = 70;
thu._x =xpos;
thu.theNumber = i;
thu.loadMovie(top5[(i-1)].attributes.path);
thu.onRelease = function(){getURL(top5[(i-1)].attributes.link,"_self");}//<------THIS is the bastard!!!HELP!!!
thu._y =((i-1) * (thu._height+inbetween))+buffer;
thu.thename = top5[(i-1)].attributes.name;
}
}
xml.load("top5.xml");
View Replies !
View Related
[CS3] Thumbnails
Hello Folks,
I am trying to customize some code for a gallery. I bought and re-coded a gallery for a portion of my portfolio. Now am taking this same gallery and changing it for my photography portfolio. I am able to realign and target the large images but am having problems changing the thumbs from a horizontal scrolling action to a simple grid of thumbs that will pop on stage when a button is clicked and go away when thumb is selected. I am trying to mimic this site.
http://www.cake-factory.com/#/bob-martin/12/
Here is the unedited code:
PHP Code:
//////////////////////////////////////////////////////////////////////////////
//IMAGE THUMSNAIL AND KEY CONTROLLER SETTING//////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
function loadXML(loaded)
{
if (loaded)
{
xmlNode = this.firstChild;
image = [];
thumbnails = [];
heading = [];
description = [];
url = [];
total = xmlNode.childNodes.length;
for (i = 0; i < total; i++)
{
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
thumbnails[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
thumbnails_fn(i);
heading[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[3].firstChild.nodeValue;
url[i] = xmlNode.childNodes[i].childNodes[4].firstChild.nodeValue;
} // end of for
firstImage();
}
else
{
content = "eror loaded...";
} // end else if
} // End of the function
//////////////////////////////////////////////////////////////////////////////
function nextImage()
{
if (p < total - 1)
{
++p;
if (loaded == filesize)
{
picture._alpha = 0;
picture.loadMovie(image[p], 1);
title_txt.text = heading[p];
desc_txt.text = description[p];
picture_num();
} // end if
}
else if (p == total - 1)
{
p = 0;
if (loaded == filesize)
{
picture._alpha = 0;
picture.loadMovie(image[p], 1);
title_txt.text = heading[p];
desc_txt.text = description[p];
picture_num();
} // end if
} // end else if
} // End of the function
//////////////////////////////////////////////////////////////////////////////
function prevImage()
{
if (p > 0)
{
--p;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
title_txt.text = heading[p];
desc_txt.text = description[p];
picture_num();
}
else if (p == 0)
{
p = total - 1;
if (loaded == filesize)
{
picture._alpha = 0;
picture.loadMovie(image[p], 1);
title_txt.text = heading[p];
desc_txt.text = description[p];
picture_num();
} // end if
} // end else if
} // End of the function
//////////////////////////////////////////////////////////////////////////////
function firstImage()
{
if (loaded == filesize)
{
picture._alpha = 0;
picture.loadMovie(image[0], 1);
title_txt.text = heading[p];
desc_txt.text = description[0];
picture_num();
} // end if
} // End of the function
//////////////////////////////////////////////////////////////////////////////
function picture_num()
{
current_pos = p + 1;
pos_txt.text = current_pos + " / " + total;
} // End of the function
//////////////////////////////////////////////////////////////////////////////
//THUMBSNAIL RGHT LEFT CONTROLLER////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
function thumbNailScroller()
{
_root.infoAContainer_mc.imagesMC.imagestab.createEmptyMovieClip("tscroller", 1000);
_root.infoAContainer_mc.imagesMC.imagestab.tscroller.onEnterFrame = function ()
{
if (_root.infoAContainer_mc.imagesMC.imagestab._ymouse >= _root.infoAContainer_mc.imagesMC.imagestab.thumbnail._y && _root.infoAContainer_mc.imagesMC.imagestab._ymouse <= _root.infoAContainer_mc.imagesMC.imagestab.thumbnail._y + _root.infoAContainer_mc.imagesMC.imagestab.thumbnail._height)
{
if (_root.infoAContainer_mc.imagesMC.imagestab._xmouse >= _root.infoAContainer_mc.imagesMC.imagestab.hit_right._x - 95 && _root.infoAContainer_mc.imagesMC.imagestab.thumbnail.hitTest(_root.infoAContainer_mc.imagesMC.imagestab.hit_right))
{
_root.infoAContainer_mc.imagesMC.imagestab.thumbnail._x = _root.infoAContainer_mc.imagesMC.imagestab.thumbnail._x - thspeed;
trace("yes")
}
else if (_root.infoAContainer_mc.imagesMC.imagestab._xmouse <= 75 && _root.infoAContainer_mc.imagesMC.imagestab.thumbnail.hitTest(_root.infoAContainer_mc.imagesMC.imagestab.hit_left))
{
_root.infoAContainer_mc.imagesMC.imagestab.thumbnail._x = _root.infoAContainer_mc.imagesMC.imagestab.thumbnail._x + thspeed;
trace("no")
} // end else if
}
else
{
delete _root.infoAContainer_mc.imagesMC.imagestab.tscroller.onEnterFrame;
} // end else if
};
} // End of the function
//////////////////////////////////////////////////////////////////////////////
//THUMNAILS SELECT CONTROLLER////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
function thumbnails_fn(k)
{
_root.infoAContainer_mc.imagesMC.imagestab.thumbnail.createEmptyMovieClip("t" + k, _root.infoAContainer_mc.imagesMC.imagestab.thumbnail.getNextHighestDepth());
_root.infoAContainer_mc.imagesMC.imagestab.tlistener = new Object();
_root.infoAContainer_mc.imagesMC.imagestab.tlistener.onLoadInit = function (target_mc)
{
target_mc._x = _root.infoAContainer_mc.imagesMC.imagestab.hit_left._x + (target_mc._width + 1) * k;//Distance between thumb images. //
target_mc.pictureValue = k;
target_mc.onRelease = function ()
{
p = this.pictureValue - 1;
nextImage();
};
target_mc.onRollOver = function ()
{
target_mc._alpha = 50;//thumbsnail alpha rollover
thumbNailScroller();
};
target_mc.onRollOut = function ()
{
target_mc._alpha = 100;//thumbsnail alpha rollout
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(_root.infoAContainer_mc.imagesMC.imagestab.tlistener);
image_mcl.loadClip(thumbnails[k], "_root.infoAContainer_mc.imagesMC.imagestab.thumbnail.t" + k);
} // End of the function
//////////////////////////////////////////////////////////////////////////////
//LOAD XML SETTING///////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
//////////////////////////////////////////////////////////////////////////////
//right left key controller///////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
listen = new Object();
listen.onKeyDown = function ()
{
if (Key.getCode() == 37)
{
prevImage();
}
else if (Key.getCode() == 39)
{
nextImage();
} // end else if
};
Key.addListener(listen);
arrowspeed = 4;
//////////////////////////////////////////////////////////////////////////////
previous.onRelease = function ()
{
prevImage();
};
//////////////////////////////////////////////////////////////////////////////
next.onRelease = function ()
{
nextImage();
};
//////////////////////////////////////////////////////////////////////////////
///thumbs image view rol over out ////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
tabspeed = 5;
imagestab.onLoad = function ()
{
imagestab.destinY = 330;//thumb origin along with Image Stab Mask //
};
imagestab.onEnterFrame = function ()
{
imagestab.y = imagestab.destinY - imagestab._y;
imagestab._y = imagestab._y + imagestab.y / tabspeed;
if (_root._ymouse >= 316)
{
imagestab.destinY = 330;//thumb origin along with Image Stab Mask //
} // end if
if (_root._ymouse <= 240)
{
imagestab.destinY = 330;//thumb origin along with Image Stab Mask //
} // end if
};
//////////////////////////////////////////////////////////////////////////////
imagestab.tabbtn.onRollOver = function ()
{
imagestab.destinY = 278;//Adjusts thumbnail holder up and down//
};
//////////////////////////////////////////////////////////////////////////////
//Link blank self controller/////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
urLLink.onRelease = function ()
{
getURL(url[p], "_blank");
};
p = 0;
_root.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 = picture._alpha + 10;
} // end if
} // end else if
if (url[p] != null && url[p] != " " && url[p] != undefined)
{
urLLink._visible = true;
}
else
{
urLLink._visible = false;
} // end else if
};
thspeed = 7;
//////////////////////////////////////////////////////////////////////////////
//end/////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
View Replies !
View Related
Thumbnails - XML
Hi all.
As you can see from my many recently-posted topics, I'm trying to reate a picture gallery.
Well, I had a LOT of problems so far.
I need some real help I guess.
Here is what I need;
SWF will read the XML and get these informations:
name (picture name)
url (picture url)
turl (thumb url)
details (extra information)
When the gallery is opened, it will start to put 50*50 thumbnails until it reaches to a certain width (at total)
Then it'll start to create the second line.
Once the stage is resized (yeah, that certain width) it will re-calculate and re-set all the thumbnail locations.
This is what I need, and I'm (unluckily) working on it for the last few days. No hope so far.
I know these things are not that hard to code, I thought some may help.
thank you.
View Replies !
View Related
Thumbnails
I need a way to list thumbnails on my flashmovie.
All of my pics are in a directory called /images
Their name look like this: image9_2.jpg
Where 9 stands for the gallery and the 2 stands for number of the pic.
In some galleries there are gaps between the numbers, so it can look like this
(for gallery #9):
image9_0.jpg
image9_2.jpg
image9_5.jpg
image9_6.jpg
But like I said ALL images are in the same directory (/images).
So basicly what i need is a script that lists all the thumbs belonging to a certain gallery. If someone wants to browse gallery 9 all pictures with the name image9_x.jpg shall be listed as thumbs.
And I dont need any real thumbnails, simple resizing will be good enough here.
Lets say width 60px.
And i need to be able to set maxiimum thumbs on every row.
And every thumb must be clickable as you understand.
Would be very glad if someone with the knowledge could help me with this one.
Thanks.
View Replies !
View Related
FLV Thumbnails
hi sorry to ask this again but im having trouble getting inhan's code to work . Can anyone tell me how to load a preview of the flv ive included into the movieclip Thumbnail ?
Thanks
View Replies !
View Related
Thumbnails In A Row...
Hi
I use this code to try to create a photo thumbnail slider from an array loaded with the images names. The problem is that I can create one thumbnail with my code as shown, but I get in trouble when I try to make thumbnails of more than one image from the array. How should I work around this?
I want the thumbnails to create a nice row, that I can use in a "infinite image slider"...
regards, henrik
Code:
//image array
//the array that holds the images names
imgArray = _root.getCurrentArray();
//the path to the images folder
imgFolder = _root.getCurrentImgFolder();
size = imgArray.length;
//image nr:
imgIndex = 0;
//load first image
loadThumb();
//load thumbnail------------------------------------
function loadThumb(){
// make a movieclip for each of the jpeg's
mc = this.createEmptyMovieClip("thumbnail",1);
//placement
mc._x = imgIndex*42;
mc._y = 0;
// load in the jpeg
mc.loadMovie(imgFolder+imgArray[imgIndex]);
}
// preload the jpeg
this.onEnterFrame = function () {
// preload the picture
if (mc.getBytesTotal()>4&&mc.getBytesLoaded()>=mc.getBytesTotal()) {
//pic has loaded in completely
mc._width = 50;
mc._height = 50;
delete mc.onEnterFrame;
}
}
View Replies !
View Related
Thumbnails And XML
Hi,
I have some thumbnails, into which I am loading .jpg by XML.
When I try the project on website, sometimes the pictures get loaded all, sometimes only some of them. Everytime it's the different ones. Does someone know, why is it happening???
View Replies !
View Related
Thumbnails
Hi, everyone!
I have made a photogallery with thumbnails based on tutorial http://www.kirupa.com/developer/mx2004/thumbnails.htm
But there is one thing I'd like to add.
I'd like that thumbnail when it is loaded would get the effect like fade in.
In other words... when thumnail is starting to load the alpha=0, but when it is loaded alpha=100, and to add to this motion some speed.
I dont know does anybody understood what I just said , but I hope somebody could help me.... Please!!!
View Replies !
View Related
XML Thumbnails Help
Hi everyone,
Ok, I put together a pretty neat XML gallery, but I was wondering if there was anyway to change the code so that upon clicking on the thumbnail it would load the actual picture in a blank browser. like when you click on a picture in a regular html website.
I know that you can do it by manually saying getURL(http://www.bla.com, _blank); or whatever - but yeah I was wondering if you can code it to load from XML.
is this impossible?
here is the code for the gallery--
Code:
stop();
var thumb_spacing = 51;
var columns = 6;
//variable we need later if we switch galleries to remove the old thumbs
var curLength;
var description_lv = new LoadVars();
description_lv.onData = function(raw_text) {
description_txt.text = raw_text;
};
function GeneratePortfolio(portfolio_xml, d) {
//remove the old thumbs
for (var i = 0; i<curLength; i++) {
menu_mc["thumbnail_mc"+i].removeMovieClip();
}
//unload the last big picture
image_mc.unloadMovie();
var portfolioPictures = portfolio_xml.firstChild.childNodes[d].childNodes;
galleryInfo.text = portfolio_xml.firstChild.childNodes[d].attributes.title;
for (var i = 0; i<portfolioPictures.length; i++) {
var currentPicture = portfolioPictures[i];
var currentThumb_mc = menu_mc.createEmptyMovieClip("thumbnail_mc"+i, i);
currentThumb_mc._x = (i%columns)*thumb_spacing;
currentThumb_mc._y = Math.floor(i/columns)*thumb_spacing;
currentThumb_mc.createEmptyMovieClip("thumb_container", 0);
currentThumb_mc.thumb_container.loadMovie(currentPicture.attributes.thumb);
currentThumb_mc.title = currentPicture.attributes.title;
currentThumb_mc.image = currentPicture.attributes.image;
currentThumb_mc.description = currentPicture.attributes.description;
currentThumb_mc.onRollOver = currentThumb_mc.onDragOver=function () {
info_txt.text = this.title;
};
currentThumb_mc.onRollOut = currentThumb_mc.onDragOut=function () {
info_txt.text = "";
};
currentThumb_mc.onRelease = function() {
loadPic(this.image);
description_lv.load(this.description);
};
}
//set curLength
curLength = portfolioPictures.length;
}
function loadPic(pic) {
image_mc.loadMovie(pic);
var temp = this.createEmptyMovieClip("tmp", 9999);
temp.onEnterFrame = function() {
var t = image_mc.getBytesTotal();
var l = image_mc.getBytesLoaded();
if (t == l && t>4) {
delete this.onEnterFrame;
}
};
}
//function to choose a gallery
function galleryChoice(d) {
var portfolio_xml = new XML();
portfolio_xml.ignoreWhite = true;
portfolio_xml.onLoad = function(success) {
if (success) {
GeneratePortfolio(this, d);
} else {
trace("Error loading XML file");
}
// no success? trace error (wont be seen on web)
};
portfolio_xml.load("portfolio.xml");
}
//start with first gallery
galleryChoice(0);
//buttons to choose a new gallery
but1.onRelease = function() {
galleryChoice(0);
};
but2.onRelease = function() {
galleryChoice(1);
};
Click here for the XML
and if you really wana see what the gallery looks like now - Click here
Thanks in advance for any help !!!! ^_^
View Replies !
View Related
XML Thumbnails
I've been trying to get this to work for ages so can any one help?
I've got a xml file which i want to load images into flash.
I'm trying to get it to load a grid of 2 images by 5 images on the left hand side of the screen.
can any one help?
View Replies !
View Related
XML With Thumbnails
Hi all, I've just worked through the XML photo gallery with thumbnails tutorial but I'd like to try it with the thumbnails as a grid, as mentioned on the first page. Could anyone help me out with this?
View Replies !
View Related
Thumbnails
hi
could anyone tell me how to make thumbnails in a grid . I know there is a thunmbnail tutorial but that is for the slider. Could anyone help me with the grid .
Thanx a ton
View Replies !
View Related
Thumbnails
Im new to Flash 8, and I'm working in this template and I have about 12 pictures that im trying to make thumnails out of. I have them in a row of 3x4 but I dont know how to make it so when you click them it enlarges them in another window. Any feedback would be greatly appreciated.
View Replies !
View Related
Thumbnails And XML
I'm trying creating thumbnails using XML and being helped by this tutorial. I didn't copy the code exactly as they did because my system is more complicated (having different categories, and those are thumbs for projects and not for 1 file each, and a file can be mp3, jpg etc. so I have a special MC that analiases it and then run it appropriately), so this is what I got, yet it doesn't work and it seems it doesn't manage to create thumbHolder.
ActionScript Code:
import com.xfactorstudio.xml.xpath.*;import mx.utils.Delegate; //helps to manage scope issues within callback functionsvar thumbSpace:Number = 16;var edge:Number = (Stage.width - 800 - 9 *thumbSpace)/2 ;var prjName:Array;var prjThumb:Array;var prjInfo:Array;var maxProjects:Number;mainXML = new XML();mainXML.ignoreWhite = true;mainXML.load("Database.xml");mainXML.onLoad = function() { prjName = XPath.selectNodes(mainXML, ("/Portfolio/" + category + "/Project/@Name")); prjThumb = XPath.selectNodes(mainXML, ("/Portfolio/" + category + "/Project/@Thumbnail")); prjInfo = XPath.selectNodes(mainXML, ("/Portfolio/" + category + "/Project/@Information")); maxProjects = prjName.length; for (i=0; i<maxProjects; i++) { this.thumbHolder = this.createEmptyMovieClip("thumbnail"+i, i); this.thumbHolder._x = edge + 80 * (i+1) + thumbSpace * i; this.thumbHolder._y = Stage.height - 80 - thumbSpace; trace (this.thumbHolder._x + " " + this.thumbHolder._y); this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail_image", 0); this.thumbLoader.loadMovie("projects/" + category + "/" + prjThumb[i]); this.thumbHolder.onRelease = function() { trace ("bap"); }; };}stop();
By the way, this code is in the Thumbnails' movieclip and not in the root.
View Replies !
View Related
Thumbnails
trying to work out if there is a way to do the following.
i've modified the thumbnail gallery on here (http://www.kirupa.com/developer/mx2004/thumbnails.htm)
was just wondering if there is some actionscript that will search through the thumbnails once they have loaded for a set variable and scroll automatically to that one instead of staying at the begining?
View Replies !
View Related
Thumbnails Tut Help
I'm using this tut. http://www.kirupa.com/developer/mx2004/thumbnails.htm
I have it working but the bottom thumbs part. I can't get it to slide. All I did is move it to a different spot on the stage. And now it doesn't work.
I've uploaded the files if someone would please take a look and let me know what I did wrong...
thanks
View Replies !
View Related
Thumbnails
does anybody know how I can create dynamic thumbnails when only rollover action by the mouse will reveal the picture behind the patterns such as in the website below
http://www.gilluminate.com/
View Replies !
View Related
Thumbnails
hello,
i modified the thumbnail gallery
http://www.kirupa.com/developer/mx2004/thumbnails.htm
and everything works great, but i found one bug, so i hope you could help me...
i made my gallery 100% across the screen, and when i do that, the thumbnail scroller doesn't work...
i found a solution, i centered my swf with tables in html, and then the scroll does work, but i want it 100% across the screen..so i can position some other stuff with stage.width & stage.height
View Replies !
View Related
|