PDA

View Full Version : Howd he do this? Resizing slideshow



Pages : 1 [2] 3 4 5

sipher
May 12th, 2004, 01:02 PM
hey thank is a start...but still how do i put the menu inside the border without distoring the content of the menu when resizing?

just click on the botton where it said portfolio the menu come up ...


???

scotty
May 12th, 2004, 03:21 PM
I think in the "christopher"site it has been done with attachMovie(), as soon as the white screen is in place. You can attach it at empty mc's which are positioned according the amount of scaling:)

scotty(-:

sipher
May 12th, 2004, 03:29 PM
huh??? sorry scotty but i got me there... im no hard coder like u brother ...sorry
but im trying :ub:

scotty
May 12th, 2004, 05:56 PM
Have a look here;)

scotty(-:

niki
May 12th, 2004, 06:00 PM
*standing ovation* :thumb:

sipher
May 12th, 2004, 06:49 PM
:nerd: top nerd

scotty

wow ...u the man brother

Daedelus
May 13th, 2004, 12:04 AM
Hey Scotty... got another question: Using my previous code on p. 14, i wanted to have it so that only 5 of the menu options show up at any one time. if there are more than 5 items in the XML file, there would be a next button that would display the next 5, and so on... i'm having a little trouble getting started... any advice?

soooo... has anyone got any ideas as to my lil dilemma?? :thumb:

scottjr
May 13th, 2004, 11:18 AM
sorry scotty's on vacation :p greatest thread i've ever seen, thanks to all who participated, i learned a lot from this thread.

justn
May 13th, 2004, 02:07 PM
I 've emailed Scotty about this also, but just in case anyone else could tackle it I'' post it here too. I need help with the latest zip posted scotty#2.zip. Can someone address these issues:

1. Select the other categories and display those images in that category.
2. In the right hand corner have something that says, "image detail" or something that when clicked on would display some detail about the image (where is was shot, etc.)
3. When a category is selected maybe to the right of it display a list of the images in that specific category like on http://christopherconnock.com (http://christopherconnock.com)

I agree this thread has been the most comprehensie and helpful regarding a flash image gallery that I've seen on the web. Thank you for all the past help and in advance for that in the future.

Justin

AlexSem
May 14th, 2004, 04:12 AM
Great thread :)

I really liked the idea behind this and incorporated it to showcase my portfolio. This is by no means final but to give ladies and gents an idea of how this can be used :)'

www.alexsem.com


I also wondered if you could generate those boxes through the xml menu script. I am by no means a programmer, all I could manage was modifying the existing script to my existing needs :P

sipher
May 14th, 2004, 10:20 AM
thats nice ...but that still doesnt help us ...im not hard coder im just trying to do a personal family album....thanks

can u tell us how did u place that boxes on the botton?

Daedelus
May 14th, 2004, 11:48 AM
Great thread :)

I really liked the idea behind this and incorporated it to showcase my portfolio. This is by no means final but to give ladies and gents an idea of how this can be used :)'

www.alexsem.com


I also wondered if you could generate those boxes through the xml menu script. I am by no means a programmer, all I could manage was modifying the existing script to my existing needs :P

nice work! generating the boxes dynamically is what i'm working on right now. it works, but i want to limit the number of menu items on stage and create "next" and "previous" buttons when necessary. i'm waiting for Scotty or anyone who's a bit more of a guru than I to help me get started :D

melf
May 16th, 2004, 12:03 PM
http://www.onlysamo.com/
http://www.notacube.com/notacube.php
http://www.merkdesign.com/

firstSteps
May 18th, 2004, 09:03 PM
i Have been trying to do this menu thing since this moning thaks alot to all of you you saved me some time, and wow what a great thread :)

firstSteps
May 18th, 2004, 09:09 PM
This is what forums should be like im just sorry i came at the end hope you all have fun and once again great work and a nice subject :)

Egg
May 21st, 2004, 05:13 AM
As others have already said, this has been a great thread. I am an ameter at all this stuff but by reading this thread it has made me want to learn...

I will be posting some questions soon :ne:

Egg :egg:
wwW.ebVault.com (http://wwW.ebVault.com)

sipher
May 21st, 2004, 02:46 PM
i guess there will be no answer for this questions huh?

I 've emailed Scotty about this also, but just in case anyone else could tackle it I'' post it here too. I need help with the latest zip posted scotty#2.zip. Can someone address these issues:

1. Select the other categories and display those images in that category.
2. In the right hand corner have something that says, "image detail" or something that when clicked on would display some detail about the image (where is was shot, etc.)
3. When a category is selected maybe to the right of it display a list of the images in that specific category like on http://christopherconnock.com

I agree this thread has been the most comprehensie and helpful regarding a flash image gallery that I've seen on the web. Thank you for all the past help and in advance for that in the future.

Justin

beanpie
May 28th, 2004, 03:02 PM

beanpie
May 28th, 2004, 03:04 PM
Sorry, no message there.

Everything is great with this fabulous toy on my hard drive, but when I upload to my server all goes funky...why?

It's so great and I really really want it to work...

Would be happy to upload SWF if nobody's ever seen this before...

http://www.peniferella.com/gallery

sipher
June 1st, 2004, 12:00 PM
hey justn i think i just found the answer on how to do the menu on christopherconnock.com

the guy christopher was right it is very complicated but right now im working on it i will let u know how it went hey when done i'll send u script so can figure it out on yur own too...aight laters kid

jjmancini
June 3rd, 2004, 09:36 PM
Would any of you be willing helping out with a question that I had on a similar topic, yet not close enough to warrant posting it here.

It is all about simply loading images in flash via XML, here it is:
http://www.kirupaforum.com/forums/showthread.php?t=58221
THanks!

sipher
June 3rd, 2004, 11:22 PM
so what exactly is yur questions? i went to the other post but there was nuthing there what don't u just ask here what u really need...

laterz

jjmancini
June 4th, 2004, 01:07 AM
The third post down is the one that has the question...

I'll just rephrase it here.

I am trying to load little jpeg's next to my menu options via XML.
But the way that the XML is done here does not make sense to me. So can someone show me how to call it via the XML method that I use.

I do not want to double thread post, so here is the link:
Look at the 3rd post.
http://www.kirupaforum.com/forums/s...ead.php?t=58221

Thanks again!

dr.ew
June 4th, 2004, 03:50 AM
I have a question regarding setting max dimensions for this wonderful easing gallery (cheers to all who have helped put it together, much appreciated=] )
I would like to have it set so that any images that are too big are scaled down properly...using max variables for width and height, and making sure it keeps its scale...
I've tried things like:


if (this._width>=wMax) {
this._width = wMax;
this._yscale = this._xscale;
} else if (hMax<this._height) {
this._height = hMax;
this._xscale = this._yscale;
}

but cant seem to figure out where it should go, or even if that will do what I would like it to.. (The only time its actually 'worked' is when I put it on containerMC, and then it sizes properly but the images won't show...)
Thanks=]

scotty
June 4th, 2004, 05:22 AM
if (this._width>wMax&&this._width>=this._heigth) {
this._width = wMax;
this._yscale = this._xscale;
} else if (this._height>hMax&&this._height>this._width) {
this._height = hMax;
this._xscale = this._yscale;
}
?

scotty(-:

dr.ew
June 4th, 2004, 11:32 AM
Thanks for the reply scotty =]
I've tried putting this into the resizeMe function, but it doesnt adhere to the hMax and wMax variables...but still works.. Am I putting this in the right place? (this is a slightly changed version of 2, I added a description array...) Also, I dont know why the &&s are in the conditionals... its possible that some images would be longer than hMax, but shorter than they are wide, etc...So I took that out, but not before seeing if it worked..

hMax = 400;
wMax = 400;
spacing = 5;
containerMC._alpha = 0;
var pArray = new Array();
var tArray = new Array();
var dArray = new Array();
MovieClip.prototype.loadPic = function(pic) {
containerMC._alpha = 0;
cur = pic;
this.loadMovie(pArray[pic]);
this._parent.onEnterFrame = function() {
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
if (t != 0 && Math.round(l/t) == 1 && containerMC._width>0) {
var w = containerMC._width+spacing, h = containerMC._height+spacing;
border.resizeMe(w, h, pic);
delete this._parent.onEnterFrame;
}
};
};
MovieClip.prototype.resizeMe = function(w, h, pic) {
var speed = 3;
this.onEnterFrame = function() {
if (this._width>wMax) {
this._width = wMax;
this._yscale = this._xscale;
} else if (this._height>hMax) {
this._height = hMax;
this._xscale = this._yscale;
}
}
this.onEnterFrame = function() {
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
nav._x = Math.round(this._x-this._width/2);
nav._y = Math.round(this._y+this._height/2+spacing/2);
nav.overtxt.text = dArray[pic];
prevb._x = nav._x-5;
nextb._x = nav._x+this._width+5;
nextb._y = prevb._y=this._y-this._height/2;
picinfo._y = nextb._y-5;
picinfo.info.text = tArray[pic];
picinfo._x = border._x-picinfo._width/2;
if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) {
this._width = w;
this._height = h;
containerMC._x = this._x-this._width/2+spacing/2;
containerMC._y = this._y-this._height/2+spacing/2;
containerMC._alpha = 100;
delete this.onEnterFrame;
}
};
};
var gallery_xml = new XML();
gallery_xml.ignoreWhite = true;
gallery_xml.onLoad = function(success) {
if (success) {
var gallery = this.firstChild;
// pathToPics = gallery.attributes.path;
for (var i = 0; i<gallery.childNodes.length; i++) {
tArray.push(gallery.childNodes[i].attributes.title);
pArray.push(gallery.childNodes[i].attributes.source);
dArray.push(gallery.childNodes[i].attributes.desc);
}
containerMC.loadPic(0);
} else {
title_txt.text = "XML Load Error";
}
};
gallery_xml.load("gallery.xml");
prevb.onRelease = function() {
if (cur == 0) {
containerMC.loadPic(pArray.length-1);
} else {
containerMC.loadPic(cur-1);
}
};
nextb.onRelease = function() {
if (cur == pArray.length-1) {
containerMC.loadPic(0);
} else {
containerMC.loadPic(cur+1);
}
};

Any ideas? thanks! =]

scotty
June 4th, 2004, 03:14 PM
I think the placement should be here

MovieClip.prototype.loadPic = function(pic) {
containerMC._alpha = 0;
cur = pic;
this.loadMovie(pArray[pic]);
this._parent.onEnterFrame = function() {
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
if (t != 0 && Math.round(l/t) == 1 && containerMC._width>0) {
if (containerMC._width>wMax&&this._width>=this._heigth) {
containerMC._width = wMax;
containerMC._yscale = containerMC._xscale;
} else if (containerMC._height>hMax&&this._height>this._width) {
containerMC._height = hMax;
containerMC._xscale = this._yscale;
}
var w = containerMC._width+spacing, h = containerMC._height+spacing;
border.resizeMe(w, h, pic);
delete this._parent.onEnterFrame;
}
};
};
I've put the extra condition in the if statement, because you want to scale to one "reference-point", so if the width is greater as wMax and greater as the height, wMax is the reference.
If leave that out and the original is bigger as wMax and hMax, the code first want to scale to wMax reference and then to hMax refence, to be short>>>problems;)
Hope this will help you, cause it's starting to confuse me:lol:

scotty(-:

scotty
June 4th, 2004, 03:14 PM
I think the placement should be here

MovieClip.prototype.loadPic = function(pic) {
containerMC._alpha = 0;
cur = pic;
this.loadMovie(pArray[pic]);
this._parent.onEnterFrame = function() {
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
if (t != 0 && Math.round(l/t) == 1 && containerMC._width>0) {
if (containerMC._width>wMax&&this._width>=this._heigth) {
containerMC._width = wMax;
containerMC._yscale = containerMC._xscale;
} else if (containerMC._height>hMax&&this._height>this._width) {
containerMC._height = hMax;
containerMC._xscale = this._yscale;
}
var w = containerMC._width+spacing, h = containerMC._height+spacing;
border.resizeMe(w, h, pic);
delete this._parent.onEnterFrame;
}
};
};
I've put the extra condition in the if statement, because you want to scale to one "reference-point", so if the width is greater as wMax and greater as the height, wMax is the reference.
If you leave that out and the original is bigger as wMax and hMax, the code first want to scale to wMax reference and then to hMax refence, to be short>>>problems;)
Hope this will help you, cause it's starting to confuse me:lol:

scotty(-:

scotty
June 4th, 2004, 03:16 PM
I think the placement should be here

MovieClip.prototype.loadPic = function(pic) {
containerMC._alpha = 0;
cur = pic;
this.loadMovie(pArray[pic]);
this._parent.onEnterFrame = function() {
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
if (t != 0 && Math.round(l/t) == 1 && containerMC._width>0) {
if (containerMC._width>wMax&&this._width>=this._heigth) {
containerMC._width = wMax;
containerMC._yscale = containerMC._xscale;
} else if (containerMC._height>hMax&&this._height>this._width) {
containerMC._height = hMax;
containerMC._xscale = this._yscale;
}
var w = containerMC._width+spacing, h = containerMC._height+spacing;
border.resizeMe(w, h, pic);
delete this._parent.onEnterFrame;
}
};
};
I've put the extra condition in the if statement, because you want to scale to one "reference-point", so if the width is greater as wMax and greater as the height, wMax is the reference.
If you leave that out and the original is bigger as wMax and hMax, the code first want to scale to wMax reference and then to hMax refence, to be short>>>problems;)
Hope this will help you, cause it's starting to confuse me:lol:

scotty(-:

lunatic
June 4th, 2004, 03:21 PM
Okay so I finally jumped in and started using the resizing slideshow for my own evil purposes (moowahahahaha). I created an external swf that works beautifully. I am loading it into my main project into a container that has a close button. The close button triggers some easing script to shoot the container clip out of sight, as well as re-enable the buttons beneath the container that are disabled when you press one (when you press one the container clip is eased to center screen).

Still with me? Okay good.

Everything works great except for two things:

1) the pics appear before the bounding box has a chance to resize. Once it resizes the pics snap to the bounding box. This is visually not very professional looking. OH and yes I know that the buttons for the individual pics aren't appearing at the moment - I'm working on that. Just use the <<< and >>> buttons to scroll through pics and see how the resize thing is getting stuck.

2) Something in the gallery code is disabling the easing part of my close button in my container clip and I can't figure out what. The code that re-enables the buttons beneath the container clip works, but the container clip does not shoot off the screen like it is supposed to.

You can see it in all it's grotesque glory here:
www.rhythmgivers.com

Get to the gallery by clicking on the bell on top of the big drum in the back row on the left. When you mouse over it it'll say "PICS". Click on any other drum to see how the container clip is SUPPOSED to work.

Feel free to sign the guestbook while you are there. =)

Thanks for any insight into this irritating problem!

scotty
June 4th, 2004, 03:39 PM
The picture appearing before resizing is probably due to a containerMC._alpha = 0 missing somewhere...
And the other problem.......what about posting a fla?

