Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

images gallery + slideshow 1

Status
Not open for further replies.

bubu

Programmer
Mar 3, 2002
463
RO
Hello guys!
I have made a project and i have a couple of problems...


<b>1.</b> rollover fast on the images...it will go fuzzy some times ... several images will remain large, and the movie will mess up...why is happening all this?...each button has onRollover and onRollout actions...but the Rollout doesn't work sometimes....when i Rollout very fast for e.g. ... this is a problem i had on many of my projects...a button with rollOver and rollOut actions...acting veird with the rollOut state...is there a fix for this?...i tried somtimes with an invisible button around my button...and changed the rollOut action on the button with an rollOver action on the invisible button....but it shouldn't be necessary to add that button...i don't understand why the rollOut action is acting weird sometimes...see it on this example.

actions for <b>rollOver</b>

on (rollOver) {
_level0.main.movie1.swapDepths(k);
gotoAndPlay(&quot;in&quot;);
_global.i=1;
//i is the number of the picture
var j;
var myvar;
for(j=1;j<=nrpictures;j++){
if (i != j) {
myvar=eval(&quot;_level0.main.movie&quot;+j);
myvar._alpha=40;
myvar.enabled=false;
}
}
}

actions for <b>rollOut</b>

on(rollOut){
gotoAndPlay(&quot;out&quot;);
_global.i=1;
//i is the number of the picture
var j;
var myvar;
for(j=1;j<=nrpictures;j++){
if (i != j) {
myvar=eval(&quot;_level0.main.movie&quot;+j);
myvar._alpha=100;
myvar.enabled=true;
}
}
}


<b>2.</b>I want now to make everything as optimized as possible...for the slideshow gallery i found a component that i can use...and just change the images outside the flash movie when i customize the gallery for somebody else...

...but i want to add a preloader to this gallery...similar to the one i have on my existing slideshow...how can i do this guys?...i need some assistance with this.

<b>3.</b> Do you think that i can do the gallery ... not the slideshow...like it is now ... with those animations for in and out...to generate automatically?...so i can change only thge images outside the flash movie....??? <b>i really need help on this</b>


Thank you all!

Regards,
Dragos.
 
You have a bit more control with hitTest when you're running events from multiple clips, in conjunction with a variable used to block other clips being expanded when one is already at full size you should get rid of most of the problems you're experiencing. Here's a really simple version:


Here's the code:

Code:
monitorClips = function () {
	for (var i = 1; i<=numClips; i++) {
		var clip = this['clip'+i];
		if (clip.hitTest(_xmouse, _ymouse, true) && !blocked) {
			clip._xscale += (clip._xscale<maxScale) ? 5 : 0;
			clip.swapDepths(100);
			blocked = true;
		}
		else {
			clip._xscale += (clip._xscale>minScale) ? -10 : 0;
			blocked = false;
		}
		clip._yscale = clip._xscale;
	}
};
maxScale = 150;
minScale = 100;
numClips = 3;
blocked = false;
this.onEnterFrame = monitorClips;
//
stop();
 
I'm at home right now wangbar...i will try all ths code tomorrow...but i'm sure that i will find a solution for my problem with your tips ;-)

I have anotehr problem with this movie that give me headics...i want to make a slideshow in which to change only the images outside the flash movie...and the text from a txt file or xml...i found that component(the link is above)...but the slideshow is slowing down when come to it's end...it is set to replay the slides but from the first run it is slowing down...what could be the problem?...my images have bigger size?...

And reading this component...i tried to add a preloader similar to the one that is already on the site right now...with that mask over the text...but i can't figured it out...in a way that really works...maybe you can show me the way...just a tip...

Thanks a lot wanbgar! tomorrow i will work on the movie and i will let you know what is the status...;-)

Regards,
Dragos.


 
Lots and lots of thanx wangbar...solved the problem...i will post the link later...i have 2 go now...tomorrow i guess...thanks a bunch!

Regards,
Dragos.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top