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




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!



FlashKit > Flash Help > Flash ActionScript
Posted on: 12-14-2005, 02:49 PM


View Complete Forum Thread with Replies

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

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.

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

Thumbnail Rows/Columns Generation Through XML Problem
I've been looking through some topics and tutorials to see if I could find anything that would improve my grasp on this subject. I'd like to ask for suggestions as well as present my problem.

I am attempting to create an Image Gallery but to be more specific, right now I am trying to get through the generation of thumbnails. The Thumbnail grid will always be 5 Columns by 3 Rows and the amount of Images passed into an array might change. So keeping that in mind, eventually I will create a page system (but not yet, want to get through this first part).

So far this AS code speaks to the MC imageSection and within it to another called thumbMC. I am duplicating this thumb but I can't seem to get the rows/columns correct. I am confused mainly on the understanding of how I should go about doing this. Suggestions are very welcome. I would really like to know what other approach I can make.

Here is the AS so far (XImages is an array holding the image's thumburl, imageurl and description) to give you an idea of my approach so far:

Code:
function loadViewer() {
var nSpacing = 94;
var j:Number = 0;
var p:Number = 0;
var nRows = 3;
var nColumns = 5;
var nTotal = XImages.length;
var d = imageSection.getNextHighestDepth();
for (var i:Number = 0; i<XImages.length+1; i++) {
imageSection.thumbMC.duplicateMovieClip("thumbMC"+i, d++);
if (j<nColumns) {
imageSection["thumbMC"+i]._x = (nSpacing*i)+nSpacing/2;
j++;
} else {
//imageSection["thumbMC"+i]._x = nSpacing/2;
if (p<nRows) {
imageSection["thumbMC"+i]._y = (nSpacing*p) + nSpacing*1.4;
p++;
trace(j);
trace(p);
j = 0;
trace(j);
}
}
trace("IMAGE ("+i+") X Value ("+_root.imageSection["thumbMC"+i]._x+")");
trace("IMAGE ("+i+") Y Value ("+_root.imageSection["thumbMC"+i]._y+")");
}
}

Changing Rows And Cols In Xml Thumbnail Grid
I am using Ben Cline's xml thumbnail grid, and I can't for the life of me figure out how to change the number of columns.
Any help appreciated.
I'm only posting the first half of the code.

Code:
// ===============================================================================================================================================

// code by Ben Cline November, 2006 - http://www.bencline.net

// ===============================================================================================================================================

import mx.transitions.Tween;
import mx.transitions.easing.*;
import flash.filters.BlurFilter;

// ===============================================================================================================================================

// + + + VARIABLES + + + + + +

// ===============================================================================================================================================

var path : String = "photos.xml"; // path used for the xml, but for source code, I've included the xml file
var xmlThumb : String; // url for the thumbnails
var thumbString : String = "LOADING THUMBNAILS"; // string called before the first thumbnail is loaded
var dupThumb : String;
var s : Number = 2; // spacing between the thumbnails
var rows : Number = 10; // number of rows
var curr : Number = 0; // current thumb
var currAn : Number = 0; // var for counting through the animation sequences
var cols : Number; // number of columns
var tW : Number = 100; // thumb width
var tH : Number = 100; // thumb height
var xP : Number; // x position
var yP : Number; // y position
var xR : Number; // random x position
var yR : Number; // random y position
var r_w_h : Number; // random width and height
var tN : Number; // total nodes from xml
var l : Number; // bytes loaded
var t : Number; // bytes total
var percent : Number; // percent loaded
var tweenRate : Number = .6; // tween rate for the thumbs
var blur : Number;
var tweenProp : Number; // tween proportion that will be subtracted from the tween rate
var newBlur : BlurFilter;
var gridXML : XML; // xml object
var temp_mc : MovieClip; // temporary movie clip for loading purposes
var thumbHolder : MovieClip = this.createEmptyMovieClip("holder_mc", this.getNextHighestDepth()); // movie clip that holds all the thumbnails
var mc : MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth()); // mc for the loaded images, that will show up when you click something
var thumb : MovieClip; // movie clip that holds the movie clip that the thumb will be loaded into
var button : MovieClip; // movie clip that the thumb will be loaded into
var tA : Array = new Array(); // thumb array, that will be tweened
var mA : Array = new Array(); // movie clip array that holds the mc's that the thumbs will be loaded into
var xPA : Array = new Array(); // x position array
var yPA : Array = new Array(); // y position array
var xRA : Array = new Array(); // random x position array
var yRA : Array = new Array(); // random y position array
var r_w_h_array : Array = new Array(); // random width, height array
var blurArray : Array = new Array();
var filterArray : Array = new Array();
var path_a : Array = new Array(); // path to the file array
var tweenThumb_h: Tween; // tween the thumb height object
var tweenThumb_w: Tween; // tween the thumb width object
var tweenThumb_x: Tween; // tween the thumb x position object
var tweenThumb_y: Tween; // tween the thumb y position object
var tweenThumb_a: Tween; // tween the thumb alpha object
var myTween : Tween; // tween for blurs
var textFormat : TextFormat = new TextFormat(); // text format object
var thumbText : TextField = this.createTextField("thumbText", this.getNextHighestDepth(), 20, 20, 0, 0, 10); // new textfield to show how many thumbnails have been loaded