scotty(-:

lunatic
June 4th, 2004, 03:43 PM
Will do, as soon as I get home (I'm at work right now . . . just have it on my mind). Which fla - gallery or main? or both? Aye carumba!

:hr:

scotty
June 4th, 2004, 03:48 PM
What about ....both;)?

scotty(-:

lunatic
June 4th, 2004, 03:50 PM
'K - will do so in about . . . 5.5 more hrs . . . :jail:

I'll be looking for you out my tower window . . . ;)

scotty
June 4th, 2004, 04:28 PM
5.5 hours? Then my horse will be :snooze:
I'll have a look tomorrow:)

scotty(-:

lunatic
June 4th, 2004, 04:31 PM
Oh yeah, time difference! Then I'll see ya over coffee tomorrow . . . :P

dr.ew
June 4th, 2004, 06:54 PM
Thanks so much scotty!! =]

scotty
June 5th, 2004, 07:42 AM
no problem dr.ew=)

lunatic
June 5th, 2004, 01:13 PM
hey scotty check yer pm!

:hr:

scotty
June 5th, 2004, 01:18 PM
hey lunatic check your pm:lol:

scotty(-:

lunatic
June 5th, 2004, 01:30 PM
back at ya! :bu:

dr.ew
June 15th, 2004, 02:01 PM
I'm sure everyone is sick of returning to this thread, but I've been trying for the past week or so to figure this one out, but I am a bit stumped and could use a bit of guidance...
What I'm trying to do is dynamically create a menu of thumbnails from the array of images into a scrollpane, whcih would then call up the resize function of that image in the larger containerMC upon clicking.
I know that I'll need a for loop that will create empty clips for each of the images in pArray, these clips would be inside a holder mc that would be set as the scrolling content of the scrollpane using setscrollcontent(); and that I could position these empty clips 5 px apart from each other by offsetting its _x by 5 for each clip created.
I want to also include this code that would take the images already in pArray and automatically resize them for the scrollpane so that they would have a max height of say 50 px. (very similar to the code I used in my post above..) which would look like:
thbHMax = 50;
if (thumb._height>thbHMax) {
thumb._height = thbHMax;
thumb._xscale = thumb._yscale;

But I've been spinning my tires trying to get this idea into actual code, let alone adding functionality to the thumbnails.
I know that people (especially scotty =] ) have already put so much into this thread, and I really wanted to figure this addition out on my own so that I could contribute something also, but its just been a frustrating ordeal for me.
If someone could point me in the proper direction I would really really appreciate it!

Thanks=]

scotty
June 15th, 2004, 06:06 PM
dr.ew, don't know if you saw it yet, but have a look at this thread
http://www.kirupaforum.com/forums/showthread.php?t=52290

scotty(-:

mikkelbarker
June 15th, 2004, 06:46 PM
hi therockstar - I add my welcome to scotty's earlier :)

Change your button to:


on (release) {
_root.containerMC.loadpic("pic1.jpg");
}


Have fun ;)I Have had very much help getting a photo gallery to work, but could use a little help. Instead of loading a specific picture, how can i get a forward button to load the next picture. I want to be able to navigate through my album using only forward and backwards buttons.
In the tutorial they use
on (release) {
_root.changePhoto(1);
}
My pictures are called pic1, ect.
Thanks

dr.ew
June 15th, 2004, 08:31 PM
Thanks again scotty, I missed that thread... from a quick view, I think it will show me everything I need to know to adapt to what I need, but I may have a q or 2 (more specific I promise) if thats ok=]

Mikkelbarker: check out post, #119, scotty's v2.zip has forward/backward buttons.

scotty
June 16th, 2004, 04:37 AM
Thanks again scotty, I missed that thread... from a quick view, I think it will show me everything I need to know to adapt to what I need, but I may have a q or 2 (more specific I promise) if thats ok=]

Off course:)

