PDA

View Full Version : photo galleries


jagguy
09-09-2006, 05:42 AM
hi

I am looking for tutorials to see how actionscript can be used to display photos .
I looking for tutorials that display images in a different manner to the typical 1 photo on screen and 2 buttons to move through them.
there must be other ways eg a line photos stretching off the screen and scroll through them or something.

I am not an expert or beginner and was after something with actionscript but not loads of add-in classes.

oldnewbie
09-09-2006, 07:42 AM
This ?

http://www.flash-db.com/Tutorials/simplegallery/

jagguy
09-09-2006, 10:04 AM
Hi

probably I am after a thumbnail row of pics and if there is a scroller somewhere , and to click on the thumbnamils for a bigger photo.

CyanBlue
09-09-2006, 10:52 PM
How about these crude ones??? :D

http://tutorials.flashvacuum.com/index.php?show=Gallery101
http://tutorials.flashvacuum.com/index.php?show=Gallery102
http://tutorials.flashvacuum.com/index.php?show=Gallery103
http://tutorials.flashvacuum.com/index.php?show=Gallery104

jagguy
09-10-2006, 04:11 AM
OK thanks for that.

What about a row of thumbnails wider than the screen and a button at each end to make them move through the list.
It seems you don't have thumbnails as seperate pictures but you need prepare them in 1 joined image .

orderxaos
09-10-2006, 07:16 AM
It seems you don't have thumbnails as seperate pictures but you need prepare them in 1 joined image .

gallery 102 clearly has 19 images and thumbs

jagguy
09-10-2006, 08:50 AM
Ok Now I am confused again because this flash program uses a scrollbar component FScrollBarClass which isn't UIscrollbar and has a ton of code.
What is this ?
In the library it says export FScrollBarSymbol

http://tutorials.flashvacuum.com/ind...how=Gallery102

jagguy
09-10-2006, 10:53 AM
Ok Now I am confused because this flash program uses a scrollbar component FScrollBarClass which isn't UIscrollbar and has a ton of code.
What is this ?
In the library it says export FScrollBarSymbol; I think it is from flashmx and i have flash 8 .

http://tutorials.flashvacuum.com/ind...how=Gallery102

CyanBlue
09-10-2006, 05:11 PM
Yup... It is for FMX not F8... ;)

CyanBlue
09-10-2006, 05:15 PM
That tutorial is made for FMX and I never had time to go any further than that nor update for the FMX 2004 or F8...
I suggest you borrow the logic in the tutorial and apply to whatever you have because the logic bit is not going to change much... ;)

silentweed
09-10-2006, 05:33 PM
this?

http://www.experiments.flashmatics.co.uk/category/gallery/photovideomusic/photovideogallery.htm

orderxaos
09-11-2006, 06:33 AM
nah i think he means a horizontal or vertical strip container with let's more images then can fit on the screen inside that scrolls to the right or left depending on a mouse position and stays centered when u on the middle or simpler controls < > to make the container scroll ...

jagguy
09-11-2006, 07:05 AM
How can i convert it to flash 8 because I have a tutorial which require scrollbar and scrollpane, after which the tutorial doesn't work with scrollbars in flash 8. It isn't as simple as just using flash 8 ones.

jagguy
09-11-2006, 07:19 AM
//this won't work with flash8 scrollpane

image_arr = new Array();
maxImages = 20;
for (var i = 0 ; i < maxImages ; i++)
{
image_arr.push("image" + i);
}

currentHolder = 0;
theDepth = 1000;
gap = 10;
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:topY});
this.thumb_sp.setSize(100 + gap + 16 + gap / 2, 200);
this.thumb_sp.boundingBox_mc._alpha = 0;

this.thumb_sp.setStyleProperty("arrow", 0x800080);
this.thumb_sp.setStyleProperty("scrollTrack", 0x88BBFF);
this.thumb_sp.setStyleProperty("face", 0x99CCFF);

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 = ((i % 2) * (50 + gap));
this.thumb_mc["thumb" + i + "_mc"]._y = Math.floor(i / 2) * (33 + gap);
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(thi s._parent);
this._parent._parent.thumb_sp.refreshPane();
delete this.onEnterFrame;
this.removeMovieClip();
}
};
}

function loadImage(num)
{
_global.imageLoaded = false;
this["img" + currentHolder + "_mc"]._x = 175;
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 = topY;
_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);

jagguy
09-11-2006, 08:39 AM
nah i think he means a horizontal or vertical strip container with let's more images then can fit on the screen inside that scrolls to the right or left depending on a mouse position and stays centered when u on the middle or simpler controls < > to make the container scroll ...

yep that's what i want but with flash8 and actionscript.

I can't find this as i get either too little AS or flashmx with code that you can't dupilicate in flash8.

sleekdigital
09-12-2006, 01:01 AM
I use this code...

http://www.sleekdigital.com/News/5.aspx

in my photogallery...

http://www.sleekdigital.com/photogallery/main.html?c=Bugs_Life&p=tigerswallow5130.jpg

jagguy
09-12-2006, 12:16 PM
Ok thanks for that i will have a look at it.
I have had a few postings lately and might slow it down due to maybe being a pest with new posts.

On a side note, I have found all I need to move things around and have them beahve like scroll behaviour is just basic actionscript.
MMOvie clips can be made to click and move and be drawn over other objects. So to have a thumbnail row and side scroll buttons all i need is to just move an image(s) underneath a background color and draw buttons on top; add MC's onpress to click for other events.

This saves time and file size which was my original concern.
Life is easier without component bandwidth and complications on how they work.