// ===============================================================================================================================================

// + + + TEXT FORMATTING + + + + + +

// ===============================================================================================================================================

thumbText.antiAliasType = "advanced";
textFormat.color = 0x000000;
textFormat.font = "Verdana";
textFormat.size = 10;
thumbText.autoSize = true;
thumbText.border = false;
thumbText.type = "static";
thumbText.multiline = false;
thumbText.text = thumbString;
thumbHolder._x = 20;
thumbHolder._y = thumbText._y+thumbText._height+10;

// ===============================================================================================================================================

// + + + XML ON LOAD + + + + + +

// ===============================================================================================================================================

gridXML = new XML();
gridXML.ignoreWhite = true;
gridXML.load(path);

mc._y = 300;
mc._x = 20;

gridXML.onLoad = setUpGrid;

function setUpGrid():Void {
tN = gridXML.firstChild.childNodes[0].childNodes.length; // get the total nodes from the xml
cols = Math.ceil(tN/rows); // divide the number of total nodes by the number of rows set up, rounded up to the nearest integer
tweenProp = tweenRate/(tN+10); // get the proportion of the tween rate, so we can speed up the tweens of the thumbs in, every time a new thumb is loaded
thumbText.text = "0 / "+tN+" THUMBNAILS LOADED"; // set up the text, initially there are 0 out of how ever many thumbs there are to be loaded
for (var i = 0; i<tN; i++) { // okay the fun part, in order to set up a grid layout, we have to have 2 nested for loops, don't ask why...., the first we loop through the total number of nodes
for (var r = 0; r<rows; r++) { // then we loop through the total number of rows
for (var c = 0; c<cols; c++) { // lastly we loop through the total number of columns
thumb = thumbHolder.createEmptyMovieClip("thumb_mc"+i, i); // while looping, we need to create empty movie clips to hold the thumbs, this movie clip will be used as the button
button = thumb.createEmptyMovieClip("button_mc"+i, i); // this movie clip we will eventually load thumbs into
xmlThumb = gridXML.firstChild.childNodes[0].childNodes[i].attributes.thumb; // get all the urls of the thumbnails
if (xmlThumb !== undefined) { // make sure that none of the urls are undefined, which basically means there will be undefined urls if there is not
// a clean divide of rows by the total number of columns
thumb._alpha = 0; // set the initial opacity to zero
thumb._visible = false;
xP = Math.ceil((s+tW)*r); // okay here we determine our x value on the grid for a thumb, basically we're adding the spacing to the thumb width and then multiplying
// that by our current r variable which is whatever r is at this point in time in our loop
yP = Math.ceil((s+tH)*c); // this is the same as above only it holds the y value in our grid
xR = Math.ceil(Math.random()*Stage.width); // here we get a random x value where we will eventually animate our thumbs from
yR = Math.ceil(Math.random()*Stage.height); // this is the same as above only it is the y value
blur = Math.random()*Stage.width;
r_w_h = Math.ceil(Math.random()*Stage.width); // variable that gives a random width and height to work with
tA.push(thumb); // okay, push the thumb movie clip into an array that will be used for animating
mA.push(button); // push the button movie clip which remember is an empty movie clip inside the thumb movie clip that we will load our images into
xPA.push(xP); // push the x position in the grid to an array
yPA.push(yP); // push the y position in the grid to an array
xRA.push(xR); // push the x random position into an array
yRA.push(yR); // "" "" y "" "" "" "" ""
r_w_h_array.push(r_w_h); // push the random width and height into an array
path_a.push(xmlThumb); // push the urls of thumbs into an array
blurArray.push(blur);

i++; // okay for this nested to work, we have increment the i value which is the current number we're on of the total nodes
if (i == tN-1) { // once i has reach the end
loadThumb(path_a[curr], mA[curr]); // load the first node
break; // we have to break the for loop as well
}
}
}
}
}
}