scotty(-:

//ToubMor
June 16th, 2004, 06:09 PM
MovieClip.prototype.resizeMe = function(w, h) {
var speed = 3;
this.onEnterFrame = function() {
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
if (Math.abs(this._width-w)<1) {
this._width = w;
this._height = h;
_root.containerMC._x = this._x-this._width/2+spacing/2;
_root.containerMC._y = this._y-this._height/2+spacing/2;
_root.containerMC._alpha += 5;
if (_root.containerMC._alpha>90) {
_root.containerMC._alpha = 100;
delete this.onEnterFrame;
}
}
};
};

?

scotty(-:
He scotty.
Ik ben redelijk nieuw met scripten. Heb jij misschien een idee voor dit script (resizen van foto's met inladen) voor flash v5.
alvast bedankt

Beebs
June 17th, 2004, 01:33 AM
Scotty,
How to make this ultra superb gallery play automatically on loading/enter frame? I understand the principal of setInterval but I don't know how to incorporate them in the script.
Also, it'll be great if there's stop and pause button while playing automatically.
Thanks.

dr.ew
June 17th, 2004, 01:42 AM
add a function, slideshow, that will go through the pics in the array, then use setInterval to call it up every n milliseconds.
(at the end of the script on the first frame, add this:)

function slideshow(){
if (cur == 0) {
containerMC.loadPic(pArray.length-1);
} else {
containerMC.loadPic(cur-1);
}
};
setInterval(slideshow, 2000);


that'll change the image every 2 seconds. (change 2000 to change the duration)

Beebs
June 17th, 2004, 01:47 AM
Georgeous!
Now, how to pause that autoplay?
Thanks dr.ew

dr.ew
June 17th, 2004, 02:11 AM
well okay, first youd havta go back and give the interval an ID..then make a mc, give it an instance name of stop. then use that button on release to clear the interval.

function slideshow(){
if (cur == 0) {
containerMC.loadPic(pArray.length-1);
} else {
containerMC.loadPic(cur-1);
}
};
var slideInterval = setInterval(slideshow, 2000);
stop.onRelease = function () {
clearInterval(slideInterval);
}


that stops it...and you can even put another mc, start, to start the interval up again (another onRelease function that uses the setInterval again...)

Actually, for some reason, the 'start' idea works, but if pressed a lot can cause problems (overlapping intervals..) Also, once youve stopped it, then start it again, the stop doesnt work again. I'll try to figure it out..

Beebs
June 17th, 2004, 02:29 AM
Thanks dr.ew,
I laso notice that during the autoplay works, the next/previous button will make the slide goes berserk if it is pressed ( interupt the interval?). Meanwhile I'll try your suggestion above.
Shine on you...

scotty
June 17th, 2004, 11:34 AM
Thanks dr.ew,
I laso notice that during the autoplay works, the next/previous button will make the slide goes berserk if it is pressed ( interupt the interval?). Meanwhile I'll try your suggestion above.
Shine on you...
Disable the next/prev buttons during the slideshow;)

function slideshow(){
next_btn.enabled = prev_btn.enabled =0;
if (cur == 0) {
containerMC.loadPic(pArray.length-1);
} else {
containerMC.loadPic(cur-1);
}
};
var slideInterval = setInterval(slideshow, 2000);
stop.onRelease = function () {
next_btn.enabled = prev_btn.enabled =1;
clearInterval(slideInterval);
}
Where next_btn and prev_btn are the instancenames of your buttons:)

scotty(-:

scotty
June 17th, 2004, 11:44 AM
He scotty.
Ik ben redelijk nieuw met scripten. Heb jij misschien een idee voor dit script (resizen van foto's met inladen) voor flash v5.
alvast bedankt
Ik zou het niet weten...:)
I really shouldn't know. It has been ages since I last used Flash5, so I don't know what is supported there. I think it's best to start a new thread on the flash5 forum, maybe somebody can help you there:)

scotty(-:

Rufus
June 17th, 2004, 11:45 AM
Hi,

I'm using the script for the dynamic slideshow you've posted here...It's great!
I've been trying to add a feature that let's you load a text caption for each image...Like the image title that was in your set-up...
What I wanted to do is load this text to a dynamic textfield, from the same xml that states the image URL's and the image titles, BUT the text needs to be formatted(i.e. Bold, font color, font size...)
I added a 'caption' 'node'? in the xml file and it works, but as soon as I want to add formatting, the skideshow stops working???

Would you know what the best way is to load some text from an external xml that uses CSS formatting, that goes with the Appropriate image?
I could really use your help on this...been breaking my head for days already...

Thanks for any help,

Rufus

dr.ew
June 17th, 2004, 01:12 PM
Rufus,
Have a look at the code I posted on page 19...You'll notice that there are 3 arrays, the extra dArray is for a description. In the xml, I've added an attribute 'desc' to each image node.
I'm not really sure about CSS and such with this, but you can format the entire dynamic textfield that the description is inputted into (so bold, font, size, colour is taken care of at least..)

dstole
June 17th, 2004, 01:21 PM
Thanks scotty,
very cool! the xml file is right here....
http://www.robdimin.com/flash/xmlstuff/portfolio_config.xml
from there you'll see where the pics are located etc.
thx,
m.

Mucho, this file is no longer available, and I am curious to know how to put this together with the dynamicly loading thumbnails. When I try running the file that Scotty posted it errors saying that the XML stuff folder can't be found. Do you still have a copy of this, or does someone else nowhere I can find it so I can try to implement this.

Thanks
dstole

mikkelbarker
June 17th, 2004, 04:19 PM
Hello

Apperently i just can understand that F..... actionscript language :-( I have tried to get a back an forward button to work, but it won't work. Apperently I am to stupid.
I have attached my fla, and if anyone will help getting it to work, I will be greatfull.
I would like the back and forward button to pick the previus and next picture in my folder "pictures", ( instead of selecting a specific picture) and i would like the first picture in the folder to load automatickly.
Also, it seems that changing from one picture to another, it first loads with low alpha in the background and a different place.
If anyone will take the time to explain the code in detail (and I mean detail :-)) I will buy him/her a cop of coffe if you ever visit Danmark.

Thanks in advance

dr.ew
June 17th, 2004, 06:06 PM
mikkelbarker: have a look at scotty's v2 zip, that will work for prev/next buttons...After looking through that code, figure out what parts you don't understand in particular and I'm sure someone (including me) will be able to help you out further...
But, here is the part of the code (in the V2 fla...) that controls the next/prev buttons. for this to work, you need to make mc buttons with instance names of 'prevb' and 'nextb' (your buttons don't have any instance names)

//function on 'previous' button on release
prevb.onRelease = function() {
//checks the current pic in containerMC, loads the last image of array if its first pic up
if (cur == 0) {
containerMC.loadPic(pArray.length-1);
// if pic in containerMC is not first pic in array, loads the pic before the current in array
} else {
containerMC.loadPic(cur-1);
}
};
//same thing only reversed for next button. if its the last pic of array, goes to first
nextb.onRelease = function() {
if (cur == pArray.length-1) {
containerMC.loadPic(0);
} else {
containerMC.loadPic(cur+1);
}
};

mikkelbarker
June 17th, 2004, 06:23 PM
Actually i have tried looking at it. But I have a lot of problems with it due the difficulty understanding the languege. I have made it work showing my pictures, but my buttons get moved around. Also i don't yet understand the gallery_xml.load("gallery.xml");
As you can see i am quite a newbe, but eager to learn. I have though come to the point were I for the time being would like just a simple gallery to work. Once Therefor, if you would have a look at my fla. and get it to work I would be greatfull.
Thanks :)

Beebs
June 17th, 2004, 08:14 PM
Disable the next/prev buttons during the slideshow;)

function slideshow(){
next_btn.enabled = prev_btn.enabled =0;
if (cur == 0) {
containerMC.loadPic(pArray.length-1);
} else {
containerMC.loadPic(cur-1);
}
};
var slideInterval = setInterval(slideshow, 2000);
stop.onRelease = function () {
next_btn.enabled = prev_btn.enabled =1;
clearInterval(slideInterval);
}
Where next_btn and prev_btn are the instancenames of your buttons:)

scotty(-:

Bedankt Scotty,

With regards to this issue how to stop the autoplay to continously looping - when they reach the last image in the array?
Shine on.

Rufus
June 18th, 2004, 05:07 AM
Hi dr.ew,

So, your xml looks like this?:


<?xml version="1.0" encoding="UTF-8"?>
<gallery path="animation/">
<image title= "1/6"source="gallery/img_txt/images/setOne/pic1.jpg" desc="description text"/>
....
</gallery>


I did this aswell and added a third array to the Actionscript. This works and it loads the right text, but how do you apply the formatting tags?
Could you show me your xml file? Or do you somehow set the tags from Flash?


Thanks,

Rufus

dr.ew
June 18th, 2004, 11:30 AM
rufus, my xml:


<?xml version="1.0" encoding="UTF-8"?>
<gallery path="images/">
<image title="Bird Dwyer" desc="this is a sketch" source="bird1.jpg"/>
<image title="Bird Dwyer2" source="bird2.jpg" desc="here is a description of something."/>
<image title="Bird Dwyer3" source="bird3.jpg" desc=" this is something else."/>
<image title="Bird Dwyer4" source="bird4.jpg" desc=" this is also something else."/>
<image title="Bird Dwyer5" source="bird5.jpg" desc=" this is something else entirely."/>
<image title="Bird Dwyer6" source="bird6.jpg" desc=" yeehaw."/>
<image title="Bird Dwyer7" source="bird7.jpg" desc=" here is some words."/>
<image title="Bird Dwyer8" source="bird8.jpg" desc=" okay so its pretty obvious that an XML description goes here."/>
<image title="Bird Dwyer9" source="bird9.jpg" desc=" so ill just use a standard description for the rest of them...but lets see how text wrap works out...how will it format this? what about odd chars like @#$%^*|#& hmmmmm wrapp wray"/>
<image title="Bird Dwyer10" source="bird10.jpg"desc=" this is something else."/>
<image title="Bird Dwyer11" source="bird11.jpg" desc=" this is something else."/>
<image title="Bird Dwyer12" source="bird12.jpg" desc=" this is something else."/>
<image title="Bird Dwyer13" source="bird13.jpg" desc=" this is something else."/>
<image title="Bird Dwyer14" source="bird14.jpg" desc=" this is something else."/>
<image title="Bird Dwyer15" source="bird15.jpg" desc=" this is something else."/>
<image title="Bird Dwyer16" source="bird16.jpg" desc=" this is something else."/>
<image title="Bird Dwyer17" source="bird17.jpg" desc=" this is something else."/>
<image title="Bird Dwyer18" source="bird18.jpg" desc=" this is something else."/>
<image title="Bird Dwyer19" source="bird19.jpg" desc=" this is something else."/>
<image title="Bird Dwyer20" source="bird20.jpg" desc=" this is something else."/>
<image title="Bird Dwyer21" source="bird21.jpg"desc=" this is something else."/>
<image title="Bird n Jenn" source="Jenn&Bird.jpg" desc=" this is something else."/>
</gallery>


Formatting tags: Apparently u can use CSS with mx04, but I don't have it and don't use it...My workaround involved formatting the dynamic textfield that the xml titles/descriptions go into..to do this, find the textbox on the stage (for example textfield 'info' is inside the mc 'picinfo') click it and look in your properties tab. there you can change font, font colour, bold, size etc...

mikkelbarker
June 19th, 2004, 03:15 PM
Hi

I have now made the back af forward button work, but i have two problems. When i press the backbutton first it is like things just go stuck. It takes a long time until anything will work.
Second, when the images load, you can first see the image load transperent and off center in the background.
I would really apreciate the help.
Mikkel

dr.ew
June 21st, 2004, 12:53 AM
mikkelbarker: i changed your buttons to movie clips and it worked. I also put the frame rate up to 30, smooths/speeds it up a bit....Your totally missing the border resize, so i fixed the resize function.

EEE
June 21st, 2004, 06:14 AM
may i know what is the container.mc??izzit the code same as if want to loadmovie??

scotty
June 21st, 2004, 06:18 AM
containerMC is the movieclip where you load your pictures in;)

scotty(-:

Rufus
June 21st, 2004, 07:54 AM
Hey dr.ew,

Thanks for your answer...Configuring your text-field, means that you can't have different kinds of formatted text though, right? Wheter you have it all red or all bold..but to mix, like a Bold title and normal body text would not be possible this way...?
Do you know how I could check in Flash which picture is currently loaded into the containerMc and according to this load some text from another document, or just text inside Flash?

Thanks lads for your help so far,

Rufus

mikkelbarker
June 21st, 2004, 09:14 AM
dr.ew

I am very greatfull. Thanks a bundle.
One little item, I have tried to make the button a "button" so it becomes a bit smaller when one press down on it. How can that be done?
Mikkel

Rufus
June 21st, 2004, 12:45 PM
Hi anyone who knows,

I've now done the slideshow from this Thread without getting the Image URL's from xml.
But instead there is an Array that just contains the Paths to the Pictures directly.


spacing = 8;
_root.containerMC._alpha = 0;
var pArray = new Array();
pArray = ["setOne/pic1.jpg", "setOne/pic2.jpg", "setOne/pic3.jpg", "setOne/pic4.jpg", "setOne/pic5.jpg", "setOne/pic6.jpg", "setOne/pic7.jpg"];
MovieClip.prototype.loadPic = function(pic) {
containerMC._alpha = 0;
cur = pic;
...


Otherwise the script is the same as Scotty's v2 script...

How would I make an additional Array that would use the same incrementing/decrementing system as the images, but loads external text from a .txt or .xml file and sends it to a dynamic text field?


If any one knows how, PLEASE help me out, otherwise I'll have to abandon the whole thing for the product I'm making...


Thank you,

Rufus

scotty
June 21st, 2004, 07:51 PM
You can load your text/xml file into an array. The variable "pic" refers to the position in the pArray, so you can use that var for your textarray as well, something like:

yourTextfield.text = your_textArray[pic];

scotty(-:

Ordinathorreur
June 21st, 2004, 07:55 PM
Excellent thread, I wrote my own resizing window a while back, it took me a while but it was worth it, I learnt a lot.

This thread helped me tweak a couple of things. Like scottys suggestion of putting a transparent movie the size of the stage in externally loaded swf files so flash gets the right stage coordinates
I have one question though, why doesn't flash do that automatically, why does it have problems with swfs and not pics?

EEE
June 21st, 2004, 10:31 PM
may i know how to do a next button if i would like to load a selected slideshow so that the slide show won't play automatically

dr.ew
June 22nd, 2004, 01:16 AM
mikkel: make mc's that imitate buttons. so, for an over state, make the button mc 2 frames long, each frame has a stop();. give the frames labels, normal and over.
then put on(rollOver){ _root.prevb.gotoAndStop('over')} on the button mc. Also include on(rollOut) and even on(releaseOutside) to go back to normal... get the idea?

EEE
June 22nd, 2004, 05:51 AM
Bedankt Scotty,

With regards to this issue how to stop the autoplay to continously looping - when they reach the last image in the array?
Shine on.
the code i try ,but just can load 2 movie only.if choose 3 movie ,it can't load the third movie but keep looping the second movie.y?how?

dr.ew
June 22nd, 2004, 06:14 PM
EEE: I 'm sorry, but I do not really understand what the problem is that you are having. Maybe post the code you are using, and try to explain what you are trying to achieve?

As for Beebs' question that was overlooked, maybe something like

if(cur== pArray.length -1) {
clearInterval(slideInterval);
}

in the slideshow function?

sipher
June 22nd, 2004, 07:19 PM
i have been following this tread from the beginning and been very helpful thanks to scotty.. and others of course and now dr.ew u taken this to the next level.. congrat..
i will post my questions later ...again thanks to the both of u...

Recognize
June 22nd, 2004, 09:26 PM
Hi people,

i've been following this tread from the start but stoped when i got to the preloading section (cause thats all i needed). My problem is that if i test on my pc it all works fine (everything) but if u have a look at it on the site the pics jump a bit before it loads. does neone know why?

the site is www.beyondvisualdesigns.co.uk

go to illustration & click on numbers

001
003
005
006

and ur see wot i mean.

can ne one help!

thanks

EEE
June 22nd, 2004, 10:30 PM
EEE: I 'm sorry, but I do not really understand what the problem is that you are having. Maybe post the code you are using, and try to explain what you are trying to achieve?

As for Beebs' question that was overlooked, maybe something like

if(cur== pArray.length -1) {
clearInterval(slideInterval);
}

in the slideshow function?
thanks dr.ew , with here i attach my fla file to you ,have a look n check my code for the next button.

this fla is for user to choose what movie they would like to play later . For example:first the user will click movie 1 , movie 2 , movie 3 ,second click the play button,third the movie 1 will play in the movie clip , after movie 1 played it will stop until the user click the next button then the movie 2 will play ,after movie 2 click next button again then movie 3 will play .

so the problem is my code just can play until movie 2 only , how i going to do for playing 3 or 4 or as many as i can just using the next button.

dr.ew
June 22nd, 2004, 10:47 PM
sipher: scotty deserves all the credit, not me=] the only reason I can answer any questions about this stuff is because scotty answered all of mine=]

recognize: it seems to me that you are missing a containerMC._alpha = 0 ; somewhere. You should put this line at the beginning of your code, when you set out your variables, and once in the first line of the loadpic function. This makes the image invisible while all of the resizing takes place. Also, on the fading-in code at the end of the resizeMe function, I found that putting
containerMC._alpha += 9; //fade in image, 9 instead of 5...
if (containerMC._alpha>90) {
containerMC._alpha = 99; //99 instead of 100 to avoid a little 'jump'

fixed up jumping and ghosting problems.
I love the illustrations!!! great work! The first image really reminds me of a short animation called 'More' by Mark Osbourne. (if you haven't seen this, check it out, its online somewhere...)

EEE: I'll have a look=]

Beebs
June 23rd, 2004, 12:25 AM
I use this fantastic gallery by loading the images through xml data. I need a help though:

1. Beside the images, how can the thumbnail can be updated dynamically through xml as well?
2. I want to display those thumbnail in more than two rows because the images will be added constantly in the future. To illustrate:

Thumbnail:
XXXXXXXXX
XXXXXXXXX
XXXXXXXXX

I have download the file with thumbnail and scroll bar in this thread but it is using txt instead of xml.

Thanks everyone for your help and shine on

EEE
June 23rd, 2004, 01:34 AM
thanks dr.ew
i try use another method of code .the code is like this
on (release) {
_root.next.onRelease = function() {
if (i<moviesToShow_array.length) {
_root.contents.loadMovie(""+moviesToShow_array[i]+"");
i++;
}
};
}

it can play as many movie as i choose but after playing the first movie it some lagging before go to play 2nd,3rd,..... just lagging for the first others can play smoothly.

how to correct it ?

Recognize
June 23rd, 2004, 02:49 AM
sipher: scotty deserves all the credit, not me=] the only reason I can answer any questions about this stuff is because scotty answered all of mine=]

recognize: it seems to me that you are missing a containerMC._alpha = 0 ; somewhere. You should put this line at the beginning of your code, when you set out your variables, and once in the first line of the loadpic function. This makes the image invisible while all of the resizing takes place. Also, on the fading-in code at the end of the resizeMe function, I found that putting
containerMC._alpha += 9; //fade in image, 9 instead of 5...
if (containerMC._alpha>90) {
containerMC._alpha = 99; //99 instead of 100 to avoid a little 'jump'

fixed up jumping and ghosting problems.
I love the illustrations!!! great work! The first image really reminds me of a short animation called 'More' by Mark Osbourne. (if you haven't seen this, check it out, its online somewhere...)

EEE: I'll have a look=]


Dr.ew i got that in my code already and it still jumps. This is wot I got so far:

spacing = 10;
containerMC._alpha = 0;

MovieClip.prototype.loadPic = function(pic) {
containerMC._alpha = 0;
this.loadMovie(pic);
this._parent.onEnterFrame = function() {
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
bar._visible = 1;
per = Math.round((l/t)*100);
if (t != 0 && Math.round(l/t) == 1 && containerMC._width != 0) {
var w = containerMC._width+spacing, h = containerMC._height+spacing;
border.resizeMe(w, h, pic);
bar._visible = 0;
loadText.text = "";
delete this._parent.onEnterFrame;
} else {
bar._width = per;// gives the bar a max width 100
loadText.text = per+" % loader ";
}
};
};
MovieClip.prototype.resizeMe = function(w, h){
var speed = 3;
this.onEnterFrame = function(){
this._width += (w - this._width)/speed;
this._height += (h - this._height)/speed;
if( Math.abs(this._width-w)<1){
this._width = w;
this._height = h;
containerMC._x = this._x - this._width/2 + spacing/2;
containerMC._y = this._y - this._height/2 + spacing/2;
containerMC._alpha += 9;
if (containerMC._alpha>90) {
containerMC._alpha = 99;
//_root.containerMC._alpha = 100;
delete this.onEnterFrame;
}
}
};
};
stop();


(sorry about the layout, just did copy & paste) neway

And this still jumps but if i test it from my pc its fine no jumpin. If you look on the site wots goin on it that after the index page, this page is the main page where all my external swf will get called into (empty movie clip). And on the illustration button its got this code:

on (release) {
_root.contents.loadMovie("3D - illustration.swf");
}

all the buttons are in side a movie clip. I dont know if this maybe causing the problem, I have no idea. Am still a newbie.

Ne ideas???? Ne one! :h:

dr.ew
June 23rd, 2004, 05:54 AM
recognize: to me it totally seems that the alpha=0 is not there - even though it IS there in your code...I say this because when you click on an image#, it automatically appears, but ghosted, and where the 'previous' border n containerMC is...exactly the problem that the alpha=0 is supposed to fix..Also notice that when you click on an empty #, then on an image again it works fine.
Perhaps the containerMC._alpha is not working because it is not pathed properly? from _root, where does containerMC sit? (_root.contents.containerMC...) Sorry, that is the only thing I can think of that would be giving you this problem; aside from that, I don't know why its not working. I hope thats the problem, cuz its an easy fix=].

EEE: I had a look at your fla, and I don't mean to be rude or disrespectful, but it totally makes no sense. You call functions that you haven't defined. You have the slideshow function in the next button code, but the slideshow function is supposed to replace the need for next/prev buttons, instead using setInterval to move through the array every 2000 msecs... You aren't really using an array navigation system through the images, because you aren't setting up a variable that keeps track of the current position of the array. (when you press the next button, its calling for simply "1" or "2" not the entry in the array, like cur+1, as in some of the earlier versions in this thread. Also, your holder clip 'contents' (the equivalent of containerMC) is off stage, and has some buttons and code in it that is causing problems..(do you use your output window to debug when you preview your swf? u should =] ) What you are trying to do is already in scotty's V2.zip, it has next and previous buttons, and thumbnail buttons that will bring up that image...I think I understand what you are trying to do; the user chooses what to put in the array and then a slideshow is generated with all the selections they have chosen when they press play? You could adapt the v2 file to this, just add a first frame, where you have the array set up and the addMovie function that lets the user populate the array themsleves,(this works properly, I've traced the array, and it returns whatever buttons have been pressed. neat idea =] ) and a play button that would go to the 2nd frame, the normal v2 fla...on the code, just take out all the xml related part - you wont need it since your array has already been set up. Be sure to put the slideshow function (that disables the next button) on the frame code. I would advise that you just start a new file, rather than try to fix all the problems in this one.
Anyway I really don't mean to pick on you or be condescending. Read through this thread again, and keep trying. If you have more questions (hopefully more specific questions that we can actually answer for you =] ) just ask! Good luck=]

EEE
June 23rd, 2004, 06:24 AM
recognize: to me it totally seems that the alpha=0 is not there - even though it IS there in your code...I say this because when you click on an image#, it automatically appears, but ghosted, and where the 'previous' border n containerMC is...exactly the problem that the alpha=0 is supposed to fix..Also notice that when you click on an empty #, then on an image again it works fine.
Perhaps the containerMC._alpha is not working because it is not pathed properly? from _root, where does containerMC sit? (_root.contents.containerMC...) Sorry, that is the only thing I can think of that would be giving you this problem; aside from that, I don't know why its not working. I hope thats the problem, cuz its an easy fix=].

EEE: I had a look at your fla, and I don't mean to be rude or disrespectful, but it totally makes no sense. You call functions that you haven't defined. You have the slideshow function in the next button code, but the slideshow function is supposed to replace the need for next/prev buttons, instead using setInterval to move through the array every 2000 msecs... You aren't really using an array navigation system through the images, because you aren't setting up a variable that keeps track of the current position of the array. (when you press the next button, its calling for simply "1" or "2" not the entry in the array, like cur+1, as in some of the earlier versions in this thread. Also, your holder clip 'contents' (the equivalent of containerMC) is off stage, and has some buttons and code in it that is causing problems..(do you use your output window to debug when you preview your swf? u should =] ) What you are trying to do is already in scotty's V2.zip, it has next and previous buttons, and thumbnail buttons that will bring up that image...I think I understand what you are trying to do; the user chooses what to put in the array and then a slideshow is generated with all the selections they have chosen when they press play? You could adapt the v2 file to this, just add a first frame, where you have the array set up and the addMovie function that lets the user populate the array themsleves,(this works properly, I've traced the array, and it returns whatever buttons have been pressed. neat idea =] ) and a play button that would go to the 2nd frame, the normal v2 fla...on the code, just take out all the xml related part - you wont need it since your array has already been set up. Be sure to put the slideshow function (that disables the next button) on the frame code. I would advise that you just start a new file, rather than try to fix all the problems in this one.
Anyway I really don't mean to pick on you or be condescending. Read through this thread again, and keep trying. If you have more questions (hopefully more specific questions that we can actually answer for you =] ) just ask! Good luck=]

its ok thanks for have a look to it .in which page the scottyV2.zip file cos i can't find it.

dr.ew , the lastest code i post here ,do u have a look 2.cos by using the code i can load the movie as much as i can.
so can u take a look to it n let me know wat is ur comments or any better idea u have. thanks

Recognize
June 23rd, 2004, 02:50 PM
recognize: to me it totally seems that the alpha=0 is not there - even though it IS there in your code...I say this because when you click on an image#, it automatically appears, but ghosted, and where the 'previous' border n containerMC is...exactly the problem that the alpha=0 is supposed to fix..Also notice that when you click on an empty #, then on an image again it works fine.
Perhaps the containerMC._alpha is not working because it is not pathed properly? from _root, where does containerMC sit? (_root.contents.containerMC...) Sorry, that is the only thing I can think of that would be giving you this problem; aside from that, I don't know why its not working. I hope thats the problem, cuz its an easy fix=].


Right dr.ew I have seem to get it working by taking out the code for the preloader (which i just robbed from another file) so maybe there was something in there.

So this is what i got now:

spacing = 8;
containerMC._alpha = 0;

MovieClip.prototype.loadPic = function(pic){
containerMC._alpha = 0;
this.loadMovie(pic);
_root.onEnterFrame = function(){
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
if (t != 0 && Math.round(l/t) == 1){
var w = containerMC._width + spacing, h = containerMC._height + spacing;
border.resizeMe(w, h);
delete _root.onEnterFrame;
}
}

};
MovieClip.prototype.resizeMe = function(w, h) {
var speed = 3;
this.onEnterFrame = function() {
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
if (Math.abs(this._width-w)<1) {
this._width = w;
this._height = h;
containerMC._x = this._x-this._width/2+spacing/2;
containerMC._y = this._y-this._height/2+spacing/2;
containerMC._alpha += 5;
if (containerMC._alpha>90) {
containerMC._alpha = 100;
delete this.onEnterFrame;
}
}
};
};

stop();

Could you help me to get a preloader to work with this? If you can that would be greatful, if not then thanks anyway for having a look.

:cubs:

And neone else out there that could help would be great 2.

scotty
June 23rd, 2004, 03:20 PM
MovieClip.prototype.loadPic = function(pic) {
containerMC._alpha = 0;
this.loadMovie(pic);
_root.onEnterFrame = function() {
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
var percent = Math.round(100*l/t);
if (t != 0 && Math.round(l/t) == 1 && containerMC._width>0 && containerMC._height>0) {
var w = containerMC._width+spacing, h = containerMC._height+spacing;
border.resizeMe(w, h);
loadertxt.text = " ";
delete _root.onEnterFrame;
} else {
loadertxt.text = percent+" % loaded";
loadbar._width = percent;
}
};
};

