Simple Gallery Example Flash With PHP Serving Image List And Image Sizes
this is simple gallery example for AS2gallery is nothing special ease to use and implementinteresting 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 madeexample : http://www.hagane.us/as/gallery/ZIP : http://www.hagane.us/as/gallery/gallery.zipblogpost : http://mrsteel.wordpress.com/2008/01...s-from-folder/
KirupaForum > Talk > Source/Experiments
Posted on: 01-08-2008, 02:50 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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!
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.
Will Flash Optimize Image Sizes?
Hello again everybody :)
I have a question about the optimization of pictures placed in a Flash stage.
If I put a big sized pictures (for example: 1024 x 1024) and if, in the final result, the picture is downscaled on the Flash stage (for example : 200x200 pixels), once the swf is created , will the picture be as heavy as before it was downscaled, when the flash web site will be loaded in browsers?
Thanks
Gz
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!!
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.
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
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!
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 Sizes & Thumbnails
Hi there,
just a basic question:
In my project I´ve large images, which needs some thumbnails, too.
What would you do: Scale them down in flash with actionscript or to create the thumbnails in photoshop prior to use?
Thanks!
Printing Image Sizes
Hi,
I have a flash movie that displays pictures and allows users to print them out. This works fine. The only problems is that I want to determine the size of the output, ie. fill the page, etc. Is there any way to do this,
Thanks in advance,
Pete,
www.plexusdesigns.co.uk
RollOver Image, Help On Sizes.
hi,
we are tring to clone this : http://www.jeffreyhein.com/welcome.html . please visit it and watch the rollOver effect. see how thumbnails get bigger with not spotting a difference in the image quality ?
then, go to my sample at http://nozilla.org/radu/resize/ and see how things get "nasty" when i rollOver after the thumbnail gets a bit bigger? firstly is set to 80x80 and i resize it to 95x95. can you tell me how they did it so there is no quality difference between initial thumbnail and second rolled thumbnail. my thumbnails are loaded from XML, maybe Jeff's are not ? maybe ? can you help me ?
thanks a lot
LoadMovie And Image Sizes
Hey,
I'm trying to dynamically load an image into a movieclip and then scale it to fit.
Loading the image using loadMovie isn't difficult, what I can't figure out is how to resize the loaded image to match either the width or the height of the movieclip depending on the proportions of the image.
How would I go about doing this?
thanks
RollOver Image, Help On Sizes.
hi,
we are tring to clone this : http://www.jeffreyhein.com/welcome.html . please visit it and watch the rollOver effect. see how thumbnails get bigger with not spotting a difference in the image quality ?
then, go to my sample at http://www.nozilla.org/radu and see how things get "nasty" when i rollOver after the thumbnail gets a bit bigger? firstly is set to 80x80 and i resize it to 95x95. can you tell me how they did it so there is no quality difference between initial thumbnail and second rolled thumbnail. my thumbnails are loaded from XML, maybe Jeff's are not ? maybe ? can you help me ? my images look very pixelate when i bring them to 95x95
thanks a lot
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.
}
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 Sizes Related To Browser
I am trying to build a nav bar in Fireworks that will go horizontal across the entire browser. I recommend browsing in 1024x768 on the site. So, what stage size would I use in Fireworks or Flash to accompish this when i import it into Dreamweaver to build the site?
Thanx.
If this is in a tutorial or you know of basic layout tutorials, can you please let me know. Thanx.
Adjusting Loaded Image Sizes
I'm trying to load a jpeg and resize it to fit the screen. I load the jpeg into an empty movie, which works fine, but I can't resize the picture to fill the screen. Does anyone know how to do it?
My code which isn't working is:
loadMovie(myLocal_so.data.backimage,_root.backimg) ;
setProperty("_root.backimg", _width, 700);
setProperty("_root.backimg", _height, 550);
*myLocal_so.backimage is the path + filename of the jpeg
the movie is 700x550
Dynamically Changing Image Sizes
If anyone could clue me in on if there is a way to dynamically change the size of images in your flash movie. In other words, if I am using thumbnail pics on each frame, can I just have it call an image and then resize it when it is imported to my movie. This would make it a lot simpler than having to resize each picture in an editing program every time I need to create a new thumbnail. Any help would be greatly appreciated.
Brian Walsh
Resize The Stage To Match Image Sizes
I have a simple Document Class file which will load a different sized .gif image at runtime by referencing XML data loaded to it with a URLLoader. The XML, includes width and height tags giving the image's dimensions. I use these dimensions to set width and height variables in the document class file.
I then need to use the variables to dynamically change the size of the SWF that displays at runtime to exactly match the uploaded image's size. The SWF is embedded in an HTML page, which uses the same variable data to set the dimensions for the embedded SWF object.
Does anyone know how to code AS3 such that it take the dimensions varialbes and change the stage size?
Loading Image With Random Sizes But Same Place
hello!
i have a swf with a list of images on the left and what i want to do is when i click in the image , it will creat an empty movieclip and send an image inside.
i know how to do this, but the problem is that i have a 300x200, 200x300 and another sizes, but the max width and hiehgt is 300x300, so i need a 300x300 movieclip and my dificultie is to make the images stay exactly in the middle of the invisible movieclips o they dotn load around places i dont want to
im trying with this:
// creating clips
this.createEmptyMovieClip("containerFoto", this.getNextHighestDepth());
containerFoto.createEmptyMovieClip("foto", containerFoto.getNextHighestDepth());
var fotoLoader:MovieClipLoader = new MovieClipLoader();
fotoLoader.loadClip("imagens/fotos/1.jpg", containerFoto.foto);
containerFoto._visible = false;
//trying to get the width and height of the just loaded image
var novaWidth:Number = containerFoto.foto._width;
var novaHeight:Number = containerFoto.foto._height;
if (novaWidth <=300){
containerFoto. _x = 400;
} else{
containerFoto._x = 250;
}
containerFoto._visible = true;
in this code the problem is that im notgettting the width and hieght of the image.
annyone knows a simple way to do this? thanks and if you dont understand something plz tell
thanks in advance!
True Image Sizes Visible Only When Zoomed In
Hello everyone,
Compleate newbie to Flash here so pardon the ignorance.
Inherited a small flash file and trying to Import some new images into it ...a simple slide show concept.
Whenever I import an image it seems that its 'true size' is not inserted into a document but rather some resized version of it.
Ones the movie is exported image remains 'small'. Only after I manually zoom into the movie the image sharpness and size is revealed to what it should be before Flash...only now I can see a small percentage of the whole movie due to zoom.
Also original image is:
JPG 260 x 790 px
while in Flash it is imported as:
BMP 93.6 x 258.9 px
So to ask bluntly what is Flash doing to my images? Is there a setting that I am missing here? Again, my flash experince is equal to going through builtin tuts and lessons
Suddenly DW icon looks a lot better than FL :)
Thanks for your time!
All the best!
:--------------------------------------:
All around in my home town,
They tryin' to track me down...
Standalone Question: How 2 Keep Fixed Image Sizes?
I did some work in Flash and had the work distributed on a CD ROM.
I made a standalone Flash projecter file.
The problem is: the work looks fine on my flat screen 15" monitor.
When you take the work to a different size monitor... the work looks a bit out of place. : (
How can I force Flash to keep the correct size?
I read that you can do this in Flash MX.
(But I can't remember where I saw it!)
Any help would be appreciated.
Thanks.
Jam
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
|