// ===============================================================================================================================================

// + + + THUMB LOADER + + + + + +

// ===============================================================================================================================================

// function requires 2 parameters, the url of the thumb, and movie clip we need to load the thumb into
function loadThumb(path_url:String, mc:MovieClip) {
mc.loadMovie(path_url); // load the thumb into the movie clip
temp_mc = _root.createEmptyMovieClip("temp_mc", _root.getNextHighestDepth()); // create a temporary movie clip to handle our onEnterFrame event
temp_mc.onEnterFrame = function() {
l = mc.getBytesLoaded(); // get the bytes loaded
t = mc.getBytesTotal(); // get the bytes total
percent = l/t; // get the percent between the two
if (percent>=1) { // if the percent is greater to our equal to 1, this means the thumbnail is loaded
curr++;
if(curr <= tN-1) {
loadThumb(path_a[curr], mA[curr]);
thumbText.text = (curr+1)+" / "+tN+" THUMBNAILS LOADED";
}
else {
thumbText.text = (curr--)+" / "+tN+" THUMBNAILS LOADED";
animate(tA[currAn], xRA[currAn], xPA[currAn], yRA[currAn], yPA[currAn], r_w_h_array[currAn], blurArray[currAn]);
}// for a little extra flare, lets animate the thumb into the grid from a random position
// set up the text properly
temp_mc.removeMovieClip(); // delete the onEnterFrame event
}
};
}

Adding External Preloader To 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, 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?

This is in Flash 8.

Need To Display Thumbs In Rows Of 4
Hey everyone! So im using this simple photo gallery that shows all your thumbnails in one big row. I have many thumbs, so i need to show 4 in a row, then show the next 4 thumbs in a new row, etc.
Heres the script im using: http://www.tutorio.com/tutorial/simp...photogallery/2

Anybody know how I can alter the code to have the thumbnails show only 4 in a row, then make a new row of 4 thumbs below that?

Thanks!

Display Pictures In Two Rows
I have to set theese pictures thath come from a db in 2 rows.
I mean: when picture are more than 9, go to line 2 below of the 1.

Please help...




Code:
_root.next_btn._visible = false;
_root.last_btn._visible = false;
_root.CurrentPage = 1;

function loadPictures()
{
myPictures = new LoadVars()
myPictures.load("http://www.luccaonweb.it/perini/f/getPictures.php")
myPictures.onLoad = function(success)
{
if(success)
{

for(i = 0; i < 10; i++)
{
_root["pic"+i]._visible = false;
}


for(i = 0; i < myPictures.picCount; i++)
{

}


for(i = 0; i < myPictures.picCount; i++)
{




if(i != 0){

pic0.duplicateMovieClip("pic"+i, i);
pic0._x +=90;

}
_root["pic"+i]._visible = true;
_root["pic"+i].name = myPictures["picName" + i];
_root["pic"+i].price = myPictures["picPrice" + i];
_root["pic"+i].id = myPictures["picID"+i];




var pathSwf:String = myPictures["picURL1"+i];
var mclListener:Object = new Object();
mclListener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
var perc:Number = Math.round((bytesLoaded/bytesTotal)*100);
trace("perc " + perc);
};
mclListener.onLoadStart = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
};
mclListener.onLoadInit = function(target_mc:MovieClip):Void {
trace("finito il caricamento");
target_mc._alpha=100;
};

var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(mclListener);
var swfContainer:MovieClip = _root["pic"+i].imageHolder;
photoContainer._alpha = 0;
mcLoader.loadClip(pathSwf, swfContainer);


mclListener.onLoadInit = function(target_mc:MovieClip):Void {
trace("finito il caricamento");
target_mc._alpha=100;

target_mc.onRelease = function(){
trace(this._name+" è stato cliccato");

}
}
}
}
};
}
loadPictures();
stop();