should work for a textfield "loadertxt" and a mc "loadbar":)
I added checking for width/height in the if statement, this should prevent the "jumping"...

scotty(-:

Recognize
June 23rd, 2004, 09:49 PM
MovieClip.prototype.loadPic = function(pic) {
containerMC._alpha = 0;
this.loadMovie(pic);
_root.onEnterFrame = function() {
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
var percent = Math.round(100*l/t);
if (t != 0 && Math.round(l/t) == 1 && containerMC._width>0 && containerMC._height>0) {
var w = containerMC._width+spacing, h = containerMC._height+spacing;
border.resizeMe(w, h);
loadertxt.text = " ";
delete _root.onEnterFrame;
} else {
loadertxt.text = percent+" % loaded";
loadbar._width = percent;
}
};
};

should work for a textfield "loadertxt" and a mc "loadbar":)
I added checking for width/height in the if statement, this should prevent the "jumping"...

scotty(-:

I done that and it dont work. But then again I dont know wot the hell am doing. Let me just check if I have done this right.

I created a Dynamic Text box with an Instance name loadertxt. Then I created a mc called loadbarMC with a box graphic in side it.

Added the code above that you gave me and it still dont work. You can check on the site its www.beyondvisualdesigns.co.uk

Also I notice that you can see the preloader bar and the no. 34 already, why is that??

Thanks scotty if you can help or neone out there.

EEE
June 23rd, 2004, 10:26 PM
scotty : where can i find the v2.zip file u upload which dr.ew told me ?
cos doing slide show ,next & previous button

EEE
June 23rd, 2004, 11:24 PM
dr .ew are u using the testing 1 .zip to trace the array n it work??can u send me the zip file that u already change?

EEE
June 23rd, 2004, 11:38 PM
Here's an version with previous and next buttons plus text:)
http://home.wanadoo.nl/gertvinke/kirupa/V2.zip

scotty(-:
hi scotty, i already try out ur code in v2.zip . i put the code at the first frame of my fla but it cannot work , how to fix it ?

pixeldude
June 23rd, 2004, 11:38 PM
can i apply this method to external swf as well...i mean border resize is it possibe...

scotty
June 24th, 2004, 06:07 AM
@recognize

loadbar._visible = 0;
MovieClip.prototype.loadPic = function(pic) {
containerMC._alpha = 0;
this.loadMovie(pic);
loadbar._visible = 1;
this._parent.onEnterFrame = function() {
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
var percent = Math.round(100*l/t);
if (t != 0 && Math.round(l/t) == 1 && containerMC._width>0 && containerMC._height>0) {
var w = containerMC._width+spacing, h = containerMC._height+spacing;
border.resizeMe(w, h);
loadbar._visible = 0;
loadertxt.text = " ";
delete this.onEnterFrame;
} else {
loadertxt.text = percent+" % loaded";
loadbar._width = percent;
}
};
};
be sure your bar has an instancename "loadbar" (or change the code;) )

scotty(-;

pixeldude
June 28th, 2004, 08:45 AM
is it I have to change the code if I wanna resize loaded swf different size as well..

if yes which part I have to change it...

dallas
June 28th, 2004, 10:50 PM
Just a little spanner in the works so far....

If you had images that were for example "01.jpg, 02.jpg etc... 12.jpg"

Instead of stating waht they are in an array. couldn't you make an array that states there is an incrmental advancement of 1 each time a button is pushed.

If you could do that, you wouldn't need any external files "xml" to go to the next image. The array would just look in the folder and load the next number eg 3.jpg to 4.jpg.

that way you can add more or less images and not even touch the swf file again.

Does anyone have any ideas on the above?????

Rufus
June 30th, 2004, 06:33 AM
Hi,

I've tried exactly what you've asked...Have a look through this script and see if you understand it. This should be exactly what you're looking for:

<FONT style="BACKGROUND-COLOR: #f5f5ff">

spacing = 8;
_root.containerMC._alpha = 0

//maxImages = is loaded externally at load form max.txt in the section image folder.

loadVariables("/gallery/images/setTwo/max.txt", maxImages);
cur = 1;
myPath = ("/gallery/images/setTwo/");
picPath = myPath+"pic"+cur+".jpg";
txtpath = myPath+cur+".txt";
picinfo.info = "Picture "+cur;
section.section = "This section contains "+maxImages+" pictures";

this.Text_MC._visible = false;

prevb.onRelease = function() {
cur--;
if (cur<=maxImages && cur>=1) {
_root.Text_MC.loadVariables(myPath+cur+".txt", var1);
containerMC.loadPic(picPath);
picinfo.info = "Picture "+cur;
} else {
cur = maxImages;
containerMC.loadPic(picPath);
_root.Text_MC.loadVariables(myPath+cur+".txt", var1);
picinfo.info = "Picture "+cur;
}
};


nextb.onRelease = function() {
cur++;
if (cur<=maxImages) {
containerMC.loadPic(picPath);
_root.Text_MC.loadVariables(myPath+cur+".txt", var1);
picinfo.info = "Picture "+cur;
} else {
cur = 1;
containerMC.loadPic(picPath);
_root.Text_MC.loadVariables(myPath+cur+".txt", var1);
picinfo.info = "Picture "+cur;
}
};

//resize stuff

MovieClip.prototype.loadPic = function(pic) {
containerMC._alpha = 0;
this.loadMovie(myPath+"pic"+cur+".jpg");
this._parent.onEnterFrame = function() {
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
if (t != 0 && Math.round(l/t) == 1 && containerMC._width>0) {
if (containerMC._width>wMax && this._width>=this._heigth) {
containerMC._width = wMax;
containerMC._yscale = containerMC._xscale;
} else if (containerMC._height>hMax && this._height>this._width) {
containerMC._height = hMax;
containerMC._xscale = this._yscale;
}
var w = containerMC._width+spacing, h = containerMC._height+spacing;
border.resizeMe(w, h, pic);
delete this._parent.onEnterFrame;
}
};
};
MovieClip.prototype.resizeMe = function(w, h, pic) {
var speed = 3;
this.onEnterFrame = function() {
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) {
this._width = w;
this._height = h;
containerMC._x = this._x-this._width/2+spacing/2;
containerMC._y = this._y-this._height/2+spacing/2;
containerMC._alpha += 12;
if (_root.containerMC._alpha>90) {
_root.containerMC._alpha = 100;
delete this.onEnterFrame;
}
}
};
};




Hope it helps!!

Rufus

EEE
June 30th, 2004, 06:48 AM
dr.ew ,something to ask....

a check solution(button) that let user click ,then the answer will come out for the first line ,click second time for the check button, the second line for the answer will be come out.

the answer will be put into a array ,so how i m going to trace the answer out by clicking the button. the array is declared at the action script fo the button.only i button will be use to click all the answer come out step by step .

EEE
July 1st, 2004, 11:35 PM
recognize: to me it totally seems that the alpha=0 is not there - even though it IS there in your code...I say this because when you click on an image#, it automatically appears, but ghosted, and where the 'previous' border n containerMC is...exactly the problem that the alpha=0 is supposed to fix..Also notice that when you click on an empty #, then on an image again it works fine.
Perhaps the containerMC._alpha is not working because it is not pathed properly? from _root, where does containerMC sit? (_root.contents.containerMC...) Sorry, that is the only thing I can think of that would be giving you this problem; aside from that, I don't know why its not working. I hope thats the problem, cuz its an easy fix=].

EEE: I had a look at your fla, and I don't mean to be rude or disrespectful, but it totally makes no sense. You call functions that you haven't defined. You have the slideshow function in the next button code, but the slideshow function is supposed to replace the need for next/prev buttons, instead using setInterval to move through the array every 2000 msecs... You aren't really using an array navigation system through the images, because you aren't setting up a variable that keeps track of the current position of the array. (when you press the next button, its calling for simply "1" or "2" not the entry in the array, like cur+1, as in some of the earlier versions in this thread. Also, your holder clip 'contents' (the equivalent of containerMC) is off stage, and has some buttons and code in it that is causing problems..(do you use your output window to debug when you preview your swf? u should =] ) What you are trying to do is already in scotty's V2.zip, it has next and previous buttons, and thumbnail buttons that will bring up that image...I think I understand what you are trying to do; the user chooses what to put in the array and then a slideshow is generated with all the selections they have chosen when they press play? You could adapt the v2 file to this, just add a first frame, where you have the array set up and the addMovie function that lets the user populate the array themsleves,(this works properly, I've traced the array, and it returns whatever buttons have been pressed. neat idea =] ) and a play button that would go to the 2nd frame, the normal v2 fla...on the code, just take out all the xml related part - you wont need it since your array has already been set up. Be sure to put the slideshow function (that disables the next button) on the frame code. I would advise that you just start a new file, rather than try to fix all the problems in this one.
Anyway I really don't mean to pick on you or be condescending. Read through this thread again, and keep trying. If you have more questions (hopefully more specific questions that we can actually answer for you =] ) just ask! Good luck=]

dr .ew ,

how can i put all the answer into an array then use 1 check button to call the answer out 1 by 1 .For the answer ,each line has a voice that match to it ,array to put into answer is possible how about the answer n also the voice?so that when click the check button ,the answer n the voice will come out at the same time .

Beebs
July 2nd, 2004, 02:34 AM
Hi Scotty,

I need a little bit of help.

I use this gallery to load swf - let's call it "about.swf". Within the about.swf that I load into containerMC, I have multiline dynamic text. I have embedded the font, as well as export the font and linkage to. I named the font "standard". I then also declare the font in the about.swf in the action script layer : globalStyleFormat.textFont = "standard";

I have double check the position of x and y of the text. All checked!- all have a rounded position ( no decimal at all). The about.swf movie has dimension 400x500, so it's guaranteed that when it's divided by two it will have rounded number.

Problem is that: All the font are blurry and pixelated, not like a usual bitmap font when it's loaded into containerMC

Is this because of the Math expression within the prototype.resizeMe might produce decimal number?

Can you give me a workaround for my problem?

Txs before

EEE
July 2nd, 2004, 07:08 AM
hi,facing problem here,needs help.
how am i going to do by using 1 button to let the words in array to come out 1 by 1 according the place that i already named it?!

thanks

Rufus
July 2nd, 2004, 12:42 PM
Hi,

Did anyone else notice that when you load the images and they have the same width or height as the previous one, the animation of the "background border clip" screws up...Instead of resizing to the new dimensions, it just jumps to the new size...
Any idea how to fix this...?

Rufus

scotty
July 2nd, 2004, 12:49 PM
Did add checking for height in this line:

