Scrolling Thumbnail Gallery And Loading Pics Into 'loader'
Okay, I have a scrolling thumbnail gallery, all I want is to click on the thumbnail and the big picture appears in the loader. The scrolling thumbnails part work fine, it scrolls and all. I used the scrollpane. The thumbs are in a movie clip called content_mc. I made the thumbnails buttons and when you click on the thumb the bigger picture is suppose to load from the server into the loader to of course keep the page and the gallery from loading slowly when the page first loads.
the code for the button is:
on(release) { myloader.contentPath = "thepicname.jpg"; }
simple right? why won't it load into the loader? the pics are in the same folder as the original flash file. it works fine if the thumbs aren't in a scrollpane..... confused.... please help
SitePoint > Design Your Site > Flash and Actionscript
Posted on: Jun 25, 2008, 19:21
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Dynamic Pic Loader From Scrolling Pics Doesn't Load - Please Help
Could someone please help me at getting this scrolling picture gallery to load the pictures dynamically from the button pics I've placed inside of it, so that the higher resolution pictures intended for the loader will load in dynamically. I can't figure out where it's not working correctly.
thanks.
File link is here:
http://www.johnmichaelpendley.com/fl...picloader2.fla
Scrolling My Gallery Pics - How?
I have a plethora of gallery thumbnails built into my Flash Site that require some kind of scrollbar added to it. The size of the movie will not hold the entire list of thumbnails, so a scrollbar is needed.
An example of what I need is located in the gallery section at: www.flickerstick.com
Does anybody have a solution?
Scrolling Thumbnail Gallery
I want to create a small gallery of images for a portfolio. I like the treatment used on http://www.sf49ers.com where you can click on the image to advance to the next image, although I'd probably do mine as a rollover. I can figure out the button to forward to the next image, but it's the back button that's thrown me for a loop. How do you get a movie clip to play "in reverse"? Also, how do you make the images repeat seamlessly. I'm guessing that it's two movie clips back to back, but I'm not sure.
Any suggestions would be greatly appreciated.
Thanks!!
Scrolling Thumbnail Gallery...HELP
Can anybody point my in the direction of a good tutorial for a scrolling thumbnail gallery, I have created a movie clip called scroll which contains all the individual thumbnails, and also know how to mask it so only a couple thumbnails show on stage, really it is the action script to control the scrolling action back and forth, and the script to open the movie clip of the full size image on the stage that I am looking for.
This is only the way I thought about creating this, any other perhaps easier options would be appreciated, cant seen to find a good tut on the web.
Regards,
Ryan (beginner/intermediate flash user)
Loading Pics Into Gallery
I have created a small photo gallery, when you click on the thumbnails they appear larger in a new box. This works fine on my desktop but when I put the swf into my html page it will not bring the larger pictures in. I believe I need loaders in each file but I do not know what these are, where to find them or what to do with them. Please can someone help me?
Many thanks
Photo Gallery Thumbnail Scrolling
can anyone tell me how (or give me a link to a tutorial that will enable me to) to create the scrolling effect used in this movie. i mean the way the thumbnails scroll when you use the arrows.
http://buggedcom.50megs.com/protogallery.html
thanks in advance
Spacing A Scrolling Thumbnail Gallery
Hiya,
OK...easiest thing is for you to take a look at this CLICK FOR SAMPLE
Click on photo...click to view portfolio...click landscapes and you'll get an idea of what i'm trying to achieve.
The idea is that when you roll over the images they grow to give a larger view. Each thumbnail is a movie with action script to make it expand on rollover and shrink on rollout.
As you can see, when the images expand they overlap the thumbnails and appear under the thumbnails on the right...doesnt look too impressive. Obviously the effect i wish to achieve is that the thumbnails spread either side of the enlarged image. Is there any coding I can sue to achieve this?
Alternatively (and possibly in preference to this) is it possible to create the effect of a mac dock - i.e. the images gradually get smaller away from the cursor - SEE THIS IMAGE. I'm guessing I would need to define an objects size depending upon how close to its centre the cursor is.
Can anyone help me out?
Thanks very much!
Alex
Horizontal Scrolling Thumbnail Gallery
Hi all, I am working on a photo gallery that has three separate rows of thumbnail images (each row is a movie clip) and I would like to make it so that you can scroll through each of them horizontally.
I am looking for the functionality shown on the Cole Haan g series site (the shoe selector at the bottom with the two arrows):
http://www.colehaan.com/cgi-bin/cole...ame=GRACEFIELD
please please help, I have tried searching the site but have only found infinite menu stuff and I am just not good enough to alter it to make it worrk how I want it to!
Problem W/ Scrolling Thumbnail Gallery
Hi,
I just completed the tutorial on this site for the scrolling photo gallery with thumbnail images. It was easy to follow and worked. I neede to then customize it to my needs, so I did, still worked w/o a hitch. then I edited the xml document to reflect the images I wanted to use. I put all the photos (including thumbnails) in one folder and refelcet the path in the xml document. Problem begins here...I test the gallery and the large pictures appear w/ the previous and next buttons, but the thumbnails don't appear, i've treid just about everything I can think of, changing the name of the files, etc. But it just won't work. Anyone have any suggestions? Thanks
Horizontal Scrolling Thumbnail Gallery
Hi all, I am working on a photo gallery that has three separate rows of thumbnail images (each row is a movie clip) and I would like to make it so that you can scroll through each of them horizontally.
I am looking for the functionality shown on the Cole Haan g series site (the shoe selector at the bottom with the two arrows):
http://www.colehaan.com/cgi-bin/cole...ame=GRACEFIELD
please please help, I have tried searching the site but have only found infinite menu stuff and I am just not good enough to alter it to make it worrk how I want it to!
Stop Scrolling Thumbnail Gallery
Hi
I have a simple thumbnail gallery that loops. but i need to stop it when the viewer rolls over it.
Code:
onClipEvent (enterFrame)
{
for (i = 1; i <= 15; i++)
{
var slide = eval("slide_" + i);
slide._x = slide._x - 1;
if (slide._x + slide._width < 0)
{
slide._x = slide._x + 1125;
}
}
}
is there a simple way because if i set it up as a tween its jurky and larger file.
many thanks
Problem With Loading Pics In A Photo Gallery
Ok.. I don't know what is the problem for this.. maybe someone with more experience bumped to this too.. and can help me out..
I will put the link here so u can see it but before u open it, pay attention of the mess.. pictures are loaded one over another or not loaded at all.. There are 2 panels of the same pics and code, the second one loads the pics the same way as the first one right after the first one has finished loading all of the pics. But strangely the second panel with pics has absolutely no problem with positioning the pics correctly with their correct size even the first time u open it. (this comes from the swf of the pic that loads in the loader; they all load in loaders positioned by me). After the gallery has loaded the first time and u Refresh the page.. u will see the gallery works perfect. If u want to see the mess up again, just delete ur temporary internet files and refresh the page again. Here is my gallery (not finished yet):
http://www.goliveuk.com/Projects/Theolife/
NOTICE:
When I test this in flash with simulate download, all works fine except that some pics show progress of loading (I've made listeners for that) and on complete I trace it completed loading but they don't show up..
So I can't figure out what might be causing this problem...
As far as my logic goes.. I can tell that if in the second panel the pics load succesfully every time, this means that the problem comes only the first time they are being loaded.. for me this doesn't make any sense.. and I see as solution to make some invisiblemovie clip that will load all of my pics for the first time and then the actual visible movie clips that are visible will continue so there are no problems.
I don't know if this will work.. it is just my thinking.
Maybe there is some other way to fix this when they load the first time.. maybe telling the code to load it.. and reload it after that ?
Any ideas what could be causing this problem ?
Hope someone can explain to me..
Thanks in advance...
Preloader Question For Pic Gallery With Pics Loading At Runtime
I am trying to make a preloader for a site in which the vast majority of the size is contained in images that are in the library and are loaded in at runtime. when I try to set up a normal loader for the site, the preloader never shows up because (I'm just assuming this, but it seems a safe assumption) Flash loads up the dynamically loaded images before showing anything on screen - and by the time those are loaded there's not much reason for the preloader in the first place.
so, two questions - number one, am I right about this assumption? and number 2, what kind of preloader can be set up in this situation? please help - I've got a fully finished site just sitting there because I can't figure out how to work around this.
thanks!
Thumbnail Xml Gallery Loading Problem
hello folks!
got one big problem with this thumbnail gallery.. i tested it localy with apache and php and it worked nice! i uploaded it to the web provider and the script freaks out.. like it won't read the stop(); on second frame.. maybe someone can help me out!?
klick on a folder to see what i mean with freakin out!
http://www.petznick.at/ludschi/index.php
frame one:
PHP Code:
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].attributes.href; description[i] = xmlNode.childNodes[i].attributes.name; } gotoAndPlay(2); } else { trace("xmlfile not loaded"); } } xmlData = new XML(); xmlData.ignoreWhite = true; xmlData.onLoad = loadXML; xmlData.load("lib.php?function=getThumbfiles&dir=Wallpapers");
frame two:
PHP Code:
var x = 15; var y = 15; for (u=0; u<total; u++) { var turl = "pic_srv.php?img=Wallpapers/" + image[u] + "&x=100&y=100"; var t = this.createEmptyMovieClip ("thumbnail" + u, u); var c = t.createEmptyMovieClip ("picHolder", 0); c.loadMovie (turl); c._x = x + u * (100 + x); c._y = y; t.url = "Wallpapers/" + image[u]; t.onRelease = function() { _root.mc_wallpaperopener.loadMovie(this.url); } } stop();
thanks in advance!!!
oliver
Loading Thumbnail Gallery Externally..
Hi,
I'm loading the thumbnail gallery feautered here on this page externally, but it is giving me some headaches..
I've managed to get the thumbnails working by removing the _root command in that section, but I still can't get the titles, pic no. and preloader to work.
Here is the code I'm using:
ActionScript Code:
function loadXML(loaded) { if (loaded) { xmlNode = this.firstChild; image = []; description = []; thumbnails = []; total = xmlNode.childNodes.length; for (i=0; i<total; i++) { image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue; description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue; thumbnails[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue; thumbnails_fn(i); } firstImage(); } else { content = "file not loaded!"; }}xmlData = new XML();xmlData.ignoreWhite = true;xmlData.onLoad = loadXML;xmlData.load("images.xml");///////////////////////////////////// listen = new Object();listen.onKeyDown = function() { if (Key.getCode() == Key.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;}function thumbNailScroller() { // thumbnail code! this.createEmptyMovieClip("tscroller", 1000); scroll_speed = 10; tscroller.onEnterFrame = function() { if ((_ymouse>=thumbnail_mc._y) && (_ymouse<=thumbnail_mc._y+thumbnail_mc._height)) { if ((_xmouse>=(hit_right._x-40)) && (thumbnail_mc.hitTest(hit_right))) { thumbnail_mc._x -= scroll_speed; } else if ((_xmouse<=(hit_left._x+40)) && (thumbnail_mc.hitTest(hit_left))) { thumbnail_mc._x += scroll_speed; } } else { delete tscroller.onEnterFrame; } };}function thumbnails_fn(k) { thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth()); tlistener = new Object(); tlistener.onLoadInit = function(target_mc) { target_mc._x = 20+(target_mc._width+5)*k; target_mc.pictureValue = k; target_mc.onRelease = function() { p = this.pictureValue-1; nextImage(); }; target_mc.onRollOver = function() { this._alpha = 50; thumbNailScroller(); }; target_mc.onRollOut = function() { this._alpha = 100; }; }; image_mcl = new MovieClipLoader(); image_mcl.addListener(tlistener); image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);}
Any help would be highly appreciated!!
Best regards,
Marius
XML Thumbnail Gallery Images Not Loading
I finished the tutorial on the XML Thumbnail photogallery and got it to work fine. I then started making changes to it such as adding an expanded description field and linking to my own images and thumbnails. When I test the movie with links to my images in the XML file I get an "Error Opening the URL" message. If it replace my image link with the default one from the tutorial everything works fine. I'm trying to run this from my local HD not from a server and I've made sure my jpgs are not saved as progressive.
Here is the XML code I have for my images:
<pic>
<image>images/mountain_full.jpg</image>
<caption>The best title ever</caption>
<thumbnail>thumbs/mountain.jpg</thumbnail>
<description>This is an example description</description>
</pic>
Anyone have any suggestions?
Xml Thumbnail Gallery Issue Xml Not Loading
Ok so i have looked thru the forums for the past two days trying to solve my issue and i didnt find anything that works. I have the xml thumbnail gallery from the site working here.Its the base code except i change some things so that it would work if i loaded with the mxloader component into another movie. When i try and do so the XML file doesnt load. you can see this here. Im not sure if theres something else that i need to do to make this work or what, but i cant seem to figure it out. all the paths are absolute paths (http://ect...). and even stranger is that it worked like 3 or 4 times when i first started then stopped working. so i dont know if its a server issue or if im overlooking something. I am new to the whole AS thing so be gentle.... Any help with this would be great.
Thanks
Scrolling Thumbnail Panel Problem When Loading In Via
I have a problem with Lee's tutorial on Scrolling Thumbnail Panel, I have a full working Scrolling Thumbnail Panel.
But when i load the .swf file in which has Scrolling Thumbnail Panel on i get really jerky and sometimes non responsive sliding. I am also unable to access the buttons.
Does anybody know how to fix this problem ? :wink:
Thanks
Dunkyb123
Loading Dragable Mask In SWF With Scrolling Thumbnail
Hello
I would want the button in scrolling thumbnail to load a swf above it. The probleme is my swf contain a dragable mask and once it is loaded, I am not able to click on thumbnail anymore.
It would be more understandable by seing it in action.
http://www.fib6.com/test/essai.swf
I use place this code in scroller to load the swf :
Code:
panel.b1.onRelease = function() {
container.loadMovie("retouche1.swf");
}
Like you can see, I have another probleme with the before/after bar. I manage to make it follow the dragavble mask in the original swf but when I insert it in another one , it stop following....
Here is the originale one :
http://www.fib6.com/test/retouche1.swf
The code I used to make this is :
Code:
onClipEvent (load) {
this.startDrag(true,0,0,337,0);
dragging=true;
}
onClipEvent(enterFrame){
if(dragging){
_root.ba._x = this._x+170;
_root.ba._y = this._y;
}
}
where ba is the movie clip containing the before/after bar.
And last thing, I don't understand why the grey background doesn't appear whend the swf is loaded
I know it has to be really simple to solve but like I already explained , I am a total noob with actionscript.
Thanks in advance for you help
Loading Images With XML In Vertical Scrolling Thumbnail Pane
Hi,
Is there someone who can help me?
I've written a php-script to create an xml-file for my images.
I want to use the xml to load images automatic in my flash movie.
I used the tutorial Scrolling Thumbnail Panel and converted it to a vertical scroller.
Now I don't want to use hardcoded images, but with the xml.
Is there someone who knows how to start, because I am new in the flash-thing.
Thank you!!!
my xmloutput: http://trekpaardpromotie.be/GHANNAH_php/xml_images.php
the application I want the xml to load in: http://trekpaardpromotie.be/GHANNAH_php/img/scrollertest2.swf
Loading Dynamic Gallery Thumbnail Images Overrides Variables
i think the issue with the following code is one of scope or pathing, but after hours of trial and error, i just can't figure it out:
this._lockroot = true;
//set up variables for loading jpg files
var thumbnailMCL:MovieClipLoader = new MovieClipLoader();
var thumbnailMCL_listener:Object = new Object();
thumbnailMCL.addListener(thumbnailMCL_listener);
thumbnailMCListener.onLoadError = function() {
trace("thumbnailMCL Load Error");
}
thumbnailMCL_listener.onLoadComplete = function() {
assignThumbnailInteractivity(thumbnailAddingIntera ctivity);
_root["thumb" + thumbnailAddingInteractvity].thumbNum = thumbnailAddingInteractivity;
thumbnailAddingInteractivity++;
}
//set up variables for displaying images
var curImageNum:Number = 0;
var oldImageNum:Number = 0;
var curDepth:Number = 1;
var totalImages:Number = 58;
var thumbSize:Number = 75;
var imageSize:Number = 300;
var sliderSetWidth:Number = 500;
var sliderSetHeight:Number = 8;
var sliderSetYPos:Number = 550;
var thumbnailSpacing:Number = 10;
var thumbYPos:Number = sliderSetYPos - thumbSize - Math.round(Stage.height * .05);
var thumbnailFadeSpeed:Number = 1.5;
var mainFadeSpeed:Number = 1;
var alphaDisabled:Number = 30;
var widthOfAllThumbnails:Number = (totalImages * thumbSize) + ((totalImages - 1) * thumbnailSpacing);
var thumbnailAddingInteractivity:Number = 0;
function makeMainImageViewer(depth) {
_root.createEmptyMovieClip("photos", depth);
with(_root.photos) {
enabled = true;
_alpha = 100;
trackAsMenu = true;
visible = true;
_x = (Stage.width - _width) / 2;
_y = Stage.height * .1;
_root.myMCL.loadClip("photos/image0.jpg", _root.photos);
}
}
function createThumbnails(startDepth) {
trace("creating thumbnails......");
for (a = 0; a < totalImages; a++) {
trace("creating thumbnail" + a);
_root.createEmptyMovieClip("thumb" + a, a + startDepth);
//_root["thumb" + a].thumbNum = a;
trace("_root.thumb" + a + ".thumbNum = " + _root["thumb" + a].thumbNum);
with(_root["thumb" + a]) {
enabled = true;
_alpha = alphaDisabled;
trackAsMenu = true;
var thumbNum = a;
}
}
}
function createThumbnailsTwo () {
for (a = 0; a < totalImages; a++) {
_root.thumbnailMCL.loadClip("photos/thumb" + a + ".jpg", _root["thumb" + a]);
//_root["thumb" + a].thumbNum = a;
//assignThumbnailInteractivity(a);
}
}
function assignThumbnailInteractivity(thumbnailToAddInterac tivityTo:Number) {
//thumbnails load coinciding full sized images into "viewer" when clicked on
trace("assigning interactivity to thumbnail" + thumbnailToAddInteractivityTo);
_root["thumb" + thumbnailToAddInteractivityTo].onPress = function() {
oldImageNum = curImageNum;
curImageNum = this.thumbNum;
trace("oldImageNum = " + oldImageNum);
trace("curImageNum = " + curImageNum);
//trace("this.thumbNum = " + this.thumbNum);
trace("_root.thumb" + thumbnailToAddInteractivityTo + ".thumbNum = " + _root["thumb" + thumbnailToAddInteractivityTo].thumbNum);
_root.enableAllThumbnails();
this.enabled = false;
this._alpha = 100;
fadeUp(_root["thumb" + oldImageNum], 100, alphaDisabled, thumbnailFadeSpeed);
var fadeTween = new mx.transitions.Tween(_root.photos, "_alpha", mx.transitions.easing.Strong.easeOut, 100, 0, _root.mainFadeSpeed, true);
fadeTween.onMotionFinished = function() {
_root.myMCL.loadClip("photos/image" + _root.curImageNum + ".jpg", _root.photos);
fadeDown(_root.photos, 0, 100, _root.mainFadeSpeed);
}
}
//set up fade in/fade out (_alpha change) animations for thumbnails onMouseOver & onMouseOut events
_root["thumb" + thumbnailToAddInteractivityTo].onRollOver = function() {
fadeUp(this, _root.alphaDisabled, 100, _root.thumbnailFadeSpeed);
}
_root["thumb" + thumbnailToAddInteractivityTo].onRollOut = function() {
fadeUp(this, 100, _root.alphaDisabled, _root.thumbnailFadeSpeed);
}
}
makeMainImageViewer(20);
createThumbnails(50);
createThumbnailsTwo();
the problem is that as soon as i click on a thumbnail (w/ an image loaded into it), the trace call in function assignThumbnailInteractivity tells me that this.thumbNum is undefined. However, by commenting out in createThumbnailsTwo() as so:
_root.thumbnailMCL.loadClip("photos/thumb" + a + ".jpg", _root["thumb" + a]);
//_root["thumb" + a].thumbNum = a;
//assignThumbnailInteractivity(a);
is:
//_root.thumbnailMCL.loadClip("photos/thumb" + a + ".jpg", _root["thumb" + a]);
//_root["thumb" + a].thumbNum = a;
assignThumbnailInteractivity(a);
lets me have all the functions i want with the place holder thumbnails (black squares). the trace call to this.thumbNum in assignThumbnailInteractivity does not get "undefined" and instead operates exactly as i want. i've also tried changing
oldImageNum = curImageNum;
curImageNum = this.thumbNum;
to
_root.oldImageNum = _root.curImageNum;
_root.curImageNum = _root["thumb" + thumbnailToAddInteractivityTo].thumbNum;
to no avail.
so, by process of elimination, obviously something is happening when i load an image that erases my assignment of this.thumbNum. any ideas? or is there actually a function native to flash where i could find out which thumb# i'm inside from inside a function?
should i change how i handle the onLoadComplete MovieClipLoader listener event handler? assigning the onMouseEvent handles w/o waiting for the onLoadComplete would have images load, and disable interactivity, so i guess loading images using MCL overrides any custom variables and event handling functions????
also, i'm betting that i don't need to draw temp images for the thumbnails. but when i take that code out, the thumbnails don't display at all.
any help would be greatly appreciated!
Image Gallery Thumbnail OnRelease Array Or XML Loading Problem
I'm using Flash CS3, but this project began in 8 and uses AS 1 and 2, so I figured this was the more appropriate section.
So I have a basic photo album for prototyping that is populated by values from an XML file. There are 9 maximum thumbnails (3 x 3) in each album. This all works.
Upon onRelease of each thumbnail a pop up larger-view movie clip appears to display the respective larger image. The viewer movie clip appears fine and in the correct position. The problem is the larger image does not get loaded into the holder clip within the viewer. Output is telling me that the value that I'm pulling from the XML file is undefined.
Both the thumbs and the larger images are using the same XML file and the same array. All of the pertinent code is within a class. All the correct files are in the folder they should be in. It is not a file not found error. Typos have been accounted for. The code for populating the thumbs is almost identical to the code for the larger image. It's just that one works, and the other doesn't.
Code:
class Photos extends MovieClip {
//
public var a:Number;
public var i:Number;
//
public function Photos() {
//load in XML
_root.photoXML = new XML();
_root.photoXML.ignoreWhite = true;
_root.photoXML.load("xmlData/photos.xml");
_root.photoXML.onLoad = function(success){
if(success) {
this.XmlConnect();
}
}
}
public function goPhotos() {
//
//First build arrays:
_root.photosArray = new Array();
_root.totalPhotos = _root.photoXML.childNodes[0].childNodes.length;
// fill arrays ::
for (a=0; a<_root.totalPhotos; a++) {
if(_root.photoXML.childNodes[0].childNodes[a].attributes.blockNum == _root.blockNum and _root.photoXML.childNodes[0].childNodes[a].attributes.locNum == _root.locNum+1) {
_root.photosArray.push({photoName:_root.photoXML.c hildNodes[0].childNodes[a].attributes.title, photoFile:_root.photoXML.childNodes[0].childNodes[a].attributes.filename});
}
}
trace("photosArray length = "+_root.photosArray.length);
//
for(a=0;a<10;a++) {
_root.detail.photoSec.photosHolder["img"+a].img._alpha = 0;
_root.detail.photoSec.photosHolder["img"+a].img._visible = false;
}
//
for(a=0;a<_root.photosArray.length;a++) {
_root.detail.photoSec.photosHolder["img"+a].img.loadMovie("images/sm_"+_root.photosArray[a].photoFile+".jpg",a);
_root.detail.photoSec.photosHolder["img"+a].img._visible = true;
_root.detail.photoSec.photosHolder["img"+a].img._alpha = 100;
}
//
//
//
_root.detail.audioSec.vLoader.vHolder.unloadMovie( );
_root.detail.audioSec.audioControlsHolder.vStat.gr abBar._x = 0;
_root.detail.audioSec.vLoader.gotoAndStop(1);
//
//
//
}
public function hidePhotos() {
for(i=0;i<_root.photosArray.length;i++) {
_root.detail.photoSec.photosHolder["img"+i].enabled = false;
}
}
public function showPhotos() {
for(i=0;i<_root.photosArray.length;i++) {
_root.detail.photoSec.photosHolder["img"+i].enabled = true;
}
}
public function launchLargePhotoViewer(photoNum) {
/*_root.detail.photoSec.photosHolder["img"+_root.locNum].onRelease=function():Void {
_root.detail.largeViewerHolder.removeMovieClip();
_root.detail.createEmptyMovieClip("largeViewerHolder", _root.detail.getNextHighestDepth());
_root.detail.largeViewerHolder.attachMovie("largeViewer", "largeViewer"+i, _root.detail.largeViewerHolder.getNextHighestDepth (), {_x: 251.1, _y:-27.9});
_root.detail.largeViewerHolder["largeViewer"+i].createEmptyMovieClip("img", _root.detail.largeViewerHolder["largeViewer"+i].getNextHighestDepth());
_root.detail.largeViewerHolder["largeViewer"+i].img.loadMovie("images/md_"+_root.photosArray[i].photoFile+".jpg", i);
_root.detail.largeViewerHolder["largeViewer"+i].img._x = _root.detail.largeViewerHolder["largeViewer"+i]._x + (_root.detail.largeViewerHolder._width - _root.detail.largeViewerHolder["largeViewer"+i].pic._width)*.5;
_root.detail.largeViewerHolder["largeViewer"+i].img._y = _root.detail.largeViewerHolder["largeViewer"+i]._y + (_root.detail.largeViewerHolder._height - _root.detail.largeViewerHolder["largeViewer"+i].pic._height)*.5;
}*/
for (i=0;i<_root.photosArray.length;i++) {
_root.detail.photoSec.photosHolder["img"+i].onRelease=function():Void {
_root.detail.largeViewerHolder.removeMovieClip();
_root.detail.createEmptyMovieClip("largeViewerHolder", _root.detail.getNextHighestDepth());
_root.detail.largeViewerHolder.attachMovie("largeViewer", "largeViewer"+i, _root.detail.largeViewerHolder.getNextHighestDepth (), {_x: 251.1, _y:-27.9});
_root.detail.largeViewerHolder["largeViewer"+i].createEmptyMovieClip("img", _root.detail.largeViewerHolder["largeViewer"+i].getNextHighestDepth());
_root.detail.largeViewerHolder["largeViewer"+i].img.loadMovie("images/md_"+_root.photoXML.childNodes[0].childNodes[i].attributes.filename+".jpg", i);
_root.detail.largeViewerHolder["largeViewer"+i].img._x = _root.detail.largeViewerHolder["largeViewer"+i]._x + (_root.detail.largeViewerHolder._width - _root.detail.largeViewerHolder["largeViewer"+i].pic._width)*.5;
_root.detail.largeViewerHolder["largeViewer"+i].img._y = _root.detail.largeViewerHolder["largeViewer"+i]._y + (_root.detail.largeViewerHolder._height - _root.detail.largeViewerHolder["largeViewer"+i].pic._height)*.5;
}
}
}
}
I appreciate any insight into this conundrum.
ETA: photoFile is the culprit of 'undefined'
Dynamic Loading Pics And Variables?how To Change Pics Depending On Buttons Or Text
i want to load jpegs into a swf dynamically. I saw a post confirming u can do it w/load movie script. Heres my question:
first off: in the folder w/my movie, i have jpegs labeled
1-9
in the movie, when someone presses a button, var x is changed to the corresponding number, 1-9
what i want is to place this variable inside the loadmovie somehow so depending on the button pressed a new img loads
i dont wanna type out long if then statements seeing as how this will quickly extend to about 1-400.
im kinda brain dead rite now, whats a dynamic way of gettings imgs with relatively short, versatile code
Xml Thumbnail Gallery - How To Leave Thumbnail Blank?
There was a thread a few days ago on how to leave the caption or description blank. If anyone knows could you explain how to leave the thumbnail and/or url blank for some and to show for others? Where if there is no information that flash can read a field that is undefined as ""?
FLV Video Thumbnail + Thumbnail Gallery With LinkIDs From XML
Let's say for instance, our XML file:
<videos>
<video linkid="AK0001" thumb="http://www.site.com/pathtofile/filename.flv">
<link>http://www.site.com/pathtofile/filename.flv</link>
</video>
</videos>
Is it possible to use the source flv file as the thumbnail? Or, is it better to create a thumbnail of all the content?
With this said, how would I create the event handler to satisfy when each thumbnail is clicked, it stores it's linkid in the $_GET variable?
Thank You,
b0gui
Loading Text Into Scrolling XML Gallery
Hi Everyone,
I found this script that includes a scrolling thumbnail gallery. I only want the thumbnail part and i can make that work but i want to load some text in between each image. Is there a way to this? (My last resort is to turn the text into an image and load it thru xml like the other images but i don't really want to do this.) Below is the script.
Thanks for your help!
/*Code for loading XML file. */
function loadXML(loaded) {
if (loaded) {
/* "xmlNode" is just a faster way of saying "this.firstChild". */
xmlNode = this.firstChild;
image = [];
head = [];
description = [];
thumbnails = [];
category = [];
cat = xmlNode.childNodes[0].firstChild.attributes.cid
/* Finds total number of child nodes (images w/captions to be displayed, in this case). */
total = xmlNode.childNodes[1].childNodes.length;
/* Extracts data from each child node, stopping when the total (defined above) is reached. */
for (i=0; i<total; i++) {
image[i] = "images/"+xmlNode.childNodes[1].childNodes[i].childNodes[0].firstChild.nodeValue;
head[i] = xmlNode.childNodes[1].childNodes[i].childNodes[1].firstChild.nodeValue;
description[i] = xmlNode.childNodes[1].childNodes[i].childNodes[2].firstChild.nodeValue;
category[i] = xmlNode.childNodes[1].childNodes[i].childNodes[3].firstChild.nodeValue;
thumbnails[i] = "images/th_"+xmlNode.childNodes[1].childNodes[i].childNodes[0].firstChild.nodeValue;
thumbnails_fn(i);
}
firstImage();
cat = 0;
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("gt-data.xml");
/////////////////////////////////////
/* Lets the user scroll through with left and right arrow keys. */
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
Key.addListener(listen);
/* Note the references to button instances previous_btn and next_btn here.*/
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
/////////////////////////////////////
/* The movie begins, naturally, at the beginning--in XML, that's zero! */
p = 0;
/* Preloader for images. */
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader._visible = true;
} else {
/* Makes preloader invisible once the image starts to fade in. */
preloader._visible = false;
/* Fade in the image. (If the alpha is under 100, add 10.) */
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
/* Load & display the next image. It cleverly calculates whether you are at the end of the
images or not. If you are, the script doesn't run.*/
function nextImage() {
/* If it's less than the total (the last image), let's go ahead and load the next image. */
if (p<(total-1)) {
p++;
if (loaded == filesize) {
/* If it is loaded, set alpha to zero, so that the preloader can fade it in! */
picture._alpha = 0;
/* Put the image where it is supposed to go. */
picture.loadMovie(image[p], 1);
/* Load description into text box "desc_txt" */
desc_txt.text = description[p];
head_txt.text = head[p];
/* Activates the function down below, telling you what number picture you're viewing. */
picture_num();
}
}
}
/* Basically the same as nextImage(), but backwards. Fading and image/text insertion is the same. */
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
head_txt.text = head[p];
picture_num();
}
}
/* Automatically show the first image when the movie is loaded, fade-in and all. */
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
/* Use image[0] instead of image[p] since this only applies to the first image. */
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
head_txt.text = head[0];
picture_num();
}
}
/* Thumbnail list. */
function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = hit_left._x+(target_mc._width+5)*k;
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
target_mc._alpha = 50;
target_mc.onRollOver = function() {
this._alpha = 100;
thumbNailScroller();
};
target_mc.onRollOut = function() {
this._alpha = 50;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}
function thumbNailScroller() {
// thumbnail code!
this.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 10;
tscroller.onEnterFrame = function() {
if ((_root._ymouse>=thumbnail_mc._y) && (_root._ymouse<=thumbnail_mc._y+thumbnail_mc._height)) {
if ((_root._xmouse>=(hit_right._x-40)) && (thumbnail_mc.hitTest(hit_right))) {
thumbnail_mc._x -= scroll_speed;
} else if ((_root._xmouse<=40) && (thumbnail_mc.hitTest(hit_left))) {
thumbnail_mc._x += scroll_speed;
}
} else {
delete tscroller.onEnterFrame;
}
};
}
/* Displays current position and total number of pictures. */
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}
Thumbnail Gallery Tutorial - Gallery Within Movieclip
I've taken the Adding Thumbnail tutorial http://www.kirupa.com/developer/mx2004/thumbnails.htm and it works perfect. However when I play the photogallery swf file within a movie clip (playing as externail swf from main timeline) and the gallery pulls up. The links work and all is good. All until I try and scroll to more thumbnail files. It's now scrolling. Scrolls fine when swf played indendently.
This couldn't have come a worse time as my finals are due in hours.
Please help if you can.
Thanks
XML Gallery - Resizing Pics
Hey all-
I'm designing a photo gallery in Flash as a gift for my friend. He's not too computer savvy, but I think he can handle changing an xml file to update photo lists.
He's a photographer, and as such he has photos of all different sizes, but when I preview the xml gallery that the tutorial provides, it shows only the first pixels of the picture. For example, the movie clip that displays the pictures is 500w x 400h, but the picture the xml loads is 800w x 600h. The gallery only shows 500x400 of the pic and ignores the rest.
I tried using the setSize command, but I'm not sure where to add it so it didn't work. Any ideas?
Thanks,
Ox
Gallery Pics Awkward
Hello - I'm trying to finish up this flash but no matter how I resize the pictures, they still come out slightly broken. (I'm referring to the large pic, not the thumbnail).
Here's the url http://ewf.fjvenezia.com/wood/wood.html
I appreciate all input on this problem!!!
Flobair
Scrolling Pics...help
I've created a scrolling image bar. however, when i go to test the movie, the bar scrolls but all my other flash animation on the homepage doesnt work. I have text that fade in and they dont fade in anymore after inserting the scrollling pics. Can anyone help me to fix this problem? Also the scrollbar doesnt loop around smoothly. Can you help me with that also? I've racked my brains trying to figure it out!!!
I cant upload the file cuz its too big and when i compress it its still too large. I can email it to u guys if anyone is willing to help.
Thanks guys for your help in advance!!
Gallery Not Wanting To Load More Than 17 Pics
hey guys, i have just posted an online photo gallery and its the kind that resizes to fit whatever photo you tell it to load. you can see it at :
www.creativejuggernauts.com/daniel
in anycase, my problem, is that for some reason when you try to load pics 018 - 030 they refuse to load, and i can't figure out why? any ideas? my .fla can be downloaded at www.creativejuggernauts.com/daniel/pics.fla
any help is appreciated!
Photo Gallery Random Pics
hello Im new to flash and I finally got the photo gallery tutorial working:
http://www.kirupa.com/developer/mx/photogallery.htm
I was wondering if there is a way to display random pics instead of the order its coded in??
thanks
Pics Missing In Photo Gallery
Hello, I already used the photo gallery tutorial without any problem.
But now I am stuck.
Some pics are there and others are just not showing up. You can rename them, change their orders, always the same one missing.
Something wrong with those pics?
Fla of the tutorial and pics can be downloaded here.
Thanks for any explanation.
http://www.onsitus.it/kirupa.html
Gallery Not Wanting To Load More Than 17 Pics
hey guys, i have just posted an online photo gallery and its the kind that resizes to fit whatever photo you tell it to load. you can see it at :
www.creativejuggernauts.com/daniel
in anycase, my problem, is that for some reason when you try to load pics 018 - 030 they refuse to load, and i can't figure out why? any ideas? my .fla can be downloaded at www.creativejuggernauts.com/daniel/pics.fla
any help is appreciated!
Photo Gallery Random Pics
hello Im new to flash and I finally got the photo gallery tutorial working:
http://www.kirupa.com/developer/mx/photogallery.htm
I was wondering if there is a way to display random pics instead of the order its coded in??
thanks
Pics Missing In Photo Gallery
Hello, I already used the photo gallery tutorial without any problem.
But now I am stuck.
Some pics are there and others are just not showing up. You can rename them, change their orders, always the same one missing.
Something wrong with those pics?
Fla of the tutorial and pics can be downloaded here.
Thanks for any explanation.
http://www.onsitus.it/kirupa.html
Scrolling Pics And Text
It's been at least 6 months since I've used Flash and now I'm Flash retarded. I have 2 questions:
1) How do I write the code for scrolling text in text boxes?
2) Is there a way I can have "banner" of pictures and when the mouse is at certain coordinates, the "banner" moves across the screen?
Thanks in advance for your help and I owe you big time.
Leah
(angel420girly@yahoo.com)
Navigation With Scrolling Pics
Hi, do you know the script to make the effect achieved by clicking on the letters "b,l,o,n,d,i,e" on this site:
http://capitolrecords.com/blondie/
Scrolling Pics In From The Left And Right
anyone got a flash scroller that has a left and right button and scrolls pics into place on a click like the one on here:
http://www.teknision.com/siteVersions/tek2/?
Scrolling A Text And Pics In Same...
Hi.
I am a newbie!
I need a scroll that can scroll a text and pics (jpg/gif) in the same scroll.
I got this scroll from a friend! But i can not incluede a pic in it! OR is there a way so i can?
PLEASE HELP ME
Is There A Way Of Scrolling Multiple Pics?
any one know?
I had a kinda wierd idea bout havin a flash file in a flash file, but sum1 might know a better way
what I mean is by having a page with thumbnail pics in a reasonable order, n being able to scroll through the lot of them. And also being able to press on them to see bigger pics.
Cheers
SpitwolF
Stopping A Scrolling Thumbnail Scrolling On Its Loadup?
Firstly hey all hope you can help me with what is hopefully an easy question.
Firstly I've made a vertical scrolling verison based on the actionscript of this Tutorial. However because of the lopped motion Tween it begins scrolling instantly after its loaded. I want it to load frozen until the mouse is rolled-on is there anyway in actionscript or by editting the tweens to make it this possible???
This link is an example of my thumbnail scroller (sorry for the shameless self promo of my website!)
http://seantooley.com/pages/Scars&Sp...sGallery15.htm
This is a link to the tutorial I used (tutvid.com) Though it was good!.
http://www.youtube.com/watch?v=2TrIQ...1DBDD6&index=5
Lastly the actionscript if it helps. which I hope someone can! I would be a very grateful man to whoever can provide the answer !!
_root.onEnterFrame = function(){
if(_root._xmouse<240) {
myVar=false;
}
if(_root._xmouse>2) {
myVar=true;
}
if(_root._ymouse<13 and myVar==true) {
ImageBar.prevFrame();
}
if(_root._ymouse>445and myVar==true) {
ImageBar.nextFrame();
}
}
Thanks again Sean Tooley
Link Pics Off A Image Gallery To Website
i have created a Image Gallery by using
"Creating an Image Gallery in Flash" tutorial from oman3d
http://www.oman3d.com/tutorials/flas...egallery/4.php
and instead of when you click the image and a larger one being displayed,
i have been trying to get it to link to another website
(so each image within the image-gallery links to a different website)
is this possible to do? ive been at it for hours and no luck. Because each image is a movie clip and looks like you can only link buttons? im not to sure. Its probably something simple that ive done wrong
thanks
andy
How To Give Linkage To Pics In Gallery [renamed]
hey guys and girls I need help incorporating linking with this photo gallery
Kirupa has a tutorials on making the photo gallery (http://www.kirupa.com/developer/mx/photogallery.htm)
but I will like the ability to have those images linkable to something else is this possible.
If you can help it would defenitly be appreciated.
Xml-gallery Doesn´t Load Pics Online
HI!
Have got a strange problem. The xml-gallery from this tutorial site doesn´t load pictures online but functions locally. What can it be. I have everything in the same directory.
You can look at the problem at www.musikkapelle-ellboegen.at
It´s the button Cäcilienfeier2005 in the photo section.
Thanks a lot.
Evia
Photo Gallery Using XML And Flash Resizing Pics
hi, one thing i would love to do is to have the gallery resize the pics without having to resize the original file. can this be done? and how about making it possible to play it as a slide show?
thanx in advance
Looping Thumbnail Loader Help
Hello, im trying to loop this code to load a bunch of thumbnails that are already defined in the array thumb[]. This works, but it only loads the last jpg?
Any takers on how to fix this?
Thanks in advance!
Code:
// Code By Helen Triolo //
// Copied from FlashMacromedia Yahoo Group //
MovieClip.prototype.loadjpg = function(picName, holderName)
{
// holderName can be passed in case needed for progress indicator
// if not passed, use 'holder' as default
trace (picName);
var h = holderName==undefined ? "holder" : holderName;
this.createEmptyMovieClip(h, 1);
this._visible = false;
this[h].loadMovie(picName);
this.onEnterFrame = function()
{
if (this[h]._width > 0)
{
this._alpha = 99;
delete this.onEnterFrame;
this._visible = true;
this.onComplete();
}
else
{
this.onLoading();
}
}
};
x = this.createEmptyMovieClip("xxx",1);
this.createTextField("yyy", 2, 10, 10, 300, 20);
this.yyy.text = 'here i am';
x.onLoading = function()
{
this._parent.yyy.text = this.hhh.getBytesLoaded() + "/" + this.hhh.getBytesTotal();
}
x.onComplete = function()
{
this._parent.yyy.removeTextField();
var ratio = this._width / this._height;
var newwidth = 100;
this._x = thumbStartX;
this._y = thumbStartY;
// this._width = newwidth;
//this._height = newwidth/ratio;
thumbStartX = thumbStartX + 140;
};
for (var y = 1; y<=12; y++) {
holder = "holder"+y;
x.loadjpg(_root.thumb[y-1], holder);
}
LoadMovie W/scrolling Pics Dilemma
I've attempted to load an external .swf file called "recent pics" that has a scrolling picture gallery. Within in my main movie, I have a movie clip called "mainBox"; inside "mainbox" is my placeholder movie clip that is used as a guide for the "recent pics" .swf.
My problem is that although I get the external .swf to load, for some reason the mouse movements of the scrolling images do not work.
**Note this - when I load the external into "_level1", instead of the nested clips, it works, although its not positioned correctly, my reasoning for using the MC.
My question, are .swf's only allowed to be loaded into _level0, _level1, or another MC on the main timeline and still have function? Is there a problem in my actionscript within my external .swf?
Any suggestions would be great ASAP!!
Thank you in advance
laslane007
Any Tutorials On How To Do This - Scrolling Pics Left To Right
Hello all,
I'm trying to find out how to make a strip of images, similar to a filmstrip, that is slowly scrolling from left to right, and if you roll over some of the links, the slowly moving film strip moves forward or backward to the pic assoicated with that link...similar to this site, if you click on "collections" at the top, then "watches" and go over any of the links on the left:
http://www.cartier.com/us/index.html
any help on tutorial direction or where to start is appreciated. Thanks
|