Display External Images
Hey guys, im trying to create a Blackjack game in my Adv. Higher computing class and i am having lots of trouble getting the card images (image/<cardname>.jpg) onto the screen, i found a way to do it with:

randomnumber = random.math()*52

if (randomnumber >= 1) then:
<load imagee>

but with the if statement im gonna have to do 1040 different if statements, can anyone give me a better way to do it (with code *beg*)

i would be really grateful

~Clone

Preloading External Images For Display.
Hi, I'm creating a small flash application that displays 5 images in a constantly rotating order. Ie: each fades in & out into the next one. But in order for the fade to work, they all need to be loaded at runtime, otherwise the image is still loading while the fade is taking place.

Does anyone know a way of pre-loading a group of images so that they can be displayed when called without having to load them individually?

How To Display Multiple Galleries In Separate Rows
I have two image categories each of them needs to be displayed horizontally in distinctive rows. ie.
Row 1 : category 1 image thumbnails
Row 2: category 2 image thumbnails

and I am just wondering if I could put the XML objects of each category in an array and process them in a loop? so far the following code is not working.
Please give me advises on how I could display multiple galleries in different rows. Many thanks!


ActionScript Code:
function getCats() { //initialise category objects and store them in an array called catArray.
   
    for (i=0; i<_global.catNames.length; i++) {
        _root.catArray[i] = new XML();
        _root.catArray[i].ignoreWhite = true;
        _root.catArray[i].load(_global.catNames[i]+".xml");
        trace(_root.catArray[i].firstChild.childNodes);
    }
   
}

Different Sized Images In Rows/columns
hello!

im trying to develop an xml galery which displays different sized images in an limited space. for example there should be 1 or 2 or 3 or n pictures displayed in row one and when the limitation of 450px in width is exceeded a new row is opened. ive already got a slice of code which works except of the limitation and so there are 2 pics in one row wheres only space for one!

i dont get whats wrong! maybe someone smarter than me can see the mistake!?


ActionScript Code:
var limit = 450;
// this is the limit where it should do a linebeak
var anz = anzahl;
// amount of clips
var p:Array = [0];
var py:Number = 0;        // y kooordinate
var dist:Number = 40;    // space between clips
var dist_y:Number = 40;   // y space between clips

           
        for (var j=0;j<anzahl;j++){

// POSITION
       
   
    this["con"+j]._x = p[j];
    p.push(this["con"+j]._x + this["con"+j]._width + dist);
   
    // linebreak
   
if(p[j+1] >= limit)
    {
        p[j+1] = 0;
        this["con"+j]._y = py;
    py = this["con"+j]._y + this["con"+j]._height + this["text2"+j]._height + dist_y;
    }
    else
        this["con"+j]._y = py;

       
}

ps.: sry for my bad english !

Multiple Colums/rows For Images
Hi all,

I've been trying to find a good tutorial on how to achieve this functionality using flash:

http://www.flashimagegallery.com/pics/artwork/

Basically, I know how to load images into a photo gallery using flash and xml/database, however, I don't know how to place them in several columns/rows.

Does anyone know?

Thanks,
Mat

XML.. Show Items In Rows.. And Load Images
I'm new to AS and I need some pointers. I've included the .fla and source files I'm working on.

Here is what I need some help to figure out:

1. How can I show the items in rows of 4 and 4.. Instead of just repeat them vertical?

2. How can I load the thumbnails in the menu items?

3. How can I load the image for the chosen item in the image placeholder?

Any help would be great!!

Rotating Thumbnail Display
Hey all,

I am trying to make a rotating thumbnail display for a portfolio website. The display simply needs to have an arrow at either side, and when clicked, the 4 items move off the screen, and the new items move on. Each of these items is obtained by PHP, however, I cannot seem to get my head around a workable concept on how I can get the rotating effect to work.