if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) {
??

scotty(-:

Rufus
July 2nd, 2004, 01:01 PM
Yep, that got it...thanks a lot Scotty!

One thing I never got to work, was the preloader...I looked at the posts on this, but it never worked for me. I'll be using this slideshow on a CD-rom, with the slightly altered script I posted in post #340, so it doesn't use xml and arrays, but as yet the preloader doesn't work...I tried it on CD, but allas...
Any ideas?

Thanks,

Rufus

mikkelbarker
July 6th, 2004, 05:57 PM
Hi

I have followed along.....tried to follow along to this thread and have gotten very much help from it. Especially from dr.ew - thanks.
I now have another question.
I have the gallery and would like it to load different images or swf files every times a user enters my site.
The following code is the best i can do but it doesn't work. Can you help.
Thanks Mikkel
.
.
spacing = 5;
_root.containerMC._alpha = 0;
var pArray = new Array();
pArray = ["pic1.jpg", "pic2.jpg", "pic3.jpg", "pic4.jpg", "pic5.jpg"];
path = "/images/";
i = pArray.length;
k = Math.floor(Math.random()*i);

MovieClip.prototype.loadPic = function(pic){
_root.containerMC._alpha = 0;
cur = pic;
this.loadMovie(path+pArray[k]);
this._parent.onEnterFrame = function(){
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
if (t != 0 && Math.round(l/t) == 1 && containerMC._width>0){
var w = containerMC._width + spacing, h = containerMC._height + spacing;
border.resizeMe(w, h, pic);
delete this._parent.onEnterFrame;
}
}
};
MovieClip.prototype.resizeMe = function(w, h, pic){
var speed = 5;
this.onEnterFrame = function(){
this._width += (w - this._width)/speed;
this._height += (h - this._height)/speed;
if( Math.abs(this._width-w)<1 &&Math.abs(this._height-h)<1){
this._width = w;
this._height = h;
containerMC._x = this._x - this._width/2 + spacing/2;
containerMC._y = this._y - this._height/2 + spacing/2;
containerMC._alpha += 9;
if (_root.containerMC._alpha>90){
_root.containerMC._alpha = 99;
delete this.onEnterFrame;
}
}
};
};

melf
July 8th, 2004, 09:26 AM
http://www.rogermontserrat.com :crazy:

sipher
July 8th, 2004, 09:42 AM
nice site melf... a litle off site sometimes ...when click on the btn .. the image load first before the bg...or did u meant to do that?

Rufus
July 8th, 2004, 01:57 PM
Nice site melf,

but you should really add the option to NOT have it fullscreen...I've got a two-screen set-up...so everything is split between the screens...Yes my graphic card sucks...Otherwise the whole nthing has a nice and smooth feeling to it.

Rufus

vman
July 12th, 2004, 12:17 AM
First I'd like to say thanks to Scotty and all of the other guys that made this such a great thread. I've been checking it out from time to time and now the time has come where I need to do something like this. I've been playing around with it all day and for some reason, the easing functionality of the size doesn't work for me. It works on the first one only. I can't figure out what the problem is and I haven't read about anyone else having this issue. Can anyone give me a clue? The files are attached. Thanks in advance

scotty
July 12th, 2004, 08:29 AM
It's a little error in the original code:)
Look in the code for this line:

if (Math.abs(this._width-w)<1) {
and change it in this:

if (Math.abs(this._width-w)<1&&Math.abs(this._height-h)<1) {
Since you pics have equal width's, the statement as you had it, was allways true...

scotty(-:

vman
July 12th, 2004, 05:00 PM
Thanks for the tip Scotty. Works fine now. And thanks again for making this such a great thread. It's been a big help!

scotty
July 12th, 2004, 05:02 PM
no problem:)

angiers
July 12th, 2004, 11:30 PM
quick question... ran across this thread really liked it tryed it out and decided to expand on it. wanted to move the images or menu with the border. I grouped it all in a mc called menu and then wrote an extra function to move it called MoveMe. I added the function call into the loadPicture Function and added varibles to decide what the x and y position would have to be. This is the code I've added.
//new varibles
var w = containerMC._width + spacing, h = containerMC._height + spacing,
a = containerMC._x + spacing*2 , b = border._y + containerMC._height/2 + spacing*2 ;

//New Function goes at the end
MovieClip.prototype.MoveMe = function(a, b){
var speed = 3;
this.onEnterFrame = function(){
this._x += (a - this._x)/speed;
this._y += (b - this._y)/speed;
if (Math.abs(this._x - a)<1 && Math.abs(this._y - b)<1) {
this._x = a;
this._y = y;
delete this.onEnterFrame;
}
}

only prob though is you have to click twice on the menu items to get the x position where it should be. The Y position works perfectly.. any thoughts?

angiers
July 12th, 2004, 11:44 PM
never mind figured it out the varibles should be
var w = containerMC._width + spacing, h = containerMC._height + spacing, a = border._x - containerMC._width/2 + spacing*2, b = border._y + containerMC._height/2 + spacing*2 ;

vman
July 13th, 2004, 03:25 PM
I'm trying to use this script in conjuction with some of my own that creates some rows of dynamically loaded jpg's. I can't find anything in Flash help regarding MovieClip.prototype. The pictures load into the container ok when the jpg's are clicked, but the border doesn't resize and there's no alpha fade exept for the first one. Can someone tell me where my problem lies? Thanks.

numberOfFiles = 14;
numColumns = 6;
cnt = 1;
startX = startY=0;
for (i=1; i<=numberOfFiles; i++) {
this.attachMovie("box", "box"+i, i, {_x:startX, _y:startY});
this["box"+i].container.loadMovie("Arra/thumbs/"+[i]+".jpg");
this["box"+i].targNum = i;
this["box"+i].onRelease = function() {
_root.containerMC.loadMovie("Arra/pic"+this.targNum+".jpg");
};
startX = (cnt%numColumns == 0) ? 0 : startX+_level0["box"+i]._width;
startY = (cnt%numColumns == 0) ? startY+_level0["box"+i]._height : startY;
cnt++;
}
spacing = 10;
containerMC._alpha = 0;
MovieClip.prototype.loadPic = function(pic) {
containerMC._alpha = 0;
this.loadMovie(pic);
_root.onEnterFrame = function() {
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
if (t != 0 && Math.round(l/t) == 1 && containerMC._width != 0) {
var w = containerMC._width+spacing, h = containerMC._height+spacing;
border.resizeMe(w, h);
delete _root.onEnterFrame;
}
};
};
MovieClip.prototype.resizeMe = function(w, h) {
var speed = 3;
this.onEnterFrame = function() {
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) {
this._width = w;
this._height = h;
_root.containerMC._x = this._x-this._width/2+spacing/2;
_root.containerMC._y = this._y-this._height/2+spacing/2;
_root.containerMC._alpha += 9;
if (_root.containerMC._alpha>90) {
_root.containerMC._alpha = 100;
delete this.onEnterFrame;
}
}
};
};
_root.containerMC.loadPic("Arra/pic1.jpg");

vman
July 13th, 2004, 04:18 PM
Oops, I'm an idiot. It's always the little things!


_root.containerMC.loadPic("Arra/pic"+this.targNum+".jpg");

mdawson
July 19th, 2004, 09:45 AM
Hi credit to all i have learnt so much from this thread.

Just one question if you take a look at my fla Im trying to dynamically produce buttons for nodes in the xml. I have managed to get the attatch a button for each node but i am stuck how to get these to function can you help...!

mdawson
July 19th, 2004, 09:50 AM
forgot to zip it

dr.ew
July 19th, 2004, 05:48 PM
is it an mx04 file? i cant open with mx.

mdawson
July 20th, 2004, 10:01 AM
is it an mx04 file? i cant open with mx.
Hi i had some luck producing a dynamic buttons.

Heres my final fla(mx) i want to replace the old menu but not sure how attatch movie works in relation to alignment.

Could someone have a look and maybe amend so the buttons appear where the old menu is with the text description underneath.

Thanks for you help.........!

mdawson
July 20th, 2004, 11:41 AM
Well heres my version with dynamic buts.

Thanks goes to all

dr.ew
July 20th, 2004, 01:18 PM
looks good! one thing i noticed is that if you have lots of images ( and therefore lots of buttons) the button list goes off the stage, or juts out beyond container_mc.
if you put this in your resizeMe function, the button row will adhere to the width of the displayed image.

nav._width = containerMC._width;

the drawback is that the buttons individual width will also skew; for long images, the buttons are wide, for narrow images the buttons become narrow. but at least they will be visible=]

vman
July 20th, 2004, 06:52 PM
Just thought I'd post a link to a project I'm working on for my friend's band's Web site. The idea all started with this awesome thread (thanks again Scotty and everyone else that contributed). A lot of thanks goes to CyanBlue for helping me out with some coding issues as well.

Anyways, what it does is dynamically create a series of thumbnails in grid form based on how many images are in a particular folder (via php). It also dynamically creates a series of buttons to change galleries based on how many folders are in a particular directory (also via php). The text on the buttons is also dynamically created based on which gallery directory the images are loading from (also via php). Being a novice, this was a pretty big accomplishment for me and I learned a lot thanks to this thread and others at AS.org.

There are only 2 images in the first gallery that resize all the way at the bottom. Please let me know if you find bugs. Thanks.

http://www.thezplane.com/test/test2.swf

If anyone would care to see the code, let me know.

BTW, the pictures don't have anything to do with the band. They're just some personal ones I used temporarily. Only 3 of the buttons work. I just added some empty folders to test the php code amd the dynamic text on the buttons..

dekkerd
July 20th, 2004, 07:04 PM
Hi, I just got into this thread and was doing some experimenting with v3.zip. I read a post that said you could use this resizer to load swf's instead of images and I wanted try it out, but I've found a hickup I can't grasp. If I let the resizer movie autoload the first external swf file I can't get it to load any other swf file, i.e. when I click the next buttons in my menu nothing happens. Now when I don't allow the resizer movie to autoload an swf I can click on any of the menu buttons to load any of my swf's, but after that swf is loaded I am then in the same situation of clicking menu buttons with no response. This makes me think that maybe it's nested timeline issue? I'm using all the defaults from V3. Is there anything I should do in regards to keeping the timelines correctly separted when loading swf's into the resizer movie? -or- If that's not the issue, any ideas on what could be causing the resizer to only load one swf?

PS

Just so I'm crystal clear, I've made no changes to the V3 code. I've only changed the file names in the XML file to point to my swf's. When I use jpegs the resizer movie works perfectly.

Thanks in advance,
Dekker

mathdaddy
July 20th, 2004, 08:19 PM
I am fairly new to Flash programming and brand new to this thread. It has been a tremendous help as I have started getting together some family photos. I have mainly been working with V3, and I'm hoping to add a couple of things. How would I go about using 2 new buttons (or MC's acting as buttons), to navigate ahead to thumbs 11-20 (or 21-30), or backward to the previous thumbnails? I imagine it will involve changing the thumbs within the nav control, and I am a little unsure on how to best accomplish my goal. Anyway, thanks again for the info provided so far, and thanks in advance for any help. I can attach my .fla if it would help.

Thanks

dekkerd
July 21st, 2004, 10:40 AM
Okay, I figured it out. The resizer won't properly load swf's that have been exported in Flash 7 player, only 6 or below. If you try to load a Flash 7 swf file then the entire movie freezes up. just FYI about an issue. It took a long night of experimenting to figure out that the error was in the export settings, lol!

motionsync
July 21st, 2004, 05:23 PM
Hello from Sweden
Thats my first post in this GREAT forum...I play with "resizeBorder_V2" and I have two questions
1.Is it posible that the images of the thumbnails are loading external via xml like the pictures?

2.I have see at: http://www.amivitale.com (http://www.amivitale.com/) 2 nice effects..
On RollOver the thumbs are loading a image and it apears a blue information arrow that (if you rollOver) show a textinfo about the photo

is this posible to include this in resizeBorder_V2

Regards and sorry for my bad english

mathdaddy
July 21st, 2004, 08:29 PM
Just thought I'd post a link to a project I'm working on for my friend's band's Web site. The idea all started with this awesome thread (thanks again Scotty and everyone else that contributed). A lot of thanks goes to CyanBlue for helping me out with some coding issues as well.

Anyways, what it does is dynamically create a series of thumbnails in grid form based on how many images are in a particular folder (via php). It also dynamically creates a series of buttons to change galleries based on how many folders are in a particular directory (also via php). The text on the buttons is also dynamically created based on which gallery directory the images are loading from (also via php). Being a novice, this was a pretty big accomplishment for me and I learned a lot thanks to this thread and others at AS.org.

There are only 2 images in the first gallery that resize all the way at the bottom. Please let me know if you find bugs. Thanks.

http://www.thezplane.com/test/test2.swf

If anyone would care to see the code, let me know.

BTW, the pictures don't have anything to do with the band. They're just some personal ones I used temporarily. Only 3 of the buttons work. I just added some empty folders to test the php code amd the dynamic text on the buttons..
Vman, very nice site. This is almost exactly what I'd like to do with my family photos. I am fairly new to Flash programming and brand new to this thread. It has been a tremendous help. I have mainly been working with V3, but I'm hoping to add a couple of things like the menu you used to navigate to other thumbs and sets of pictures. If I could get a copy of your source (.fla and whatever else), I would really appreciate it. Thanks in advance for any help. I can attach my .fla if it would help.

Thanks

vman
July 22nd, 2004, 07:04 PM
mathdaddy,
Thanks for the comp. Unfortunately, I won't be around my computer till next Sunday as I am on vacation. I'll post something when I get back. Just didn't want you to think I was ignoring you.

rmmcclay
July 24th, 2004, 02:07 AM
well okay, first youd havta go back and give the interval an ID..then make a mc, give it an instance name of stop. then use that button on release to clear the interval.

function slideshow(){
if (cur == 0) {
containerMC.loadPic(pArray.length-1);
} else {
containerMC.loadPic(cur-1);
}
};
var slideInterval = setInterval(slideshow, 2000);
stop.onRelease = function () {
clearInterval(slideInterval);
}


that stops it...and you can even put another mc, start, to start the interval up again (another onRelease function that uses the setInterval again...)

Actually, for some reason, the 'start' idea works, but if pressed a lot can cause problems (overlapping intervals..) Also, once youve stopped it, then start it again, the stop doesnt work again. I'll try to figure it out..

This works: Create a clip or button with instance of stop and one for start. Also these functions disable the appropriate instances, thus "start" cannot be clicked more than once. There are no prev/next buttons.

Global var is the key here.



function slideshow(){
if (cur == 0) {
containerMC.loadPic(pArray.length-1);
} else {
containerMC.loadPic(cur-1);
}
};

start.onRelease = function () {
start.enabled = 0;
stop.enabled = 1;
_global.slideInterval = setInterval(slideshow, 2000);
}

stop.onRelease = function () {
start.enabled = 1;
stop.enabled = 0;
clearInterval(slideInterval);
}



-rm

rmmcclay
July 24th, 2004, 07:36 AM
I've noticed that after changing the gallery.xml file Mozilla caches the xml data until the browser is shut down and restarted. I found this solution to the problem which might be useful to others:



// Prevents caching of loaded files (TXTs, SWFs, XMLs etc...)
String.prototype.noCache = function(){
if ((_root._URL.substr(0,5)).toLowerCase()!="file:"){
if(this.indexOf("?")==-1){
return this+="?noCache="+(new Date().getTime());
}else{ return this+="&noCache="+(new Date().getTime());
}
}else{ return this;
}
}

gallery_xml.load("gallery.xml".noCache());

nessie
July 24th, 2004, 01:06 PM
this is the best thread ever i vonder if ther is any one out ther thet knows hov to change the fade to somting like this.

http://www.ronmacphoto.com/


/M

sipher
July 24th, 2004, 01:25 PM
yes of course that's brightOffset

here add this to yur movie....


brightOffset();
}
};
}

MovieClip.prototype.brightOffset = function(alpha){
this.c = new Color(this.containerMC)
this.o = {rb:100,gb:100,bb:100}
this.up = true
this.onEnterFrame = function(){
if(this.containerMC._alpha < 100){
this.containerMC._alpha += 10
}
if(this.up == false){
this.o.rb -= 10
this.o.bb -= 10
this.o.gb -= 10
} else {
if(this.o.rb < 255){
this.o.rb *= 1.5
this.o.bb *= 3
this.o.gb *= 1.5
} else {
this.o = {rb:255,gb:255,bb:255}
this.up = false;
}
}
if(this.o.rb < 0){
this.o = {rb:0,gb:0,bb:0}
delete this.onEnterFrame;
}
this.c.setTransform(this.o)
}
}

nessie
July 24th, 2004, 02:11 PM
thank you but i have no ide wher to put it in te script.

i download the mx.zip from thread 364

/M

sipher
July 24th, 2004, 04:29 PM
HERE ARE BOTH VERSION OF THE FLA..

i hope this help...ok if not let me know

take care

this version of the mx. fla as the brightOffset AS on it...

motionsync
July 24th, 2004, 10:58 PM
GREAT JOB!!!!


My questions is if it is posible that the button have a lite thump of the Pictures
or on (on RollOver) like att http://www.amivitale.com/main.html

Lambis

nessie
July 25th, 2004, 11:51 AM
Thank you so very much it look´s excellent. :D . I wonder if its possible to have the same effeckt when image fades away ???

-thanks !



/M

lunatic
July 25th, 2004, 01:56 PM
Hey Sipher I'm on MX and got "unexpected file format" when trying to open your file. Any chance you could repost it?

:hr:

sipher
July 25th, 2004, 02:15 PM
i post both ver. on tread #378

good luck!!

lunatic
July 25th, 2004, 02:24 PM
Thanks sipher! :D

nessie
July 25th, 2004, 04:12 PM
how do i make the thumnails to show that they have bin visited and show you vher you are??????



:party: /M

snaphappy
July 26th, 2004, 11:29 PM
Sipher, that is a beautiful effect!

Just a beginner so a basic attempt at part of nessie's question.

To make a button look hit you could try something like this in the onPress function



item.onPress= function(){
this._alpha = 50;
}

?

nessie
July 27th, 2004, 08:13 AM
snaphappy i tryed this alredy !

but it makes only the last one to reduce the alfa. I might not know wher to put the code and make it work on each thumb separate. It would be nice if some one know how to make it work!


Thanks!

:pleased: /M

nessie
July 27th, 2004, 08:40 AM
How come when i load a swf in to my gallery the next/prev and the thoumbs functions stops ? and som time they work one time and then dont ... help !


:azn: /M

nessie
July 27th, 2004, 08:49 AM
Snaphappy


forget whot i just wroth about the fade it works now.But the tricky question is how to make the next/prev button to point out on the thoumbs wher you are.!?

snaphappy
July 27th, 2004, 11:30 AM
Snaphappy


forget whot i just wroth about the fade it works now.But the tricky question is how to make the next/prev button to point out on the thoumbs wher you are.!?Glad that works and the next part is indeed tricky, I've been trying to figure that out for the photo gallery I'm building too. If I come up with anything I'll let you know.

nessie
July 27th, 2004, 11:32 AM
:azn: i will do the same for you!

snaphappy
July 29th, 2004, 01:22 AM
ok this is just a basic attempt, but I got it working using some other ideas in the code. Put this in the 'next' button onPress function :



var fadeit = "button_"+cur;
_root.dragwindow.scrll[fadeit]._alpha = 50;


As far as I can see there's no reason why you can't use the same code in the 'previous' button and, indeed, in the slideshow function:)

works for me, hope it works for you too. Be interested in hearing if anyone has any other ideas

Moga
July 31st, 2004, 01:25 PM
I'm new to this forum, but have been browsing a lot on it to get my Flash started! This thread really gave me some great tip's.
So thanx!!!:D

For anyone who would like to see the result:
http://www.ruim-ontwerpers.nl

(Any comment on how to improve it are welcome!)

scotty
July 31st, 2004, 03:17 PM
I like it:)

Maybe it's an idea to let the menu scroll only if you move over it (or in that area)?

scotty(-:

motionsync
July 31st, 2004, 10:02 PM
I have try and try but without success

What I whant is:

If you push the thumnails i show that they have bin visited (this._alpha = 20;)
but I cant doit with the preview & next button..

On roll over I whant that the thumnails load a lite Pic of the foto
like att http://www.amivitale.com/main.html

I post my .fla

thanks

sahana
August 2nd, 2004, 02:32 AM
What a great thread to follow (all 27 pages)...:pleased: Just one comment/question:

If one tries to load quite a few pictures (thus the XML usage) and the pictures are not that small in size (say 400K) there are two big problems:

1. No caching - if you want to go back to a previous picture it has to be loaded again

2. A new picture is not loaded while the current picture is displayed (since the loadMovie command would replace the current picture right away).

Any thoughts on these issues? I've tried loading two separate movies and showing one while the other is loading but with very limited success (not to mention the complete lack of elegance)...

Cheers!

Sahana...:alien2:

Moga
August 2nd, 2004, 08:40 AM
I like it:)

