Simple XML Image Gallery?
Howdy,
I am looking for what I hope is a simple XML image gallery. I can get in from a database into XML the filename, text, thumbnail, whatever I need too.
Except how to display it? The ones I found so far - and there are several are either scrolling ones, or ones that only display inside the swf.
I am wanting to be able to specify how many rows and columns, and when the image is clicked have a popup window open that then takes a querystring variable along with it. Thumbnails are of identical size.
Any ideas?
Thank you.
ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)
Posted on: 12-13-2005, 12:29 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Simple Gallery Example Flash With PHP Serving Image List And Image Sizes
this is simple gallery example for AS2
gallery is nothing special ease to use and implement
interesting thing about this example is that you pass a folder, and PHP side gathers images list from folder and returns it to Flash in XML form together with images widths and height which makes it more easier to implement this sort of galleries like I've made
example : http://www.hagane.us/as/gallery/
ZIP : http://www.hagane.us/as/gallery/gallery.zip
blogpost : http://mrsteel.wordpress.com/2008/01...s-from-folder/
Simple Image Gallery
Hello,
I have created a simple image gallery, with appox 12 images, each on there own keyframe. I have 2 buttons, one for going forward, one for going back on the time line. On the buttons, i have put the following
onRelease.gotoAndPlay(nextFrame); , but this does not work. Maybe this is for movie clip instances?
also, is there a way to add some action script so the image fades in ?
I hope somone can help this beginner actionscripter !
Thanks in advance
Hopefully Simple Image Gallery?
Howdy,
I am looking for what I hope is a simple XML image gallery. I can get in from a database into XML the filename, text, thumbnail, whatever I need too.
Except how to display it? The ones I found so far - and there are several are either scrolling ones, or ones that only display inside the swf.
I am wanting to be able to specify how many rows and columns, and when the image is clicked have a popup window open that then takes a querystring variable along with it. Thumbnails are of identical size.
Any ideas?
Thank you.
"Ever stop to think, and forget to start again?"
Stuart
A+, Net+, Security+
Simple Image Gallery - Help
Hi,
Hello,
I'm currently working on making a flash based image gallery but am having some difficulties. I have 9 thumbnails that when hovered over will not only fade into their natural state (full saturation) but also load the thumbnails full size counterpart to the right of the group. The attached gif should show what I mean more clearly. Any help would be great thanks.
PS even a tutorial link would be fine, but I was having trouble finding anything close to what I'm looking for.
note* sorry if this is in the wrong section...I'm not quite sure where it should go.
Attached Images
SIMPLE Non-dynamic Image Gallery
Hi there,
As always, the world of Flash has moved on and developed new classes like MovieClipLoader since last I did a site. Before I invest the time, I just want to be sure I can't do something SIMPLE for my portfolio gallery without relying on too much fancy new stuff. I'm in a bit of a hurry you see.
Each gallery will be an externally loaded swf. The gallery layout is simple - a big image, with a row of little thumbnails underneath. I thought I could eliminate the need for pre-loaders etc. by trying to work with the linear nature of how flash loads an external swf:
Functionally I'd like to see the first big image appear and it's thumbnail, then the other thumbnails appear along the bottom WHEN their larger versions are loaded into the player (thus letting the user know what is ready to view). If my thumbnails are just scaled instances of my large images, this relationship would SEEM easy to exploit - if the player loads a large image, it's thumbnail appears or vice versa. Yet I'm stuck.
If an external swf. has an image on each frame, I know it will just chug along and loading and displaying them as they load. This mechanism (visible or not) will eventually load them into the player (max. 20 images) and I believe that should the user jump the playhead to a frame that hasn't yet loaded, it will be blank - in which case a simple looped 'loading' animation on the layer below would suit me fine.
Assuming I used this mechanism to populate my thumbnail bar. How could I work it so that clicking on the thumbnail button would display the larger version ? The normal mechanism would be a movieClip with the larger versions in it and a gotoAndStop(x) ... though when flash sees a mc on a frame it won't display anthing until it's fully downloaded it's contents, so that's out.
I guess I have to dynamically (?) call and postion images/instances already loaded into the player ... ? I dunno.
Any suggestions ?
If there's a simple solution, I'd love to hear it.
Cheers,
Morgan
HELP - XML Image Gallery, Simple Problem
I've posted this problem before and gotten no response. Very simple I'm sure, I just don't know much Flash. Basically I've created an image gallery that should look like this: http://www.flashcomponents.net/upload/samples/1448/index.html. The problem is that the thumbnails are not being accessed properly (from what I can tell), making it look like this: http://shortydesigns.com/index.html. The images are all in the same folder and since one thumbnail is loading, I can't see why the others aren't. The Actionscript in the Flash file is as follows (it was created with Flash 10):
First Piece of Code
stop();
// specify the url where folder is located below (if applicable)
toadd = "";
t = 0;
l = 0;
theside = 1;
galxml = new XML();
galxml.load(toadd+"flash/fashion/easy-xml-gallery-2.xml");
galxml.ignoreWhite = true;
galxml.onLoad = function(success) {
if (success) {
maxnum = galxml.firstChild.childNodes.length;
for (n=0; n<maxnum; n++) {
specs = galxml.firstChild.childNodes[n];
// TEXT FOR SIDE NAV
duplicateMovieClip(side.thumbs.thumbsb, "thumbs"+n, n);
thumbclip = eval("side.thumbs.thumbs"+n);
thumbclip._x = n*100;
thumbclip.thetitle = specs.attributes.name;
thumbclip.theurl = specs.attributes.theurl;
thumbclip.thecaption = specs.attributes.caption;
thumbclip.thenum = n+1;
thumbclip._alpha = 100;
loadMovie(toadd+"flash/fashion/images/"+(n+1)+"b.jpg", thumbclip.thumbload.thumbload2);
play();
side.thumbs.thumbsb._visible = false;
}
}
};
mainperc.onEnterFrame = function() {
if (mainperc.perc<98) {
mainperc._alpha += 5;
}
mainperc.perc = Math.round(l/t*100);
mainperc.perctext = mainperc.perc+"%";
mainperc.ltext = "OF THUMBNAILS LOADED ("+Math.round(t/1024)+"kb)";
if (mainperc.perc>98) {
// mainperc._alpha -= 5;
}
if (mainperc._alpha<-50) {
delete mainperc.onEnterFrame;
}
};
Later in the timeline:
stop();
pic.info.thenum = side.thumbs.thumbs0.thenum;
pic.info.thecaption = side.thumbs.thumbs0.thecaption;
pic.info.thetitle = side.thumbs.thumbs0.thetitle;
pic.info.theurl = side.thumbs.thumbs0.theurl;
loadMovie(_root.toadd+"flash/fashion/images/1.jpg", pic.pic2.pic3);
onEnterFrame = function () { side.gotoa = 110;if (side._alpha>99) {side._alpha = 100;delete onEnterFrame;}side.lefta = side.gotoa-side._alpha;side._alpha += side.lefta/5;pic._alpha = side._alpha;};
Simple Scroll For Image Gallery
hi
i have an image gallery with a row of about 35 images along the bottom within an mc with the instance name 'scroll' which i have masked so only 3 or 4 are visable at a time.
i have a 'left' mc and a 'right' mc with the following code
left
frame1
stop()
frame 2
movespeed = 5;
if (_root.scroll._x>=292.6) {
gotoAndStop(1);
} else {
_root.scroll._x += moveSpeed;
}
frame 3
gotoAndPlay(2);
right
frame1
stop()
frame2
movespeed = 5;
if (_root.scroll._x<=-3451.3) {
gotoAndStop (1);
} else {
_root.scroll._x -= moveSpeed;
}
frame3
gotoAndPlay(2)
i then have 2 buttons
for the left scroll
on (press) {
tellTarget ("left") {
gotoAndPlay(2);
}
}
on (release) {
tellTarget ("left") {
gotoAndStop(1);
}
}
for the right scroll
on (press) {
tellTarget ("right") {
gotoAndPlay(2);
}
}
on (release) {
tellTarget ("right") {
gotoAndStop(1);
}
}
i cant make the 'scroll' mc scroll, i dont understand why. Please help me someone
Im using flash 8 if that helps
i have the fla at the following url if it will make it easier
http://www.ats-heritage.co.uk/div/Barony_DVD_VB.fla
cheers
Scrolling Image Gallery Simple Question
can someone tell me how to do this or point me toward a tutorial how to do this that would be awesome because this site you have to buy it and use it as a component but i want to make my own
http://www.flashloaded.com/thumbnailer.php
thanks guys for the help
this is funny
--->
Simple Xml Image Gallery - Thumbnail Rollovers
Here's my code: http://flash.pastebin.com/d21602c21
I've been relentlessly trying to get this to work and am happy with it so far.
Right now it works. It loads the thumbnails along with a full size image and then lets you click on the various thumbnails to display the full size image that goes with it.
I'd like to add rollover and active states to the thumbnails. I think I need to isolate the thumbnails from the full size images because I'd like to add ROLL_OVER and ROLL_OUT states to them without effecting the full size images..
I'm thinking I may need to rework a bit of the code. Anyways, it would really help me out to receive some direction.
Slider To Scroll Image Gallery *Simple*
hey everyone, what's up...
I'm trying to make a dynamic thumbnail gallery, very similar to the ándale auction galleries you find at the bottom of some eBay listings:
http://cgi.ebay.co.uk/ws/eBayISAPI.d...tem=3748381458
I'm pretty sure I have a handle on making the images load externally, but how do you get it to display only one or two rows of images, and then have a slider to scroll through the rest of them?
I'm a beginner with AS, so any **simple** examples would be greatly appreciated!
Thanks guys!
-heather
Simple Panning/scrolling Image Gallery
maybe created out of this simple easing this._y += (destY-this._y)/15;
as you move your mouse to the right i guess the image gallery will want to move to the left.
Very Simple Question Re: Gallery Image Names
Hi, I'm creating a gallery using the following code, but it's been so long since I last used it I can't remember what the thumbnails and larger pics are supposed to be titled - I assume the first person who looks at this will be able to tell me. Also, where do you think the images should be placed? I'd have automatically placed them in the library, but in the gallery I created before, they're not placed in the library.
Anyway... (and thanks in advance)
Code:
image_arr = new Array();
maxImages = 8;
for (var i = 0 ; i < maxImages ; i++)
{
image_arr.push("image" + i);
}
currentHolder = 0;
theDepth = 1000;
topY = 65;
_global.imageLoaded = false;
_global.selectedImage = 0;
this.createEmptyMovieClip("thumb_mc", theDepth++ + 10000);
this.createEmptyMovieClip("img0_mc", theDepth++ + 10000);
this.createEmptyMovieClip("img1_mc", theDepth++ + 10000);
this.attachMovie("FScrollPaneSymbol", "thumb_sp", 1000, {_x:25, _y:375});
this.thumb_sp.setSize(1000);
this.thumb_sp.boundingBox_mc._alpha = 0;
this.thumb_sp.setStyleProperty("arrow", 0x88BBFF);
this.thumb_sp.setStyleProperty("scrollTrack", 0x88BBFF);
this.thumb_sp.setStyleProperty("face", 0xFFFFFF);
for (var i = 0; i < image_arr.length; i++)
{
this.thumb_mc.createEmptyMovieClip("thumb" + i + "_mc", theDepth++);
this.thumb_mc.createEmptyMovieClip("thumb" + i + "_tmp_mc", theDepth++);
this.thumb_mc["thumb" + i + "_mc"]._x = 25 + 175 * i;
this.thumb_mc["thumb" + i + "_mc"]._y = 375;
this.thumb_mc["thumb" + i + "_mc"].loadMovie(image_arr[i] + "_tn.jpg");
this.thumb_mc["thumb" + i + "_tmp_mc"].no = i;
this.thumb_mc["thumb" + i + "_tmp_mc"].onEnterFrame = function()
{
var _mc = this._parent["thumb" + this.no + "_mc"];
var l = _mc.getBytesLoaded();
var t = _mc.getBytesTotal();
if ((l >= t) && (t > 1) && (_mc._width > 1))
{
_mc.num = this.no;
_mc.onPress = function()
{
if ((_global.selectedImage != this.num) && (_global.imageLoaded))
{
loadImage(this.num);
}
};
this._parent._parent.thumb_sp.setScrollContent(this._parent);
this._parent._parent.thumb_sp.refreshPane();
delete this.onEnterFrame;
this.removeMovieClip();
}
};
}
function loadImage(num)
{
_global.imageLoaded = false;
this["img" + currentHolder + "_mc"]._x = 25;
this["img" + currentHolder + "_mc"]._y = 1000;
this.createEmptyMovieClip("img0_tmp_mc", theDepth++);
this.createEmptyMovieClip("img1_tmp_mc", theDepth++);
this["img" + currentHolder + "_mc"].loadMovie(image_arr[num] + ".jpg");
this["img" + currentHolder + "_tmp_mc"].onEnterFrame = function()
{
var l = this._parent["img" + currentHolder + "_mc"].getBytesLoaded();
var t = this._parent["img" + currentHolder + "_mc"].getBytesTotal();
if ((l >= t) && (t > 1) && (this._parent["img" + currentHolder + "_mc"]._width > 1))
{
this._parent["img" + currentHolder + "_mc"]._alpha = 1;
this._parent["img" + currentHolder + "_mc"]._y = 25;
_global.imageLoaded = true;
_global.selectedImage = num;
delete this.onEnterFrame;
this.removeMovieClip();
}
};
this["img" + ((currentHolder + 1) % 2) + "_tmp_mc"].onEnterFrame = function()
{
if (_global.imageLoaded)
{
if (this._parent["img" + currentHolder + "_mc"]._alpha < 100)
{
this._parent["img" + currentHolder + "_mc"]._alpha += 5;
this._parent["img" + ((currentHolder + 1) % 2) + "_mc"]._alpha -= 20;
}
else
{
this._parent["img" + currentHolder + "_mc"]._alpha = 100;
this._parent["img" + ((currentHolder + 1) % 2) + "_mc"]._alpha = 0;
currentHolder = (currentHolder + 1) % 2;
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
}
loadImage(_global.selectedImage);
Simple Image Gallery/uploading System
Have a weird issue. Not loading the images for a little info bar at the bottom. It works if you view a folder, however it doesn't work when you just view the main images. I am tracing it, and it traces great, just doesn't want to work.
Oh yeah, and it's a WIP, it has other issues, just pretend you didn't see them
links removed.
The code that you're looking for is at the very bottom, it's pretty easy, just loading the path of the image from a given array of images.
Simple Image Gallery References Request.
Hi!
I need a simple image transitions script that reads images from some directory and automatically fade between images. There should be also as many buttons as images (somewhere on the stage) with jump to image function.
Has anyone got any references or built similar script?
Thank you very much!
Slider To Scroll Image Gallery *Simple*
hey everyone, what's up...
I'm trying to make a dynamic thumbnail gallery, very similar to the ándale auction galleries you find at the bottom of some eBay listings:
http://cgi.ebay.co.uk/ws/eBayISAPI.d...tem=3748381458
I'm pretty sure I have a handle on making the images load externally, but how do you get it to display only one or two rows of images, and then have a slider to scroll through the rest of them?
I'm a beginner with AS, so any **simple** examples would be greatly appreciated!
Thanks guys!
-heather
Simple Panning/scrolling Image Gallery
maybe created out of this simple easing this._y += (destY-this._y)/15;
as you move your mouse to the right i guess the image gallery will want to move to the left.
AS3 - Simple Xml Image Gallery - Thumbnail Rollovers
Here's my code: http://flash.pastebin.com/d21602c21
I've been relentlessly trying to get this to work and am happy with it so far.
Right now it works. It loads the thumbnails along with a full size image and then lets you click on the various thumbnails to display the full size image that goes with it.
I'd like to add rollover and active states to the thumbnails. I think I need to isolate the thumbnails from the full size images because I'd like to add ROLL_OVER and ROLL_OUT states to them without effecting the full size images..
I'm thinking I may need to rework a bit of the code. Anyways, it would really help me out to receive some direction.
Simple Image Gallery And Text - Client User Friendly
My new project consists of creating a simple Image Gallery and Text so that my customer can edit the text and change the images via a text file.
I understand XML and AS may be one of the best methods. I'd like to explore using the flash mx components if possible also.
In saying that, admittedly I am far from advanced enough to do this project on my own. Does anyone have a sample fla they have created for a similiar project that I can glance at? I want something simple that stays within my requirements mentioned above.
Cheers,
Daniel
Simple Image Gallery And Text - Client User Friendly
My new project consists of creating a simple Image Gallery and Text so that my customer can edit the text and change the images via a text file.
I understand XML and AS may be one of the best methods. I'd like to explore using the flash mx components if possible also.
In saying that, admittedly I am far from advanced enough to do this project on my own. Does anyone have a sample fla they have created for a similiar project that I can glance at? I want something simple that stays within my requirements mentioned above.
Cheers,
Daniel
Replacing Image Preloader With Simple Text Info In Photo Gallery Using XML And Flash
Using the "Photo Gallery Using XML and Flash" from the site, basicly ALL i want to do is replace the graphical preloader with just a dynamic text boxes that just has "file size loaded, file size remaining, percent loaded" [itd be done as three seperate dynamic text boxes using the values
totalBytes = this.getBytesTotal();
loadedBytes = this.getBytesLoaded();
remainingBytes = totalBytes - loadedBytes
percentDone = int((loadedBytes/totalBytes)*100);
or something of the sort [this is all theory/whatever till i try to get it working haha!]
I guess the way to do it would be to replace the preloader with a dynamic text field(s) or something and then change the code
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
to something like
if (loaded != filesize) {
BLA BLA BLA WHATEVER WHATEVER
} else {
preloader._visible = false;
Any help or pointers muchly appreciated!! Ill work on it and post any results up here too!
Regards, Alex, from Perth, in the land "down under" ha ha!
This Is A Fix To The Image Gallery Tutorial - Makes It A Fully Dynamic Gallery
After searching and reading a couple of hundred post on the truly GREAT Kirupa image gallery tutorial - and wondering why nobody has written a new tutorial or at least updated the "old" one to avoid overloading the net with flash image gallery questions.
Im trying to create a new thread that will serve as a basic startingpoint for all Kirupa gallery questions. Im no überscripter nor do I know a lot about flash, but with a little common sense and perhaps some help from all of you... oh well - here goes:
Quick Checklist:
If your JPG's wont load - Make sure you don't save them as progressive JPG's, as they wont load in Flash.
If your images dont align to the photo container movieclip it is probably because your registration point of the photo MC is set to center instead of topleft.
Below is the code I have pieced together from different posts on the subject (I would like to credit all the authors, but that would require me reading all the posts again, as I have forgotten where I got them.
It produces a gallery that loads files dynamicaly thru a phpscript and checks for maximum image height/width and scales the images to fit within the photo MC. It also sets the center of the displayed images to a given coordinate (x,y).
All in all this is a install and forget image gallery, where the only maintaining required is uploading new pictures to the image folder.
On the server the file/directory structure is:
gallery swf
filearray.php
images/file_x.jpg
file_y.jpg
etc...
This is the filearray.php - modify this to check for files in the path set in the actionscript line: this.pathToPics = "images/";
PHP Code:
<?php if ($dir = opendir("images")) { while (($file = readdir($dir)) !== false) { $cont++; if ($file == "." || $file == "..") { } else { $string.= ($file); $string.= "&"; } } closedir($dir); } print($string); ?>
This is the modified actionscript from the original Kirupa gallery script:
ActionScript Code:
// This loads the array created by filearray.php and puts it into pArray lv = new LoadVars(); lv.load("filearray.php"); lv.onData = function(text){ pArray = text.split("&"); for (i=0; i<pArray.length-1; i++) { trace(pArray[i]); } } // variables ------------------------------------------ // put the path to your pics here, include the slashes (ie. "pics/") // leave it blank if they're in the same directory this.pathToPics = "images/"; // fill this array with your pics (set from filearray.php) this.pArray = pArray; this.fadeSpeed = 20; this.pIndex = 0; // MovieClip methods ---------------------------------- // d=direction; should 1 or -1 but can be any number //loads an image automatically when you run animation loadMovie(this.pathToPics+this.pArray[0], _root.photo); // Center the photo at (x,y) the coordinates are set in line 69 MovieClip.prototype.centered = function(x, y) { this._x = x-this._width/2; this._y = y-this._height/2; }; // Makes sure that the image fits within (wMax, hMax) MovieClip.prototype.resize = function(wMax, hMax) { while (this._width>wMax || this._height>hMax) { this._xscale = this._yscale -= 1; } }; // This line sets max width and max height (wMax, hMax) photo.resize(397, 297); MovieClip.prototype.changePhoto = function(d) { // make sure pIndex falls within pArray.length this.pIndex = (this.pIndex+d)%this.pArray.length; if (this.pIndex<0) { this.pIndex += this.pArray.length; } this.onEnterFrame = fadeOut; }; MovieClip.prototype.fadeOut = function() { if (this.photo._alpha>this.fadeSpeed) { this.photo._alpha -= this.fadeSpeed; } else { this.loadPhoto(); } }; MovieClip.prototype.loadPhoto = function() { // specify the movieclip to load images into var p = _root.photo; //------------------------------------------ p._alpha = 0; p.loadMovie(this.pathToPics+this.pArray[this.pIndex]); this.onEnterFrame = loadMeter; }; MovieClip.prototype.loadMeter = function() { var i, l, t; l = this.photo.getBytesLoaded(); t = this.photo.getBytesTotal(); if (t>0 && t == l) { this.onEnterFrame = fadeIn; // This line sets the (x,y) center of the image on the stage this.photo.centered(249, 213); } else { trace(l/t); } }; MovieClip.prototype.fadeIn = function() { if (this.photo._alpha<100-this.fadeSpeed) { this.photo._alpha += this.fadeSpeed; } else { this.photo._alpha = 100; this.onEnterFrame = null; } };
This should do it - the only thing I (think) I need some help with is changing the script to actually load the FIRST image, when the gallery loads. For some reason beyond my knowledge you have to click the next button for a image to load... What part of the script needs to be changed to make sure that a image is loaded on startup???
I hope someone will take the time to help develope this gallery tutorial / help file... It would be great if you added som more steps to the quick checklist... and of course fixed the load image on start problem....
This Is A Fix To The Image Gallery Tutorial - Makes It A Fully Dynamic Gallery
After searching and reading a couple of hundred post on the truly GREAT Kirupa image gallery tutorial - and wondering why nobody has written a new tutorial or at least updated the "old" one to avoid overloading the net with flash image gallery questions.
Im trying to create a new thread that will serve as a basic startingpoint for all Kirupa gallery questions. Im no überscripter nor do I know a lot about flash, but with a little common sense and perhaps some help from all of you... oh well - here goes:
Quick Checklist:
If your JPG's wont load - Make sure you don't save them as progressive JPG's, as they wont load in Flash.
If your images dont align to the photo container movieclip it is probably because your registration point of the photo MC is set to center instead of topleft.
Below is the code I have pieced together from different posts on the subject (I would like to credit all the authors, but that would require me reading all the posts again, as I have forgotten where I got them.
It produces a gallery that loads files dynamicaly thru a phpscript and checks for maximum image height/width and scales the images to fit within the photo MC. It also sets the center of the displayed images to a given coordinate (x,y).
All in all this is a install and forget image gallery, where the only maintaining required is uploading new pictures to the image folder.
On the server the file/directory structure is:
gallery swf
filearray.php
images/file_x.jpg
file_y.jpg
etc...
This is the filearray.php - modify this to check for files in the path set in the actionscript line: this.pathToPics = "images/";
PHP Code:
<?php if ($dir = opendir("images")) { while (($file = readdir($dir)) !== false) { $cont++; if ($file == "." || $file == "..") { } else { $string.= ($file); $string.= "&"; } } closedir($dir); } print($string); ?>
This is the modified actionscript from the original Kirupa gallery script:
ActionScript Code:
// This loads the array created by filearray.php and puts it into pArray lv = new LoadVars(); lv.load("filearray.php"); lv.onData = function(text){ pArray = text.split("&"); for (i=0; i<pArray.length-1; i++) { trace(pArray[i]); } } // variables ------------------------------------------ // put the path to your pics here, include the slashes (ie. "pics/") // leave it blank if they're in the same directory this.pathToPics = "images/"; // fill this array with your pics (set from filearray.php) this.pArray = pArray; this.fadeSpeed = 20; this.pIndex = 0; // MovieClip methods ---------------------------------- // d=direction; should 1 or -1 but can be any number //loads an image automatically when you run animation loadMovie(this.pathToPics+this.pArray[0], _root.photo); // Center the photo at (x,y) the coordinates are set in line 69 MovieClip.prototype.centered = function(x, y) { this._x = x-this._width/2; this._y = y-this._height/2; }; // Makes sure that the image fits within (wMax, hMax) MovieClip.prototype.resize = function(wMax, hMax) { while (this._width>wMax || this._height>hMax) { this._xscale = this._yscale -= 1; } }; // This line sets max width and max height (wMax, hMax) photo.resize(397, 297); MovieClip.prototype.changePhoto = function(d) { // make sure pIndex falls within pArray.length this.pIndex = (this.pIndex+d)%this.pArray.length; if (this.pIndex<0) { this.pIndex += this.pArray.length; } this.onEnterFrame = fadeOut; }; MovieClip.prototype.fadeOut = function() { if (this.photo._alpha>this.fadeSpeed) { this.photo._alpha -= this.fadeSpeed; } else { this.loadPhoto(); } }; MovieClip.prototype.loadPhoto = function() { // specify the movieclip to load images into var p = _root.photo; //------------------------------------------ p._alpha = 0; p.loadMovie(this.pathToPics+this.pArray[this.pIndex]); this.onEnterFrame = loadMeter; }; MovieClip.prototype.loadMeter = function() { var i, l, t; l = this.photo.getBytesLoaded(); t = this.photo.getBytesTotal(); if (t>0 && t == l) { this.onEnterFrame = fadeIn; // This line sets the (x,y) center of the image on the stage this.photo.centered(249, 213); } else { trace(l/t); } }; MovieClip.prototype.fadeIn = function() { if (this.photo._alpha<100-this.fadeSpeed) { this.photo._alpha += this.fadeSpeed; } else { this.photo._alpha = 100; this.onEnterFrame = null; } };
This should do it - the only thing I (think) I need some help with is changing the script to actually load the FIRST image, when the gallery loads. For some reason beyond my knowledge you have to click the next button for a image to load... What part of the script needs to be changed to make sure that a image is loaded on startup???
I hope someone will take the time to help develope this gallery tutorial / help file... It would be great if you added som more steps to the quick checklist... and of course fixed the load image on start problem....
Movie/anim Gallery? (not Image Gallery)
Ive come across this gallery and preloader
http://www.flashkit.com/movies/Scrip...7797/index.php
I love the way I can just dump my images in a folder and with a few tweaks it will put these images in the gallery.
What I am looking at is a way to do this with seperate .swf animations.
What I want to be able to do is dump a number of linear animation swf files into a folder, then when I launch the gallery, the first animation plays, and when it reaches the end it automatically plays the next animation in the folder. Then I want the whole thing to loop.
Any ideas?
XML Gallery - Generate XML Path For Image Gallery
I learned from great tutorial of kirupa .
I tried to create own image gallery, now I stay in front of problem.
How can I generate path for my images and thumbnails for XML file.
E.g. I have 110 images paths and 110 thumbnails path.
Manually takes it lot of time , how can I make this code for XML file?
<pic>
<image>images/img/ref/img/img_001.jpg</image>
<thumbnail>images/img/ref/thm/img_001.jpg</thumbnail>
</pic>
next node, next node,
...
last node:
<pic>
<image>images/img/ref/img/img_110.jpg</image>
<thumbnail>images/img/ref/thm/img_110.jpg</thumbnail>
</pic>
Product Gallery, Image Gallery Or Portfolio..
Hi! This is probably insanely much to ask for but I do it anyway This is for us designers that want to learn some action script to help us show some xml driven data in our flash projects.
I’ve been searching the web for tutorials that can help me with a specific project that I want to develop. I’ve found a bounce of things that is close to what I’m looking for but not right on the spot. And I think that there are many out there that are looking for the same tutorial as I am. For me the best way to learn is to deconstruct example files with code hints. So if any of you flash gurus out there could help us with an example .Fla for this project I think many would be very happy!
The project:
I want to create a gallery of “what ever”. It could be a product gallery, image gallery or a portfolio. This can be used for many things. I’ve attached an image (template.jpg) that pretty much explains what I’m looking for. I also included an example of how the xml file could look like.
I think this could be an excellent example for many designers/developers that are new to dealing with xml, images and flash.
Kirupa Picture Gallery / Keeping The Image On Stage As New Image Loads
Hi, I have the Kirupa Image Gallery implemented and it works great. But I was wondering how I can go about having the image stay on screen as it is loading the next image, so it's not such an abrupt transition. Currently the image container goes blank as it loads the next image. I assume I will need another image movieclip that sits underneath the first one... but then what?
Thanks!
Seeking Flash Image Gallery That Resizes Movie To Fit Image Dimensions
I am looking for a flash gallery that resizes the movie dimensions to fit the width and height of the image in real-time. Alternatively, the movie does not display a background color or border. I've used slideshowpro and it's feasible ...just looking for another suggestion. Prefer xml-based.
Image Streching For Unknown Reason In Dynamic Image Gallery
Hi everyone, this is my first time using flash.
I followed a tutorial at http://www.lukamaras.com/tutorials/a...e-gallery.html and everything is working okay, except when I view the big images they are 4x wider than they should be, stretching to the right. I think its a problem with action script maybe because I'm using cs3, and saving the file as flash 8? I'm not sure. I've included the file and the xml/photos it references in case anyone is nice enough to check out my problem.
http://www.mediafire.com/?euw1wywgnvg
Thanks! -mike
Actionscript Image Gallery > Updating Thumbnail And Main Image
Hi all,
I'm helping a friend produce a small Flash website. For some artwork/photos.
Basically a strip of thumbnail images at the bottom, clicking a thumbnail will load the (fullsize) image above.
Currently ten thumbnails scroll across.
**The problem**
.. is he wants to be able to drop a thumbnail image and the corresponding fullsize image into a folder on the server. The Movie should then display the latest additions. I can produce a simple slideshow where extra images are loaded at run-time (MX introduced this). But am trying to figure out how to update both the thumbnail strip and the main image.
Any help/pointers greatly appreciated.
Robert
XML Gallery: Preload On Current Image/cross-fade Image
Hello,
I am new to action script but I am learning quickly.
I took the following tutorials and made a hybrid:
Photo Gallery Using XML and Flash
Photo Slideshow Using XML and Flash
I redesigned the interface and created this:
http://www.onarresdesign.com/greg/work2.html
Everything works great, but now I want to take it further than the tutorial.
I am trying to make the images cross-fade. I am open to any suggestions and I have tried many techniques with little success.
Here is the closest solution steps I have come up with:
Code:
1) First image preloads (grey background showing)
2) First image loaded into top level MC 1
3) First image fades in
4) First image in top level MC 1 remains visible
5) First image gets loaded into bottom level MC 2 behind current movie clip.
6) Top level MC 1 clears because its preloading next image
Bottom level MC 2 remains visible
7) Preloader shows on top of bottom level MC 2
8) Next image is loaded into top level MC 1
9) Next image fades in (cross-fade effect achieved because previous image is behind it)
10) Next image gets loaded into bottom level MC 2
Repeat process
I can't get the action script to do what I want. I have off set the moveclips to show that the images are loading into both movieclips. I currently have the 'nextImage()' function controlling this so it is understandable the both images are cleared because the function is loading new images into the movie clips at the same time. How do I get one movie clip to remain constant while the other is loading? It seems to be a matter of where the function is placed. Or so I think.
I would appreciate any help I can get on this. If would also appreciate any suggestions for making the code for the control buttons cleaner.
Thank you,
</asla>
Rollover Image Gallery With Swap Image Effect?
I'm trying to do a flash banner like the one from:
http://www.eyeblaster.com/
when you rollover the buttons that say: eyeblaster ACM v2.0, advanced analytics, etc. the nice artistic banner appears. when you are no longer over it, it still stays to that same banner until you rollover the other buttons. so it's like a swap image effect, only in flash.
how would i go about this?
Photo Gallery Rollover Image Image Swap
I am using the XML Photo Gallery with thumbnails, and i have managed to modify it to suit my needs for the most part. However, some of the work i want to use it to display is photo restoration and i would like to be able to rollover the image and have a different image show on rollover. Something like you see here...http://homepage.mac.com/gapodaca/digital/bikini/ only using the XML Photo Gallery.
Any ideas?
Image Gallery... Save Image To Computer?
Hey all,
I just wondered if there was a way to save image files in a dynamic gallery? For example... when an image is displayed, a little save icon appears that allows the user to save the jpeg file to their computer. Thanks!
XML Image Gallery: Replacing Xml To Load New Image Set?
Hi Kirupa crew!
First, big thanks for this great site!
Second, I'm struggling a bit on xml and hoping for a hand. Your xml image gallery is a sweet piece of work, and I would like to be able to add the functionality of being able to load different galleries from a menu without loading a new mc with gallery inside it. I managed to botch the file up pretty good on my own, and was wondering if there is a ready answer nearby.
So I'm thinking have but1, but2 and but3, with a seperate xml file for each. What would you recommend for a smooth way to swap the the xml files to the gallery, and load the first image of the new xml file? Also, can it be done with one big ol' xml file while keeping the galleries seperate? It's not necessary, but could be handy, and save some loading.
It would also be interesting to apply the same principle to the resizing script that Scotty has in that big Resizing thread, just a thought.
Many many thanks!
John
Gallery Image Loading - Getting Image Width..help
Ladies and gents:
having a problem with my code somewhere; I'm stumped. Here's what i'm trying to do:
-When you click on a thumbnail in my gallery a load bar appears that is the width of the loading image
-While the image loads the load bar scales from full width to zero
-Once it finishes loading the image fades in
-Click on a new thumbnail, and the old image fades out, then the scrollbar is supposed to take the width of the NEW image and do the same thing
What is happening is that the scrollbar width does not set itself to the new image size until i click the thumbnail a second time...try this link to see what i mean. it's on the "portfolio" page.
http://www.lewisweb.ws/staging
here's the code:
Code:
//CONSTANTS
frame_x = 387; //the exact x coordinate where the box originates
frame_y = 184; //the exact y coordinate where the box originates
alphaSpeed = 5; //spped at which the pics fade in
//INITIAL SETTINGS
containerMC._alpha = 0;
containerMC._x = frame_x;
containerMC._y = frame_y;
//Fades in a picture loaded externally
MovieClip.prototype.loadPic = function(pic){
containerMC.fadeOldPic(); //fade out old picture
containerMC._alpha = 0;
this.loadMovie(pic); //load new pic
var loadIsComplete = false; //reset load checker
var w = containerMC._width;
loadBar._width = w; //set loadbar to new movieclip width
loadBar._alpha = 100; //make loadbar opaque
_root.onEnterFrame = function(){
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
loadIsComplete = (Math.round(l/t) == 1); //check to see if load completed
loadBar._width = w - ((l/t) * w); //sets width of loadbar dynamically
if (loadIsComplete){
containerMC._alpha += alphaSpeed; //if load is complete, fade pic in
}
//if the load is complete and the picture is fully faded in...
if (t != 0 && loadIsComplete && _root.containerMC._alpha == 100){
loadBar._alpha = 0; //make the load bar disappear
delete _root.onEnterFrame;
}
}
};
//Fades out an old picture...pretty self explanatory
MovieClip.prototype.fadeOldPic = function(){
_root.onEnterFrame = function(){
_root.containerMC._alpha -= alphaSpeed;
if (_root.containerMC._alpha == 0){
delete _root.onEnterFrame;
}
}
};
containerMC.loadPic("portfolio/westin.jpg");
stop();
ANY help will be appreciated!
Kirupa XML Image Gallery - Skip To Image
So I'm having some trouble modifying this script. I have a text box so a user can go to a certain image (In my case page). So if the user type 5 it should go to image 5.
I've tried numerous methods, none of which are working (they work but then my next and previous buttons aren't working properly). I know I need to just get go to the number image in the array but the way the script is set up it seems I would have to change the current position value but that doesn't seem to be the case.
Am I over complicating this?
ActionScript Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("xml/config.xml");
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
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++;
picture._alpha = 0;
picture.loadMovie("images/"+image[current_pos]+".jpg", 1);
picture_num();
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie("images/"+image[p]+".jpg", 1);
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie("images/"+image[0]+".jpg", 1);
picture_num();
}
}
function picture_num() {
current_pos = p+1;
_root.currPageNum.text = "Page " + current_pos;
}
_root.goButton.onPress = function(){
// load the image typed into the text area.
}
Flash 8 - Help W Xml Image Gallery, Thumbnails For Each Image
Hey.
New here and have found some really good tutorials! Thanks.
I desperately need a bit of help with some Actionscripting if anyone has any ideas how to do this?
I have created a photo gallery using the kirupa tutorial. That works fine. Now for each main image that the code cycles through my client wants 1-3 thumbnails to display on the side of the image and they should all be clickable and display full size in place of the main image when clicked. The previous and next buttons should still only go through the main images. Here is the xml code (as I imagine it should look like):
[code]
Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<pic>
<image>images/bowandkey_main.jpg</image>
<caption>Bow and Key Necklace: £225.00</caption>
<description>Mother of pearl (or onyx) necklace with silver-plated bow and key, cast from vintage originals </description>
<thumbnail>
<thumb1>thumbnails/bowandkey_main.jpg</thumb1>
<thumb2>thumbnails/bowandkey_portrait.jpg</thumb2>
<thumb3>thumbnails/bowandkey_closeup.jpg</thumb2>
</thumbnail>
</pic>
<pic>
<image>images/bowandkey2_main.jpg</image>
<caption>Bow and Key Necklace: £230.00</caption>
<description>Onyx necklace with silver-plated bow and key, cast from vintage originals </description>
<thumbnail>
<thumb1>thumbnails/bowandkey2_main.jpg</thumb1>
<thumb2>thumbnails/bowandkey2_portrait.jpg</thumb2>
</thumbnail>
</pic>
<pic>
<image>images/crossedfingers.jpg</image>
<caption>Crossed Fingers Necklace: £150.00</caption>
<description>Solid silver crossed fingers good luck charm, cast from 1940s celluloid gumball toy, strung on mother of pearl or onyx beads.</description>
<thumbnail>
<thumb1>thumbnails/crossedfingers_main.jpg</thumb1>
<thumb2>thumbnails/crossedfingers_closeup.jpg</thumb1>
</thumbnail>
</pic>
</images>
The thumb 1,2 and 3 are childNodes of thumbnail.
I have created a MovieClip holder to hold the thumbnails. Could someone please show me how to add to the Actionscript so that it loops through (displays) the thumb1 - thumb 3 for each main image? I suppose I would have to store the thumbnails for each image in separate folders so the flash can determine the length of the array of thumbnails for each image? And then make them clickable.
I am pulling my hair out here not getting this working... Any hinters on what to do would be greatly appreciated!
Here is the actionscript code for the image gallery:
Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
caption = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
caption[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
}
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.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
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);
cap_txt.text = caption[p];
desc_txt.text = description[p];
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
cap_txt.text = caption[p];
desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
cap_txt.text = caption[0];
desc_txt.text = description[0];
picture_num();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
Thanks!!
XML Image Gallery: Replacing Xml To Load New Image Set?
Hi Kirupa crew!
First, big thanks for this great site!
Second, I'm struggling a bit on xml and hoping for a hand. Your xml image gallery is a sweet piece of work, and I would like to be able to add the functionality of being able to load different galleries from a menu without loading a new mc with gallery inside it. I managed to botch the file up pretty good on my own, and was wondering if there is a ready answer nearby.
So I'm thinking have but1, but2 and but3, with a seperate xml file for each. What would you recommend for a smooth way to swap the the xml files to the gallery, and load the first image of the new xml file? Also, can it be done with one big ol' xml file while keeping the galleries seperate? It's not necessary, but could be handy, and save some loading.
It would also be interesting to apply the same principle to the resizing script that Scotty has in that big Resizing thread, just a thought.
Many many thanks!
John
Image Gallery - Image Width
Hi,
I'm putting an image gallery together with all the pictures at the same _y. Here's my AS code:
a = 1;
pushOverX = 0;
var my_lv:LoadVars = new LoadVars();
my_lv.onLoad = function(success:Boolean) {
if (success) {
while (a<100) {
slider_mc.attachMovie("holder", "holder"+a, a, {_xushOverX, _y:0});
set("slider_mc.holder"+a+".load_var", eval("this.data"+a));
a = a+1;
pushOverX = pushOverX+100;
if (eval("this.data"+a) == undefined) {
break;
}
}
}
};
my_lv.load("load_in/image_data.txt");
All that works fine. However, I would like the images to be placed on the _x axis according to the width of each previous image instead of relying on pushOverX = pushOverX+100;
At the moment, an image is placed every 100px, but if an image is 50, I want the following one to be placed 50px after it and not fixed at every 100px.
Has anybody got an idea?
Thanks
Help- How To Load First Image From XML Image Gallery
Hi-
Help- I'd like to making the first image load onto movie. Attached is the code. Any hints would be awesome.
myPhoto = new XML();
myPhoto.ignoreWhite = true;
myPhoto.onLoad = function(success) {
//portfolioTag = this.firstChild;
numimages = this.firstChild.childNodes.length;
spacing = 70;
for (i=0; i<numimages; i++) {
picHolder = this.firstChild.childNodes[i];
thumbHolder = thumbnails.createEmptyMovieClip("thumbnail"+i, i);
thumbHolder._x = i*spacing;
thumbLoader = thumbholder.createEmptyMovieClip("thumbnail_image" , 0);
thumbLoader.loadMovie(picHolder.attributes.appthmb );
thumbHolder.app = picHolder.attributes.app;
thumbHolder.appdesc = picHolder.attributes.appdesc;
thumbHolder.appmain = picHolder.attributes.appmain;
thumbHolder.onRelease = function() {
loader.loadMovie(this.appmain);
app_txt.text = this.app;
appdesc_txt.text = this.appdesc;
};
}
};
myPhoto.load("appphoto.xml");
XML Image Gallery Image Resize
I just got through with the XML image gallery tutorial that Kirupa made. First of all, I would like to thank him for it -- a great tutorial.
I am in the process of modifying the tutorial file to suit my needs, and I have come across a problem:
There is an empty movie clip with the instance name "image" that controls where the images from the XML flie are showed in the SWF. The empty movie clip "node" or placeholder aligns itself to the top left-hand corner of the images file. For my gallery to funciton correctly, I need the node to be aligned to the center of the image files, so I can display pictures of different aspect ratios and alignments. I will try and post a file on the internet some time today to demonstrate this if I am unclear with my explination. Thanks in advance!
XML Image Gallery - Setting X,y Of Image Via XML?
I'm working on version of Kirupa's XML Image Gallery, only I want to be able to set the x,y coordinates individually for each image. How do I do this via the XML.
I'm trying this to no avail:
XML looks like this:
<pic>
<image x="0" y="0">001.jpg</image>
<caption>description line 1</caption>
<caption2>description line 2</caption2>
<caption3>description line 3</caption3>
</pic>
<pic>
<image x="100" y="200">002.jpg</image>
<caption>description line 1</caption>
<caption2>description line 2</caption2>
<caption3>description line 3</caption3>
</pic>
Actionscript looks like this:
function placeImage() {
var image_x:Number = Number(picture.attributes.x);
var image_y:Number = Number(picture.attributes.y);
}
Can anyone let me know what I'm doing wrong, what I'm missing?
Or how better to go about this?
Thanks!
Centering Image In The Xml Image Gallery...
did the tutorial on this site for an xml image gallery - it worked great... My question would be is there a way to accomodate for multiple image sizes that would allow the image displayed to be centered?
Thanks!
Image Sizing In Image Gallery
I have used the Kirupa xml flash photo gallery at this link (code below) http://www.kirupa.com/developer/mx20...togallery9.htm
i was wondering how do i change the code so that the pictures can be different sizes... and where would the new code fit in to what i have already got from the tutorial?
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
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;
}
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.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
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;
}
thanks
cazwalks
XML Image Gallery Image Resize
I just got through with the XML image gallery tutorial that Kirupa made. First of all, I would like to thank him for it -- a great tutorial.
I am in the process of modifying the tutorial file to suit my needs, and I have come across a problem:
There is an empty movie clip with the instance name "image" that controls where the images from the XML flie are showed in the SWF. The empty movie clip "node" or placeholder aligns itself to the top left-hand corner of the images file. For my gallery to funciton correctly, I need the node to be aligned to the center of the image files, so I can display pictures of different aspect ratios and alignments. I will try and post a file on the internet some time today to demonstrate this if I am unclear with my explination. Thanks in advance!
[CS3] Simple Image Loop Not So Simple
I'm relatively new to Flash - I can do some basic animations but very little actionscript.
I'm looking for a tutorial to have a set of images scroll across and repeat themselves.
this is what I'd like... example
I can do a continuous loop of a simple background image with the 'goto' function, but I can't even find a tutorial on how to repeat individual images.
Any suggestions?
Thanks,
JTN
Simple Gallery
I am working on a portfolio site and have run into a bit of a problem with creating my gallery. What I planned to do was on the left, text that I created as a button (no thumbnails) and once it is clicked directly to the right is the image. I thought this would work using scenes but I never figured out the actionscripts to get the button to work.
Is there a way that I can use scenes or a better easier way. Its best (for me) to use as little actionscript as possible, as I tend to screw it up one way or another.
HELP Simple Gallery
hey everyone, i have made this gallery tutorial..and it works ok, but when i put a preloader, the preloader just doesnt work, i downloaded the fla source in the tutorial and tried to put a preloader but doesnt work too...i really need help on this..please!
click here to see the tutorial
thank you very much,
Val
|