So, to sum it up.

I need to be able to click an arrow at either side of the flash file. This arrow changes the 4 objects displayed, with another 4 new objects. (Using a simple fly in tween)


Any Ideas?

[F8] Load External Rows With Links
hello everybody, its been a while

ok heres my problem.. ive read what feels like hundreds of tutorials on loading external data in flash but this is a bit advanced for me (i hate to admit )

im using php/mysql to get data rows from a database and loading it into flash
but with each of my rows i want to add a link in flash that would load another movie with more details about that row..

so for example i have 3 swfs

1) (main.swf) main timeline that loads submain.swf into a movieclip
2) (submain.swf) loads rows of data into a dynamic text box from php/mysql
3) (details.swf) loads specific data for each row

so my question is how do i put a link in each row in submain.swf that will tell details.swf what data to load?

am i making sense?

please help me
any direct help or links to tutorials detailing this would be greatly appreciated

External Data Rows With Links
hello everybody, its been a while

ok heres my problem.. ive read what feels like hundreds of tutorials on loading external data in flash but this is a bit advanced for me (i hate to admit )

im using php/mysql to get data rows from a database and loading it into flash
but with each of my rows i want to add a link in flash that would load another movie with more details about that row..

so for example i have 3 swfs

1) (main.swf) main timeline that loads submain.swf into a movieclip
2) (submain.swf) loads rows of data into a dynamic text box from php/mysql
3) (details.swf) loads specific data for each row

so my question is how do i put a link in each row in submain.swf that will tell details.swf what data to load?

am i making sense?

please help me
any direct help or links to tutorials detailing this would be greatly appreciated

First Thumbnail Image Display Problem.
I have created a thumbnail in my photo gallery and all are working fine. thumbnails are on left side (Up-Down).
when i change category, by default thumbnail do not go to the first image.

Following is the scenario:

"Category1" button have 25 images
"Category2" button have 10 images.

Now i am on 15th image in "Category1" at that point, when i click on "Category2" command button, thumbnail loaded for "Category2" shows last few image of thumbnail. To see the first image of "Category2" i have to scroll up.

Can you please let me know what changes i have to made in this code; so it show the first thumbnail when i change category?


Following is the thumbnail code i am using.

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 + 5) * k;
target_mc.pictureValue = k;
target_mc.onRelease = function ()
{
p = this.pictureValue;
// Draw Picture
setPicture (p);
};
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);

}


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 <= 100) && (thumbnail_mc.hitTest (hit_left)))
{
thumbnail_mc._y += scroll_speed;
}
}
else
{
delete tscroller.onEnterFrame;
}
};
}


Category1.onRelease = function ()
{
category_fn ("Category1");

};



function category_fn (category)
{
if (_root.levelChild.childNodes[attr].attributes.Menu == category)
{
var loader:MovieClipLoader = new MovieClipLoader ();
var myListener:Object = new Object ();
loader.addListener (myListener);
loader.loadClip (info_xml[0].attributes.thumbnail, thumbnail_mc);
myListener.onLoadInit = function (target_mc)
{
setPicture (0);
for (i = 0; i < itemTotal; i++)
{
thumbnails[i] = info_xml[i].attributes.thumbnail;
thumbnails_fn (i);
}
};
}
}

Display Thumbnail View Of Library.
Is there anyway to display a Flash Library in a thumbnail view?
thanks

Image Grid For Thumbnail(s) Display
Hello,
Yes, it's been awhile. I'm currently working on a web page design where I would like to have a vertical grid for thumbnail images [10 per category or per page] (left of page), When an image is selected, it's displayed in the assigned "Display Area" (right side of page). This is a Image Gallery type assignment, NO SCROLLING necessary. Any flash transition effects would be a plus to enhance the design interaction. Any tutorials that I can view and learn from? Any guidance in this area would be appreciated. I'm still with Flash MX....

...IfOnlyiNu
Thanx

Datagrid Rows Linking To Different External Documents?
Hello Gurus,
I followed the datagrid tutorial pretty much exactly the way Kirupa demonstrated and it's worked out well.