Maybe it's an idea to let the menu scroll only if you move over it (or in that area)?

scotty(-:
Thanks for the feedback Scotty.

I've tried to fix this menu scroll - but didn't manage. Do you know how I can
restrict the area for the mouse, so it wont keep scrolling like a maniac (kind of disturbing for if you read the description text and watch the large pics.

Moga

scotty
August 2nd, 2004, 03:17 PM
I don't know your setup, but you can try this.
Make the mask of the menu a mc and give it an instancename "mask" (without quotes)
In the on(enterFrame) action of your put this code

onClipEvent (enterFrame) {
if (_root.mask.hitTest(_root._xmouse, _root._ymouse)) {
var distance = _root._xmouse-xcenter;
_x += (distance*speed);
//rest of your code
And in the on(load) give xcenter the value of the xcenter of your mask:)
Now the menu only scrolls when your mouse is over the (invisible) mask.

scotty(-:

Moga
August 2nd, 2004, 04:30 PM
Scotty,
Tried your code, but I already use a mask on top of the scrolling_mc to show only a part of the clip. (the same size of one thumb) when I turn this into a movieClip and put your code on it, it works, but the scrolling way is now too small.
I use a frame script:
//scroller is the movieClip with all the tumbnails:
scroller.onLoad = function() {
xcenter = 575;
speed = 1/40;
};
scroller.onEnterFrame = function() {
var distance = _root._xmouse-xcenter;
scroller._x += (distance*speed);
if (scroller._x>522.2) {
scroller._x = -248;
}
if (scroller._x<-248) {
scroller._x = 522.2;
}
};

If I make the mask larger, it's showing more of the thumbnails, which I don't want...:) Any suggestions?

scotty
August 2nd, 2004, 04:51 PM
Off course, LOL.
Make a mc with the size of the area you want your scroll to be active, give it an _alpha 0 and the instancename hitField.
Change your code in this:

var xcenter = 575;
var speed = 1/40;
hitField.onEnterFrame = function() {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
var distance = _root._xmouse-xcenter;
scroller._x += (distance*speed);
if (scroller._x>522.2) {
scroller._x = -248;
}
if (scroller._x<-248) {
scroller._x = 522.2;
}
}
};

scotty(-:

Moga
August 2nd, 2004, 07:01 PM
haha, ofcourse!
Sorry got a bit confused with the "make mask..." :blush:
I changed the code and...GREAT! it WORKS!!!
(i've just put the speed a bit up, so the scroller will move a bit a bit faster in the box.)

Thanx a lot a lot a lot! :hugegrin:

vman
August 3rd, 2004, 01:52 AM
Ok, well I just got back from vacation from hell...I mean Arizona. While I was gone, I got a few PM's asking for the code for the image gallery I posted a few pages back so here' goes.

Here's the AS on frame 1: (there is only 1 frame btw).

thumbs = "thumbs1";
pics = "pics1";
spacing = 10;
textButton_MC.setMask(theMask);
textButton_MC._visible = false;
gutter._visible = false;
init_lv = new LoadVars();
init_lv.thumbs = thumbs;
init_lv.pics = pics;
init_lv.onLoad = function(ok) {
if (ok) {
trace(unescape(this));
trace("this.thumbs = "+this.thumbs);
changeGallery(this.thumbs, this.pics);
} else {
trace("Error!!!");
}
};
init_lv.sendAndLoad("thumbcounter.php", init_lv, "POST");
changeGallery = function (argThumbs, argPics) {
trace("Function changeGallery : argThumbs = "+argThumbs+" argPics = "+argPics);
count_lv = new LoadVars();
count_lv.thumbs = argThumbs;
count_lv.pics = argPics;
count_lv.onLoad = function(ok) {
if (ok) {
_root.galleriesUp = 0;
_root.picNum = 1;
i = 0;
numColumns = 2;
cnt = 1;
startX = 0;
startY = 0;
textButton_MC.ypos = border._y-textButton_MC._height;
trace(unescape(this));
_root.attachMovie("thumbhold", "thumbMC", 0);
thumbMC._visible = false;
thumbMC._y = border._y;
for (i=1; i<=parseInt(_root.count_lv.nof); i++) {
thumbMC.thumbScroller.thumbHolder.attachMovie("box", "box"+i, i, {_x:startX, _y:startY});
thumbMC.thumbScroller.thumbHolder["box"+i].thumbNumber.text = i;
thumbMC.thumbScroller.thumbHolder["box"+i].container.loadMovie("Arra/"+argThumbs+"/"+[i]+".jpg");
thumbMC.thumbScroller.thumbHolder["box"+i].targNum = i;
thumbMC.thumbScroller.thumbHolder["box"+i].onRelease = function() {
textButton_MC.ypos = border._y-textButton_MC._height;
containerMC.loadPic("Arra/"+argPics+"/pic"+this.targNum+".jpg");
_root.galleriesUp = 0;
_root.picNum = this.targNum;
};
thumbMC.thumbScroller.thumbHolder["box"+i].onRollOver = function() {
this.gotoAndPlay("play");
};
startX = (cnt%numColumns == 0) ? 0 : startX+thumbMC.thumbScroller.thumbHolder["box"+i]._width+5;
startY = (cnt%numColumns == 0) ? startY+thumbMC.thumbScroller.thumbHolder["box"+i]._height+5 : startY;
cnt++;
thumbsWidth = thumbMC.thumbScroller._width+10;
}
}
};
count_lv.sendAndLoad("thumbcounter.php", count_lv, "POST");
containerMC.loadPic("Arra/"+argPics+"/pic1.jpg");
};
count_files = new LoadVars();
count_files.onLoad = function(success) {
if (success) {
trace;
numColumns = 15;
cnt = 1;
startX = 0;
startY = 0;
for (var i = 1; i<=parseInt(this.shows); i++) {
_root.textButton_MC.attachMovie("textbutton", "textbutton"+i, i, {_x:startX, _y:startY});
_root.textButton_MC["textbutton"+i].showText.text = this["gig"+i];
_root.textButton_MC["textbutton"+i].targNum = i;
_root.textButton_MC["textbutton"+i].onRelease = function() {
_root.removeMC();
this.thumbs = "thumbs"+this.targNum;
this.pics = "pics"+this.targNum;
_root.galleryTitle.gigText.text = this.showText.text;
textButton_MC.ypos = border._y-textButton_MC._height;
_root.changeGallery(this.thumbs, this.pics);
};
_root.textButton_MC["textbutton"+i].onRollOver = function() {
this.gotoAndPlay("play");
};
startY = (cnt%numColumns == 0) ? 0 : startY+_root.textButton_MC["textbutton"+i]._height;
startX = (cnt%numColumns == 0) ? startX+_root.textButton_MC["textbutton"+i]._width : startX;
cnt++;
}
}
_root.galleryTitle.gigText.text = _root.textButton_MC.textButton1.showText.text;
};
count_files.sendAndLoad("filecounter.php", count_files, "POST");
MovieClip.prototype.loadPic = function(pic) {
containerMC._alpha = 0;
this.loadMovie(pic);
_root.onEnterFrame = function() {
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
bar._visible = 1;
per = Math.round((l/t)*100);
if (t != 0 && Math.round(l/t) == 1 && containerMC._width != 0) {
var w = containerMC._width+spacing, h = containerMC._height+spacing;
border.resizeMe(w, h);
bar._visible = 0;
loadText.text = "";
delete _root.onEnterFrame;
} else {
bar._width = per;
loadText.text = per+" % loaded";
}
};
};
MovieClip.prototype.resizeMe = function(w, h) {
var speed = 3;
this.onEnterFrame = function() {
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
thumbMC._visible = true;
thumbMC._x = this._x-(thumbMC.thumbScroller.thumbHolder._width)-5;
thumbFrame._height = this._height;
thumbFrame._width = thumbsWidth;
galleryTitle._x = this._x+this._width/2;
galleryTitle._y = this._y+this._height;
theMask._width = this._width;
theMask._height = this._height;
gutter._x = thumbFrame._x-thumbFrame._width;
gutter._height = thumbFrame._height;
gutter._width = thumbMC.dragger._width+5;
goldBar._width = this._width+1;
downloadText._x = this._x+this._width;
if (_root.thumbMC.dragger._y>=_root.thumbFrame._height) {
_root.thumbMC.dragger._y = _root.thumbFrame._height/2;
}
if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) {
this._width = w;
this._height = h;
containerMC._x = this._x+spacing/2;
containerMC._y = this._y+spacing/2;
containerMC._alpha += 9;
if (containerMC._alpha>96) {
containerMC._alpha = 100;
delete this.onEnterFrame;
}
}
};
};
removeMC = function () {
thumbMC.removeMovieClip();
gutter._visible = false;
};


Here is the AS on textButton_MC that holds the dynamically created buttons:

onClipEvent (load) {
ypos = border._y-this._height;
speed = 2;
}
onClipEvent (enterFrame) {
this._y = this._y+(ypos-this._y)/speed;
}

Here is the AS on the "more galleries" button:

on (release) {_root.textButton_MC._visible = true;
if (_root.galleriesUp == 0) {
_root.textButton_MC.ypos = _root.border._y;
_root.galleriesUp = 1;
} else if (_root.galleriesUp == 1) {
_root.textButton_MC.ypos = _root.border._y-_root.textButton_MC._height;
_root.galleriesUp = 0;
}
}

Here is the code for the thumbnail scroller. This is a mc in the library with a linkage identifier of "thumbhold" which becomes the instance thumbMC via attachMovie():

targY = 0;
dragger._x = theMask._x-7;
dragger.onPress = function() {
startDrag(this, false, this._x, 0, this._x, (_root.border._height)-this._height-3);
};
dragger.onRelease = dragger.onReleaseOutside=function () {
stopDrag();
};
thumbScroller.onEnterFrame = function() {
if (this._height<_root.border._height) {
dragger._visible = false;
_root.gutter._visible = false;
} else {
dragger._visible = true;
_root.gutter._visible = true;
scrollAmount = (this._height-(_root.thumbFrame._height)/1.07)/(_root.thumbFrame._height-dragger._height);
targY = -dragger._y*scrollAmount;
this._y -= (this._y-targY)/3;
}
};

Here is the AS on the "download image" button:

on (release) {
getURL("javascript:NewWindow=window.open('popup.php?img=Ar ra/"+_root.count_lv.Pics+"/pic"+_root.picNum+".jpg','newWin','width="+_root.containerMC._width+",height="+_root.containerMC._height+",left=0,top=0,toolbar=0,location=No,scrollbars=No, status=No,resizable=No,fullscreen=No'); NewWindow.focus(); void(0);");
}


Now for the php stuff. Here is the code for thumbcounter.php:


<?php
$count = 0;
if (!isset($thumbs))
{
$thumbs = "";
}
$dir = "Arra/$thumbs";
if (is_dir($dir))
{
if ($dh = opendir($dir))
{
while (($filename = readdir($dh)) !== false)
{
if (($filename != ".") && ($filename != ".."))
{
$count ++;
}
}
closedir($dh);
}
}
print "&nof=".$count;
?>



Here is filecounter.php:


<?php
$count = 0;
$week1 = "Walter Payton's Roundhouse 8/16";
$week2 = "Shark City 8/22";
$week3 = "Streamwood Fest 9/1";
$week4 = "Algonquin Fest 9/8";
$week5 = "Durty Nellie's 9/15";
$week6 = "The Lodge 9/22";
$week7 = "Sean Kaley's 10/1";
$week8 = "Pop's Pup 10/8";
$week9 = "North Beach Club 10/15";
$week10 = "Bourbon Street 10/22";
$week11 = "Arlington Height Fest 10/29";
$dir = "Arra";
if (is_dir($dir)){
if ($dh = opendir($dir)){
while (($filename = readdir($dh)) !== false) {
if (($filename != ".") && ($filename != ".."))
{
$count ++;
}
}
closedir($dh);
}
}
print "&shows=".$count;
print "&gig1=".$week1;
print "&gig2=".$week2;
print "&gig3=".$week3;
print "&gig4=".$week4;
print "&gig5=".$week5;
print "&gig6=".$week6;
print "&gig7=".$week7;
print "&gig8=".$week8;
print "&gig9=".$week9;
print "&gig10=".$week10;
print "&gig11=".$week11;
?>


Here is the code for popup.php which was created in dreamweaver to get rid of the ugly top and left margins. lostinbeta was kind enough to lend a hand with this.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Downloadable Image</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<?
list($width, $height, $type, $attr) = getimagesize($_GET['img']);
echo '<img src="'.$_GET['img'].'" NAME="galleryImage" $attr>';
?>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
</body>
</html>

vman
August 3rd, 2004, 01:58 AM
Hmm, wouldn't let me post everything in one shot. This is ultimately going to be used for my friend's band's web site so the pictures don't really match the titles. I just used what I had laying around for now. Also, I just created some empty folders to test the dynamic button creation so anly 4 buttons load anything for now

Anyways, I think that's about it. The unfortunate thing is that, since everything is created dynamically, it may be hard to understand what's going on since there are no thumbs or pics. The .fla might not help much either 'cause there is nothing really to look at since all of the movement is based on the content.

The file structure on my server is as follows: The .swf and all of the php files are in the root directory. Inside that, I have a directory called "Arra". Inside that, I have directories "thumbs1", "thumbs2", "thumbs3", etc. and "pics1", "pics2", "pics3", etc. For it to work the naming convention has to stay like this. Also, the actual .jpgs in the pics folders have to be named pic1.jpg, pic2.jpg, pic3.jpg, etc. and the thumbnails in the thumbs folders are named 1.jpg, 2.jpg, 3.jpg, etc.

The thumbnail mc's that are dynamically created are a movieclip in the library with an identifier name of "box" with a dimension of 60 x 45. The thumbs I create have the same dimensions so they fit nicely. I'm not scaling them at all within Flash.


For some clarification: "thumbMC" is the mc that holds the thumbnails and scrolls. "thumbFrame" is the yellow frame around the thumbnails. "galleryTitle" is the textbox at the bottom of the border. "gutter" is the frame around the dragger for scrolling. "goldBar" is the (you guessed it) the gold bar at the top. "gigText" is the text box within the textbutton movieclip(s) that are dynamically created via attachMovie and loaded into a container movie clip called "textButton_MC" that drops down when you click on "moreGalleries". "downloadText" is the instance name of the Download Image" button.

Hope this helps!:)

All of the code above is based on tutorials from either here or AS.org and was created with the help of a few different members of each so thanks everyone! It was a great learning experience. What got me started on it was this great thread so thanks again Scotty and the rest for all of the help. It still has a lot of room for improvement so any suggestions would be great.

I'm not the best at explaining things so if anyone has any questions, ask and I'll try to answer. Here's the link again. www.thezplane.com/test/new.htm (http://www.thezplane.com/test/new.htm)

lunatic
August 3rd, 2004, 11:17 AM
Hey vman that is awesome!! :thumb: Thanks so much for posting the code and the great explanation - we all really appreciate it!

:love:

CyanBlue
August 3rd, 2004, 11:32 AM
Lovely, Vman... Where is my present from the AZ??? =)

vman
August 3rd, 2004, 12:19 PM
Any time lunatic, hope you get something out of it. Cyan Blue here was an enormous help!




Lovely, Vman... Where is my present from the AZ??? =)
Your refrigerator magnet is in the mail! Just kidding. I wouldn't insult you with something like that. Your being kept in mind for Christmas time!:D

BTW, I am going to have a couple of questions for you later Cyan Blue. Now that I've gone and cleaned this thing up as best I can, there are a couple things in there I'm not getting. If someone asks, I'd like to be able to answer.=)

A little bit of advise for everyone: If you go on vacation with your in-laws, RENT YOUR OWN CAR!!! MONEY IS NO OBJECT!!!

CyanBlue
August 3rd, 2004, 12:25 PM
I wouldn't insult you with something like that. Your being kept in mind for Christmas time!
What's wrong with the refrigerator magnet??? Besides that, I might not alive by the Christmas... Thunder might strike my forehead any second... :D


there are a couple things in there I'm not getting
Yeah... Shoot the question... Maybe me or somebody else knows the answer... :)


If you go on vacation with your in-laws, RENT YOUR OWN CAR!!! MONEY IS NO OBJECT!!!
Uh... That's YOUR fault that you were on vacation with your in-laws... You should do your best to avoid that...
Oh, yeah, BTW... I am going to call your wife to see this thread... :krazy:

vman
August 3rd, 2004, 01:18 PM
Oh, yeah, BTW... I am going to call your wife to see this thread... I'm ok with that. She was ready to kill 'em long before I was. he he. :lol:

FlashPlaya
August 3rd, 2004, 02:46 PM
Great Gallery VMAN!!!

I am having some trouble with the files though. I can't get the images to load?

Here is my folder setup\|/
root\|/
DynamicGallery.swf
filecounter.php
popup.php
thumbcounter.php
folder>Arra\|/
pics1\|/
pic1.jpg
pic2.jpg
thumbs1\|/
1.jpg
2.jpg


I think that I have it all right. But when I try to test it no images come up?

Thanks !!!

FlashPlaya
August 3rd, 2004, 03:19 PM
Nevermind I got It!!
Thanks again for this vman!!!!

lunatic
August 3rd, 2004, 10:42 PM
One thing I did notice, especially on the algonquin fest series of photos - if you scroll way down in the thumbs and start loading some of photos say in the 40's and 50's? Because of the way the container resizes the scrollpane gets kind of messed up. Not a big thing but just something I noticed. :}

vman
August 3rd, 2004, 11:04 PM
Yeah, I noticed that too when there is a huge difference in the photo sizes. Fix that would ya? :D

lunatic
August 3rd, 2004, 11:45 PM
Ha ha, funny man! I'll give it a shot but . . . I've never done PHP before. Actually I was hoping to use an xml menu instead . . .

me + fixing complicated things = :skull: & :drool:

:P

of course if anyone else wants to jump in please feel free! :hugegrin:

vman
August 4th, 2004, 12:17 AM
Well, it doesn't have anything to do with the php. It's this bit right here that's doing it I think.

if (_root.thumbMC.dragger._y>=_root.thumbFrame._height) {
_root.thumbMC.dragger._y = _root.thumbFrame._height/2;
}
If the window is large and then resizes to something much smaller, you want to keep the dragger inside the constraints of the thumbFrame.

If you click #48, then scroll all the way to the bottom, click #39, then #35 this will show an example of what we're talking about. At this point, I'm not sure what's causing it, but I don't think what I'm doing with this code up here is the best way to do this. I'm open to suggestions. I was thinking about doing away with the dragger and just going with a scroller based on mouse position similar to this http://www.thezplane.com/test/scroller.htm. I dunno.

lunatic
August 4th, 2004, 01:01 AM
Don't do it! I find infinite menus to be somewhat annoying - its hard to find a frame rate that satisfies everyone, plus those users who have never seen one before don't really know how to use it. My $0.02 anyway, lol.


I'll give it a whirl, see what I can come up with. Thanks again for posting the code!

:hr:

authentik
August 17th, 2004, 08:13 AM
Hello people!
Scotty i have a question for you!
Some time ago you uploaded the fla Scotty!
I have a question!
I dont understand where are the buttons in that fla,i dont find them!
Thanks!

scotty
August 17th, 2004, 08:29 AM
hey authentik, what .fla?

scotty(-:

authentik
August 18th, 2004, 03:34 AM
When you press the menu button some butons appears but in fla i cant find them!An explication a clue something,thanks man!

scotty
August 18th, 2004, 09:12 AM
Aah, those buttons;)
They're in a mc called "sub_index", which is dynamically attached, you can find it in the library:)

scotty(-:

authentik
August 19th, 2004, 06:03 AM
Thanks a lot man,great work!

scotty
August 19th, 2004, 07:28 AM
welcome:)

nessie
August 19th, 2004, 10:48 AM
xml_gallery_v3_scroller_wText_mx1.fla


Is there any one how knows how to make the thum´s apper on mouse over button instead of being visible all the time. And how do i make the first pic apper when entering movie. And one more question can i place the next/prev button so that they slide one each side of the image :puzzle: ??


i have the .fla from thread:below...........


Page:17
nr:#253


Thread:
http://www.kirupaforum.com/forums/s...t=photo+gallery

/M

nessie
August 19th, 2004, 11:09 AM
any body her how knows!

---------------------------------------------------------------------------

I´w got this code and i wana put a "brightOffset" code here instead how do i do help!

http://www.mikaelnaslund.com/Forum/m1.fla

---------------------------------------------------
Stage.scaleMode = "noScale";
Stage.align = "tl";
mc._alpha = 0;
onLoad = function () {
mc._width = Stage.width;
mc._height = Stage.height;
};
this.onEnterFrame = function() {
change();
};
Stage.addListener(this);
_global.change = function() {
mc._width = Stage.width;
mc._height = Stage.height;


function fadeIn () {
if (mc._alpha < 100) {
mc._alpha += 1
//The higher the number the faster it fades
} else {
clearInterval (time)
}
}
time = setInterval (fadeIn, 50)

};


------------------------------------------------




brightOffset();
}
};
}

MovieClip.prototype.brightOffset = function(){
this.c = new Color(this.containerMC)
this.o = {rb:200,gb:200,bb:200}
this.up = true
this.onEnterFrame = function(){
if(this.containerMC._alpha < 100){
this.containerMC._alpha += 10
}
if(this.up == false){
this.o.rb -= 10
this.o.bb -= 10
this.o.gb -= 10
} else {
if(this.o.rb < 255){
this.o.rb *= 1.5
this.o.bb *= 3
this.o.gb *= 1.5
} else {
this.o = {rb:255,gb:255,bb:255}
this.up = false;
}
}
if(this.o.rb < 0){
this.o = {rb:0,gb:0,bb:0}
delete this.onEnterFrame;
}
this.c.setTransform(this.o)

};
};



/M

Phenex
August 20th, 2004, 07:07 AM
Thanks a zillion million raised to power zillion million for initiating such a thing!
Love ya!

freddie
August 21st, 2004, 06:00 PM
hi everyone....i have learned alot from the gallery tut. ITS AWESOME!!! im stuck in one place though and if someone could help me out id be entirely grateful.

I have some extra buttons in the gallery and i would like to load an swf file into the containerMC but not through the xml file. I dont seem to be able to get the right command so that i can load a external movie from within the gallery through the extra button i have.... but all within the flash file itself and still keeping the resize functions and others as is.....

ex. loadMovie(example.swf, containerMC) but this will not work...

i know im doin this all wrong... i am learning but need help.... thank you

sorry if my english is not that clear...




So if anyone can help me figure this out, please let me know.....

vman
August 21st, 2004, 06:58 PM
Try this if you want the code in your _root timeline:


yourButton.onRelease = function() {
_root.containerMC.loadMovie("yourfile.swf");
};


or this if you want it on the button itself:

on (release) {
_root.containerMC.loadMovie("yourfile.swf");
}
Hope I understood your question:)

freddie
August 21st, 2004, 07:36 PM
yes thats right vman, i got it to load the swf file, but I would like to still have the resize function work for this. what happens here is the file is loaded into containerMC but the border or anything else will not be resized..... is there a way to make this happen?

if not then its ok please do not worry...... i am more than thankful already for having learned so much...... =)

thanks again vman

vman
August 21st, 2004, 09:02 PM
It should work whether it's a .jpg or .swf. Check out the attached file.

sWo0p
August 22nd, 2004, 11:17 AM
I have try and try but without success

What I whant is:

If you push the thumnails i show that they have bin visited (this._alpha = 20;)
but I cant doit with the preview & next button..

On roll over I whant that the thumnails load a lite Pic of the foto
like att http://www.amivitale.com/main.html

I post my .fla

thanks


can you please post a file that a stadard version of flash can open???
i got flash MX but it aint opening?

freddie
August 22nd, 2004, 12:46 PM
It should work whether it's a .jpg or .swf. Check out the attached file.
thank you VMAN, it works GREAT. I was trying to get it to work while still having the xml file included, that must have been why it would not work.?!? I will try to make it work with xml file also...

thanks man, i really appreciate it....

vman
August 22nd, 2004, 12:48 PM
Anytime :) Glad you got it.

freddie
August 22nd, 2004, 01:42 PM
Anytime :) Glad you got it.
LOL, im stuck and my code seems to be so messy... like i said i am still learning but i think i need some BIG help..... i think you know what i am tryin to do....

1. i have 2 buttons that load swf into the containerMC but not with xml - this is ok now

2. on the 3rd button i want to have the gallery including its buttons load with the xml file... but it does not seem to work. I assume that the code needs to be reformated ??? or?

3. is there a code to apply so the user can download the pic or open it in new window ....

so sorry if im bothering you vman

any help would be kindly appreciated.....

vman
August 22nd, 2004, 01:45 PM
Sorry my friend, but I don't know a darn thing about XML.:(

freddie
August 22nd, 2004, 01:49 PM
Sorry my friend, but I don't know a darn thing about XML.:(
thats ok vman, thank you though...... :beer:

byron 2
September 1st, 2004, 04:41 AM
hey love what your doing!

I also like the viewer on

http://www.airtightinteractive.com/simpleviewer/

But they wont give the fla with the zip. Do you think we could make our own between us and make it with resize aswell?