Is there a simple way where I can hardcode in a few lines of code for each array so when the user clicks on the item row, they could then download a file (PDF)?

Thanks in advance for the help!

Load And Display Movie Clip In Thumbnail
Hi all,

I need to display a movie clip taken fom the database in thumbnails form. Can anyone help me with the actionscript to display the movie clip in thumbnails?

Regards
Fernado

Best Way To Display Large Image On Clicking Thumbnail
Hi,

I have a flash movie with load of small thumbnail images. When each is clicked, it needs to load the large version on top with a 'close' button (kind of like a pop-up window would do in HTML). Ideally there needs to be a transition when the large image appears (e.g. fade-in) and also when it is closed.

My question is this... There are almost a hundred of these images, so what would be the best way to achieve what I want to? Would I be able to load the images in dynamically from a directory on the server? Would this allow me to fade them in/out - even if they take a couple of seconds to load?

If anyone can advise / show an actionscripting novice how to do this I'd be really grateful.

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!

[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

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

[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.

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

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.

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!

Movieclip Thumbnails That Load Different Images In Thumbnail?
Ok lets say I want to create a brightening effect everytime someone rolls over a button. I make my movieclip with the animation it works. Problem is I have 10 thumbnails that need the same effect. So I need to swap out the images for each thumbnail. Also add a different url to load when clicked. How would one do that. I know how to load images with xml and click them to load the large image but not how to load movie clips that load external images for thumbnails thanks.

Gallery With Thumbnail Vertical And Horizontal Images?
I'm using the tutorial for a photo gallery with thumbnails and it's working perfectly. My images are 700w x 450h. I've tried adding a few vertical images that are 300w x 450h but they don't work. Is there a way to make vertical photos work?

Scrolling Thumbnail Panel Load Images From XML
Hello all! Like the website and the Forum. I have search for this and have found many results but not quite what I am looking for.
I am going to create a scrolling panel with quite large image. The height will be 400px and the width will be different from image to image.
If I do this in only flash the swf will be too large for use on the Internet. So I want to load the images from a xml-document. And this is my problem:
How do I load my images into the panel from an xml-document? And the width of my panel should be as long as the total width of the images are.

Hope someone can help me with this.
And please do not redirect me to on of the previous posts, I have checked them all.


Thanks - Johan

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.

[F8] Auto-scrolling Thumbnail Images, Rollover Problem
Hi all,
I have several thumbnail/jpg images contained in a movie clip that move left and right when I move my mouse over them. This works fine, but I want to display the large image of the thumbnail in a separate area when I rollover the thumbnail. Since all the images are in a movie clip, I dont know how to get the individual thumbnail images to get 'recognized' by a rollover event so I can then trigger a display of the larger image.
Any help appreciated.

Thumbnail Gallery-how To Center Load Images- I Am Stuck
I have built a gallery similar to the one found on Kirupa.com with a siding thumbnail gallery that references xml. Everything works great except that the images I want to load at their large size vary in width so when they load referencing the upper left hand corner they are not centered. I would like to load them so that each image in centered in the "picture" image area. I created a new movie clip and gave it the instance name of "picture" and center justified it but the images now load with THEIR upper left corner in the center of the "picture" image area. do I have to add code to the xml? is there anything I can ad to th AS to load pictures centered? I don't understand the code well enough to play around any more than I have. any help would be greatly appreciated as i am stuck!
thank you,
ecandela

Preloading Multiple, Dynamically Loaded, Thumbnail Images
Hi,
I'm trying to preload 5 dynamically loaded jpegs... I'm stuck. Here's what I have so far:


Code:
//Preloader for images
allthumbs = _root.Content.gallery.imageall.image1_mc + _root.Content.gallery.imageall.image2_mc + _root.Content.gallery.imageall.image3_mc + _root.Content.gallery.imageall.image4_mc + _root.Content.gallery.imageall.image5_mc;
bytesLoaded = getBytesLoaded(allthumbs);
percent = bytesLoaded/getBytesTotal(allthumbs)*100;
percent = Math.round(percent);
imagePercent = percent;
preLoadBar._width = percent*3.4;
if (percent == 100) {
_root.Content.gallery.preLoader1._visible = false;
} else {
_root.Content.gallery.preLoader1._visible = true;
}
Any ideas?

-Craig

Help In Makeing Autoloop Scrollable Thumbnail Images In Photogallery
hi everybody,

i have a vertical photogallary in which thumbnail images part i need auto scrollable,in which image is loading through XML,

http://www.evascrivosalon.com/salon.html

this site will take time to load be patient...friends...
this is the which i used in it........

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 += 100;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 50;
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 = 25;
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+0)*k;
///target_mc._y =(target_mc._width-5)*k;
//trace(target_mc._width+"t"+target_mc._parent._rota tion)
target_mc.pictureValue = k;
target_mc._alpha = 50;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};