I`m stuck all on my lonesome!!

scotty
September 1st, 2004, 10:54 AM
http://www.kirupaforum.com/forums/showthread.php?t=52290 ;)

scotty(-:

l2edsand
September 2nd, 2004, 07:19 PM
Scotty... you're undeniably the ActionScript God on Kirupa! There's so much in this post that I don't have the time to keep up. Is there any way that I can be lazy (and I'm sure help others out too) and request zip file with a complete version of the gallery setup? Version 3 seemed to be missing a couple of things... I'm so overwhelmed with this post that I would just get lost if I started my own from scratch and end up not finishing it due to lack of time...

Thanks scotty!

Devin

l2edsand
September 2nd, 2004, 07:27 PM
What was the point of this site other than to show off some of the best effects ever!? Did someone say that the .fla's are accessible? I would love to get my hands on those and dissect them one by one! There's so much to learn!



Hey Scotty...? How did you learn all that you know? Are there any specific books or lessons that you would recommend...? I'm so in love with Flash I would love love love love love to master ActionScript!



Devin

lunatic
September 2nd, 2004, 07:31 PM
A limited amount of stuff is available. As for your previous request, you'll learn a lot by downloading the latest version of the gallery on this site and tweaking it to meet your needs. A lot of us are working on versions of this monster and can try to help you figure out your own needs as they arise.

http://www.podlob.com/download/

:hr:

p.s. Scotty was born with a big brain already full of AS. He didn't have to learn a thing. ;)

rus
September 9th, 2004, 12:56 AM
Hallo everyone. Your resizing gallery is so cool. I saw the gallery on http://www.interior-solutions.com (http://www.interior-solutions.com/) I like the way the picture moving in right and left. And I like that the pictures opens in pop up window, and it is closing picture when you click on it. And somehow when the picture is open all site that on back of the picture is turning dark. Does anyone know how to this??? It is going to be so cool to know that.

Best regards.

imported_reeseeziggazagg
September 14th, 2004, 05:49 PM
Just had to say THANK YOU.
Scotty you're off the hook. You've helped so much.
Reesee
www.ziggazaggaproductions.com (http://www.ziggazaggaproductions.com/)

ctmxxl
September 15th, 2004, 03:11 AM
resizeborder.swf in fullscreen not work good. why?

egoldy
September 17th, 2004, 05:02 AM
this thread is cool.


but please checkout this
http://www.detremmerie.be/

I have a question.how to load thumb-nails first .when thumb-nails loading and play.like
the effect of http://www.detremmerie.be/

nessie
September 17th, 2004, 04:25 PM
I´w made this http://www.mikaelnaslund.com/images/ and now i wonder how i make a different pic apper when clicking on a sub meny.Wish is a ordinary bottom on _root. :ne:


/m

FlashPlaya
September 17th, 2004, 06:29 PM
Nessie.

Love it... great work!!:thumb: I was trying also to have the menu at the bottom but got all confused?? Can you maybe post your fla to how you edit the menu?? That would be great!! :love:

nessie
September 22nd, 2004, 08:07 AM
Thanks FlashPlaya!

Put this code in you´r first frame code.

--------------------------------------------------------------------


galery._x = Math.round(this._x-this._width/2);
galery._y = Math.round(this._y+this._height/2+spacing/2+12);


-------------------------------------------------


/M

snaphappy
September 22nd, 2004, 11:27 AM
sweet work nessie, very slick and nice ideas for the menu.

Can you tell me your code for the 'info' button that displays the screen onrollover and hides it onrollout, I've been trying to get that to happen for ages!

Thanks

FlashPlaya
September 22nd, 2004, 02:41 PM
Hey Nessie,
:h: What file?? I am have so many of these files. I have no Idea which one. Thanks mang for helping me out with all this!!! :love:

mansour
September 22nd, 2004, 11:32 PM
some of the zips don't have the xml file attached
there's a tut here http://www.kirupa.com/developer/mx2004/xml_flash_photogallery.htm which helped me greatly....it interacts with the xml
now how can i apply this(great, insane, phenomenal, inspiring, timesaving...i could go on) resize effect to it, with that exact xml file.

if you have already answered this question, please direct me to the post or thread. your time is much appreciated

sotty your an "actionscript god" ;)

nessie
September 23rd, 2004, 10:00 AM
hope this helps !

mansour
September 23rd, 2004, 01:28 PM
thanx nessie, i'm having trouble with that though, all good though, i'll try and figure it out.

that aside, i think i've figured a way to do that "christopherknock menu"!
stand by ;)

raggario
September 24th, 2004, 01:11 AM
Hello all,

I was wondering if it's possible to use this script with .gif images? I can get it to work with .jpg images with names like wallpaper01.jpg and wallpaper02.jpg, but when I try to use .gif images it does not load anything..

It would be much better with .gif's because I am getting the image distortion on alpha tween using .jpg images...

Any help would be appreciated.

scotty
September 24th, 2004, 03:55 AM
Welcome to kirupa forums=)

You can't load .gif's dynamically...

scotty(-:

nessie
September 24th, 2004, 06:44 AM
"christopherknock menu" ??

nessie
September 24th, 2004, 06:49 AM
titel.onrollOver= function(){
_root.galery.desc_bg.gotoAndPlay(2);
_root.titel.gotoAndStop(2);
}

titel.onrollOut= function(){
_root.galery.desc_txt._visible = 0;
_root.galery.desc_bg.gotoAndPlay(11);
_root.titel.gotoAndStop(1);
}

raggario
September 24th, 2004, 12:15 PM
Thanks for the quick reply scotty, it's nice to see that you are still monitoring this thread! Nice thread 2, thanks for all the help you've been giving everyone - you're practically making everyone's website that visits and uses this discussion!

When I use the original code you've supplied without the alpha effect I have no problems with image distortion on my jpg's, however if do use the alpha effect then my images shift when they load into place.. It looks bad when they do that..

I will most likely be sticking with the original code when I decide to use this effect.

Thanks again for all the help.

raga-

Casenote
September 26th, 2004, 06:31 PM
Hey all,

This project is great! :rock:

I do have some questions:

I'm trying to load the Thumbs dynamically with XML!, and can't figure it out.

I would also like to limit the Thumbs width (by that I mean how far they will go) I would like to seperate them into rows.

If anyone could help that would be great (scotty hint..hint) :eye:

Thanks,

Case :bu:

3rdeye
September 28th, 2004, 10:34 PM
and the thread keeps going... for the life of me I can't stop the image from flickering... it seems that on the first frame of the resize me function... everything evaluates to true... and makes my image 100% visible... then on consecutive passes, the it's false, resizes the border and displays my image... the flicker is acceptable on relatively the same size image, but on different ratios the flicker is REALLY apparent... any ideas? here's my code:


MovieClip.prototype.loadPic = function(pic) {
cur = pic;
this._alpha = 0;
this.loadMovie("images/db/body/"+imgLoc[pic]);
this._parent.onEnterFrame = function() {
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
if (t != 0 && Math.round(l/t) == 1 && containerMC._width>0 && containerMC._height>0) {
var w = containerMC._width+spacing, h = containerMC._height+spacing;
//everything below is to control the maximum image size
imgWidth = containerMC._width;
imgHeight = containerMC._height;
if (imgWidth<imgHeight) {
imgRatio = imgWidth/imgHeight;
containerMC._width = imageSize*imgRatio;
containerMC._height = imageSize;
} else if (imgWidth>imgHeight) {
imgRatio = imgHeight/imgWidth;
containerMC._width = imageSize;
containerMC._height = imageSize*imgRatio;
} else if (imgWidth == imgHeight) {
containerMC._width = imageSize;
containerMC._height = imageSize;
}
border.resizeMe(w, h, pic);
delete this._parent.onEnterFrame;
}
};
};
MovieClip.prototype.resizeMe = function(w, h, pic) {
var speed = 3;
this.onEnterFrame = function() {
containerMC._alpha = 0; // had to put this in to stop it from displaying straight off
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
//nav._x = Math.round(this._x-this._width/2); Don't use a nav bar
//nav._y = Math.round(this._y+this._height/2+spacing/2);
prevb._x = this._x-this._width/2-5;
nextb._x = this._x+this._width/2+5;
nextb._y = prevb._y=this._y-5;
imageText._y = this._y+this._height/2+5;
imageText._x = border._x-picinfo._width/2;
photo._y = this._y-this._height/2;
photo._x = this._x-this._width/2+5;
photo.photoID.text = imgPG[pic];//little drop shadow effect
photo.photoID1.text = imgPG[pic];//little drop shadow effect
imageText.text = imgCap[pic];
if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) {
this._width = w;
this._height = h;
containerMC._x = this._x-this._width/2+spacing/2;
containerMC._y = this._y-this._height/2+spacing/2;
containerMC._alpha = 100;
delete this.onEnterFrame;
}
};
};

EDIT: Anyone interested in my solution... I just got rid of the _parent in the first delete onEnterFrame. Don't remove the first _parent, which creates the onEnterFrame, just in the "delete" ;) don't ask me why this works, but now everything is a-ok

original:

}
border.resizeMe(w, h, pic);
delete this._parent.onEnterFrame;
}

Fixed:


}
border.resizeMe(w, h, pic);
delete this.onEnterFrame;
}

3rdeye
September 30th, 2004, 03:58 AM
bump?

synkop
October 15th, 2004, 05:13 AM
Hi everyone in this terrific thread! I started to bulid a photo portfolio using material I got from this thread some months ago. (Special thanks to Scotty!) It´s cool to see that it keeps going on! I thought I´d share my finished site with you folks. Just as an example of what you could do with it. Have a look at http://photo.synkop.se .

3rdeye
October 15th, 2004, 01:20 PM
Hi everyone in this terrific thread! I started to bulid a photo portfolio using material I got from this thread some months ago. (Special thanks to Scotty!) It´s cool to see that it keeps going on! I thought I´d share my finished site with you folks. Just as an example of what you could do with it. Have a look at http://photo.synkop.se .

ummm... your preloader is twitchy... works every-so-often, usually displays Nan

sticmann
October 16th, 2004, 02:08 PM
Is there anyway to dynamically change the size of the thumbHolder["box"+i] (it does not need to animate I just want it to be the size of the thumbnail) or for the thumbnail to be centered in the box? My thumbnails are all either 60/40 or 40/60 and I'm having trouble getting the width/height of each thumbnail. One idea I had was to get the width/height and then use the container._x/_y to position it, but when I did that it moved the whole box outside the scroll track (and it didn't get the width/height).


I Got It!
if anyone is interested, I put this code on the container clip:

onClipEvent (load) {
this.onEnterFrame = function() {
l = getBytesLoaded();
t = getBytesTotal();
if (l == t) {
this._x = (60-this._width)/2;
this._y = (60-this._height)/2;
delete this.onEnterFrame;
}
};
}


Any help would be greatly appreciated.
-Joshua

synkop
October 17th, 2004, 06:34 AM
ummm... your preloader is twitchy... works every-so-often, usually displays Nan

Hmm... thats not good. Do you meen that the loading doesnt start at all and that i just get stuck in the "Nan" state?
I´ve experienced that it sometimes (depending on what browser you use, strangley enough) shows "Nan" for some 10s of a second before it starts loading, but that is no problem in my opinion.

scotty
October 17th, 2004, 10:34 AM
It works for me, you can get rid of the Nan by putting an if statement for your loader text, something like:

if(loader.text!=NaN){
loader.text = percent;//or whatever you have here
}

scotty(-:

afxtwn
October 19th, 2004, 12:02 PM
I've got a photo album which i made by editing elements of the resizing slideshow, and the photo album thread. i have a problem with ghosting which occurs as the border resizes - a feint box appears the same size as the jpg that is being loaded.

I've put my source files in this thread - http://www.kirupaforum.com/forums/showthread.php?t=73450

I'd appreciate it if someone could have a look at the fla to see if they can find anything wrong, as i'm tearing my hair out!

Thanks

3rdeye
October 19th, 2004, 04:41 PM
I've got a photo album which i made by editing elements of the resizing slideshow, and the photo album thread. i have a problem with ghosting which occurs as the border resizes - a feint box appears the same size as the jpg that is being loaded.

I've put my source files in this thread - http://www.kirupaforum.com/forums/showthread.php?t=73450

I'd appreciate it if someone could have a look at the fla to see if they can find anything wrong, as i'm tearing my hair out!

Thanks
see my edit above or check your thread ;)

afxtwn
October 19th, 2004, 06:18 PM
er - i cant see the edit your talking about, an my thread still only has the post i put there?

EDIT: I think i see your edit - with the extra containerMC._alpha = 0 , but i still get the same problem. However, i substitued that alpah for - containerMC._visible = false; and added a containerMC._visible = true; a bit later in the script and that seemed to work. I still get a slight ghost - although its only onscreen for about 5ms, so i dont care. It works enough for me :)

nessie
October 20th, 2004, 01:31 PM
Hi !

I wounder if ther is any one ther how knows way it makes a shadow when you load a .swf and do you have to publich the flash file as a flash player 7 to make the .swf to work.????????



/M :q:

halfwired
October 22nd, 2004, 05:10 AM
again? please be specific, can't seem to understand what you're trying to say...

nessie
October 22nd, 2004, 05:44 AM
hi halfwired!

I´m sorry! here is my files and it might bee ecyer to understand. I want to make the text file be able to scroll the text and i want it not to make a shadow while resizing.the text is visible to early.


/M

imanstudios
October 23rd, 2004, 05:31 AM
Nice work guy,
Does this work with .gif also or only jpg. When we are trying to add this to our own movie what has to be on the screen in order for it to work.
Container
border
the script on the frame
script for buttons...thats it right....
I was having some problems customizing it to make an album. All images are in one location. I dont know. Nothing happens

neilmerton
October 25th, 2004, 08:21 AM
see: http://www.kirupaforum.com/forums/showpost.php?p=635650&postcount=452

scotty
October 25th, 2004, 08:58 AM
@nessie, two things:
1) in the loadPic function you have

delete this._parent.onEnterFrame
change that in

delete this.onEnterFrame

2) embed the font in your home.fla, then the text will fade in as well;)

scotty(-:

imanstudios
October 25th, 2004, 04:26 PM
umm...thanks...
:))

mansour
October 26th, 2004, 05:14 AM
Hi everyone in this terrific thread! I started to bulid a photo portfolio using material I got from this thread some months ago. (Special thanks to Scotty!) It´s cool to see that it keeps going on! I thought I´d share my finished site with you folks. Just as an example of what you could do with it. Have a look at http://photo.synkop.se (http://photo.synkop.se/) .
What you have my friend, is what i was trying to achive all along.

No thumbnails, and simple navigation <next, prev>. and details.

Senocular's Tutorial + Resize, and thats it.

I've tried to achive it. But here everyone is using a different xml file than the senocular gave on his tutorial.

Basicly how in the world can i add all those things together.

I would appreciate all the help you can give me guys!

neilmerton
October 26th, 2004, 05:22 AM
i agree, it's a lovely looking portfolio which works great if all the images are the same size. and the loader for each image is tops :D

scotty
October 26th, 2004, 10:23 AM
Copy the loadPic and resizeMe prototypes and add these to Sen's code.
In the loadPic function change

this.loadMovie(pArray[pic]);
in

this.loadMovie(pic);

In Sen's code look for these lines:

currentThumb_mc.onRelease = function(){
image_mc.loadMovie(this.image);
description_lv.load(this.description);
}
change here

image_mc.loadMovie(this.image);
in

image_mc.loadPic(this.image);
and it'll work;)

scotty(-:

nessie
October 26th, 2004, 12:04 PM
Thanks scotty!

It works fine but i do not know how to embed a text could you pleace help me whith a .fla :hugegrin:


/M

scotty
October 26th, 2004, 02:26 PM
Select your textfield, in the properties window click on the "character" button and choos one of the options, that's all:)

scotty(-:

Gupps
October 26th, 2004, 07:45 PM
which senoculars's tut are you guys referring to. can you post a link.

scotty
October 27th, 2004, 04:02 AM
http://www.kirupa.com/web/xml/examples/portfolio.htm

scotty(-:

d3020
October 31st, 2004, 01:07 AM
Scotty or anyone else,

Attached is a little something I'm working on. Can you show me how I would do something...

1. Instead of the little green boxes I want to have thumbnails that I can go through. Similar to this site... http://www.carldekeyzer.com/

I understand I would have to make the section where the green boxes currently are a little bigger, but that's no problem.

Thanks for the help.

scotty
October 31st, 2004, 05:48 AM
That looks familiar...

scotty(-:

d3020
October 31st, 2004, 09:01 AM
Scotty,

You know its been sometime since I've posted here. I was thinking you may have helped with this in the past. Is it clear what I'm asking about the thumbnails? I think the carl site is a good example of what I would like to do. I would appreciate any help you could give.

I'm not sure if you have already done an example here where it has seperate named sections and where it retrieves the thumbnails. If not, I think the zip file I attached before will help to get started.

jive
October 31st, 2004, 10:29 PM
Hello,

I'm trying to use the podlobs resize border fade picture gallery and I'm having problems adding additional photos. can someone tell me what I'm doing wrong??

please download the fla here:

http://www.z1p.net/flash/V2_resizebordergallery.zip (http://www.zerooneproductions.net/flash/V2_resizebordergallery.zip)

oilcontrol
November 1st, 2004, 11:46 AM
Greetings,

In need of some help.

I've been following this thread on and off for the past few months and have been downloading the zip files for leisure learning, it helps greatly. However, I lost all my datas after a hard disk crashed recently, I can't retrieve the zip files I've downloaded.

I'm currently at the learning stage of having the border and buttons resized dynamically together. I'm trying to learn a similar effect on http://www.twinphotographie.com, I remember someone have uploaded a complete version with the buttons residing in a fixed position within the resized border.

I'm lost in going over from thread one to the last thread, I can't find the zipped files I'm looking for. Can someone kindly point me to the thread where I can download this complete version or can you do an upload here if you've been following this thread and have created it or downloaded it?

Thanks for the help everyone. Hope to hear from you soon.

Best Regards,
Feline

Eli
November 2nd, 2004, 04:17 PM
Hey you guys. I have been reading this thread for a while now, and must say Kudos to all you guys and gals. Especially Cello, and Scotty. I downloaded the fla for the easing scroll bar/window and can not seem to get the linkages working right. Or maybe it is the path??


BTW I know that I should have used mc's instead of btn's but it is too late now.

Below is the fla.

gallery.fla (http://www.havelockramsreunion.net/1994/gallery.fla)

I have decided to forego this endeavor simply because what I need can already be found HEREREHREHREHRHERE (http://www.kirupaforum.com/forums/showthread.php?t=52290)

But seriously. Thank everyone sooooooo much. :pope:

neilpan
November 2nd, 2004, 05:53 PM
Wow, this is a nice thread. I small question for all the MASTERS invovled in this thread.



button_1.onRelease = function () {
if (containerMC._alpha<1) {
containerMC.loadPic(cur-1);
} else {
containerMC._alpha -= 5;
};
}

My question is that , the event " containerMC._alpha -=5; " occurs just 1 time when I press the button_1. So in order to decrease the alpha (value of 5), i need to press button again and again. How can I repeat the else condition again and again until the _alpha<1 [see the code above] ?

Please tell me , if you need the whole fla...

Another stupid question from me :D

icio
November 2nd, 2004, 06:12 PM
prevb.onRelease = function() {
if (cur == 0) {
containerMC.loadPic(pArray.length-1);
} else {
button_1.onRelease = function () {
this.onEnterFrame = function() {
if (containerMC._alpha<1) {
containerMC.loadPic(cur-1);
delete this.onEnterFrame;
} else {
containerMC._alpha -= 5;
}
}
};
}
}

hope this helps, maan :thumb:

neilpan
November 2nd, 2004, 07:58 PM
Thanks dude, it works .... awesome ....

oilcontrol
November 2nd, 2004, 11:59 PM
I managed to rammaged through the thread and found the zipped files I need. Managed to get things work but I've a few questions here.

1) I added one border movie clip to the main time line but I simply can't get two borders to resize dynamically. The effect I want to create is..

- When border A is clicked, it expands while border B contracts. vice versa.
Tried to work with the code of the zipped files but to no avail.
What are the steps I need to do and what are the Maths conditions for it to work?

Grateful for any input. Thanks!

Neil
November 3rd, 2004, 12:09 AM
Well , take a look at this :

http://www.arrfans.com/gallery/V3.html

I mainipulated a little bit and tweaked some math stuff :D

oilcontrol
November 3rd, 2004, 12:17 AM
This is something I meant in my earlier post. http://www.kurtnoble.com/

Anyone can help? I got one done but I've problem incorporating the codes for another border to resize dynamically with the first border MC I have.

Thanks!

oilcontrol
November 5th, 2004, 06:46 AM
Hi all,

Following this tutorial and managed to get it so far. There are a few things which I still unable to get it done.

After some twisting of the code, I manage to create the effect I want. However, I'm stuck at this stage...

Instead of pictures, I want to call out an external swf. with a new series of photos and I want the border to resize dynamicaly according to the new external swf as the images loaded dynamically.

How do I twist the code to fit this in? How do I go about doing it?

Thanks for any input in advance.

oilcontrol
November 5th, 2004, 06:49 AM
In case I sound confusing in the previous post, I meant

when clicked on one button, it loads New.swf
This New.swf have a series of images loaded with different size and height.
I want the border to resize itself dynamically to the images loaded in this New.swf instead of capturing only the width and height of the New.swf.

Hope it makes some sense.

Thanks again.