target_mc.onRollOver = function() {
this._alpha = 100;
thumbNailScroller();
};
target_mc.onRollOut = function() {
this._alpha = 50;
thumbNailScroller();
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}

///////////////////////////////////////////


and this code i used in thumbnail_mc to loop but its not looping just it just go to last image and stop there....

onClipEvent (load)
{
//ycenter=0;
speed=1/100;
}
onClipEvent (enterFrame)
{
var distance=_root._ymouse-ycenter;
_y+=(distance*speed);
if (_y > 455) _y=-123
if (_y <-455 ) _y=123;
}


so i just want to where ihave to change in the script to make it Thumbnail images AUTO loopable/ SCROLLABLE

Loading Images With XML In Vertical Scrolling Thumbnail Pane
Hi,

Is there someone who can help me?
I've written a php-script to create an xml-file for my images.
I want to use the xml to load images automatic in my flash movie.

I used the tutorial Scrolling Thumbnail Panel and converted it to a vertical scroller.
Now I don't want to use hardcoded images, but with the xml.

Is there someone who knows how to start, because I am new in the flash-thing.

Thank you!!!

my xmloutput: http://trekpaardpromotie.be/GHANNAH_php/xml_images.php

the application I want the xml to load in: http://trekpaardpromotie.be/GHANNAH_php/img/scrollertest2.swf

Loading Dynamic Gallery Thumbnail Images Overrides Variables
i think the issue with the following code is one of scope or pathing, but after hours of trial and error, i just can't figure it out:

this._lockroot = true;

//set up variables for loading jpg files
var thumbnailMCL:MovieClipLoader = new MovieClipLoader();
var thumbnailMCL_listener:Object = new Object();
thumbnailMCL.addListener(thumbnailMCL_listener);

thumbnailMCListener.onLoadError = function() {
trace("thumbnailMCL Load Error");
}

thumbnailMCL_listener.onLoadComplete = function() {
assignThumbnailInteractivity(thumbnailAddingIntera ctivity);
_root["thumb" + thumbnailAddingInteractvity].thumbNum = thumbnailAddingInteractivity;
thumbnailAddingInteractivity++;
}

//set up variables for displaying images
var curImageNum:Number = 0;
var oldImageNum:Number = 0;
var curDepth:Number = 1;

var totalImages:Number = 58;
var thumbSize:Number = 75;
var imageSize:Number = 300;

var sliderSetWidth:Number = 500;
var sliderSetHeight:Number = 8;
var sliderSetYPos:Number = 550;

var thumbnailSpacing:Number = 10;
var thumbYPos:Number = sliderSetYPos - thumbSize - Math.round(Stage.height * .05);

var thumbnailFadeSpeed:Number = 1.5;
var mainFadeSpeed:Number = 1;
var alphaDisabled:Number = 30;

var widthOfAllThumbnails:Number = (totalImages * thumbSize) + ((totalImages - 1) * thumbnailSpacing);

var thumbnailAddingInteractivity:Number = 0;


function makeMainImageViewer(depth) {
_root.createEmptyMovieClip("photos", depth);

with(_root.photos) {
enabled = true;
_alpha = 100;
trackAsMenu = true;
visible = true;

_x = (Stage.width - _width) / 2;
_y = Stage.height * .1;

_root.myMCL.loadClip("photos/image0.jpg", _root.photos);
}
}

function createThumbnails(startDepth) {
trace("creating thumbnails......");
for (a = 0; a < totalImages; a++) {
trace("creating thumbnail" + a);
_root.createEmptyMovieClip("thumb" + a, a + startDepth);
//_root["thumb" + a].thumbNum = a;
trace("_root.thumb" + a + ".thumbNum = " + _root["thumb" + a].thumbNum);

with(_root["thumb" + a]) {
enabled = true;
_alpha = alphaDisabled;
trackAsMenu = true;
var thumbNum = a;
}
}
}

function createThumbnailsTwo () {
for (a = 0; a < totalImages; a++) {
_root.thumbnailMCL.loadClip("photos/thumb" + a + ".jpg", _root["thumb" + a]);
//_root["thumb" + a].thumbNum = a;
//assignThumbnailInteractivity(a);
}
}

function assignThumbnailInteractivity(thumbnailToAddInterac tivityTo:Number) {
//thumbnails load coinciding full sized images into "viewer" when clicked on
trace("assigning interactivity to thumbnail" + thumbnailToAddInteractivityTo);
_root["thumb" + thumbnailToAddInteractivityTo].onPress = function() {
oldImageNum = curImageNum;
curImageNum = this.thumbNum;

trace("oldImageNum = " + oldImageNum);
trace("curImageNum = " + curImageNum);
//trace("this.thumbNum = " + this.thumbNum);
trace("_root.thumb" + thumbnailToAddInteractivityTo + ".thumbNum = " + _root["thumb" + thumbnailToAddInteractivityTo].thumbNum);

_root.enableAllThumbnails();
this.enabled = false;
this._alpha = 100;

fadeUp(_root["thumb" + oldImageNum], 100, alphaDisabled, thumbnailFadeSpeed);

var fadeTween = new mx.transitions.Tween(_root.photos, "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, _root.mainFadeSpeed, true);
fadeTween.onMotionFinished = function() {
_root.myMCL.loadClip("photos/image" + _root.curImageNum + ".jpg", _root.photos);
fadeDown(_root.photos, 0, 100, _root.mainFadeSpeed);
}
}

//set up fade in/fade out (_alpha change) animations for thumbnails onMouseOver & onMouseOut events
_root["thumb" + thumbnailToAddInteractivityTo].onRollOver = function() {
fadeUp(this, _root.alphaDisabled, 100, _root.thumbnailFadeSpeed);
}

_root["thumb" + thumbnailToAddInteractivityTo].onRollOut = function() {
fadeUp(this, 100, _root.alphaDisabled, _root.thumbnailFadeSpeed);
}
}

makeMainImageViewer(20);
createThumbnails(50);
createThumbnailsTwo();


the problem is that as soon as i click on a thumbnail (w/ an image loaded into it), the trace call in function assignThumbnailInteractivity tells me that this.thumbNum is undefined. However, by commenting out in createThumbnailsTwo() as so:
_root.thumbnailMCL.loadClip("photos/thumb" + a + ".jpg", _root["thumb" + a]);
//_root["thumb" + a].thumbNum = a;
//assignThumbnailInteractivity(a);
is:
//_root.thumbnailMCL.loadClip("photos/thumb" + a + ".jpg", _root["thumb" + a]);
//_root["thumb" + a].thumbNum = a;
assignThumbnailInteractivity(a);
lets me have all the functions i want with the place holder thumbnails (black squares). the trace call to this.thumbNum in assignThumbnailInteractivity does not get "undefined" and instead operates exactly as i want. i've also tried changing
oldImageNum = curImageNum;
curImageNum = this.thumbNum;
to
_root.oldImageNum = _root.curImageNum;
_root.curImageNum = _root["thumb" + thumbnailToAddInteractivityTo].thumbNum;
to no avail.

so, by process of elimination, obviously something is happening when i load an image that erases my assignment of this.thumbNum. any ideas? or is there actually a function native to flash where i could find out which thumb# i'm inside from inside a function?

should i change how i handle the onLoadComplete MovieClipLoader listener event handler? assigning the onMouseEvent handles w/o waiting for the onLoadComplete would have images load, and disable interactivity, so i guess loading images using MCL overrides any custom variables and event handling functions????

also, i'm betting that i don't need to draw temp images for the thumbnails. but when i take that code out, the thumbnails don't display at all.

any help would be greatly appreciated!

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