PDA

View Full Version : image rotation help please


Neptunz
06-11-2004, 09:27 AM
How goes it, people?! This is my first thread. I'm a graphic designer excited about web design, but new to action scripting... especially as2.0. I'm trying to create a homepage for a site that has a rectangular section that changes images(jpg) every so often.

This is the site inprogress http://www.rsmcentral.com. Please don't mind the design part of it because there's only so much the client will allow.

I did a search for this effect and I found this
http://www.actionscript.org/forums/showthread.php3?s=&threadid=28124&highlight=load+jpg

I tried freddycodes' joint, but it didn't work. Maybe it's beacuse I applied it wrong or maybe it's because it's old and it doesn't work with AS2.

Also, would the script be same for a changing movie clip?
Can somebody PLEASE help me out?

Thanks in advanced... you guys are mad talented.
Kauê

I'll finish this one day...
http://www.stainlessstudiosinc.com

Ruben
06-12-2004, 08:00 AM
The second url turned up an error404 so I don't know what effect your talking about, if you correct it I'll have a look...

;) - Ruben

Neptunz
06-14-2004, 08:41 AM
Thanks for taking the time, Ruben. I fixed the middle link.
Kauê

Ruben
06-14-2004, 12:36 PM
Apparently you didn't, does this seem like something else but a error404 to you:

http://www.actionscript.org/forums/...hlight=load+jpg

:confused: - Ruben

Neptunz
06-16-2004, 11:35 AM
You were right. I changed it again and it works... I checked.

Sorry. Don't get pissed I need help with this.

Thanks, Ruben

Here it is again
http://www.actionscript.org/forums/showthread.php3?s=&threadid=28124&highlight=load+jpg
(it looks the same, but it works.)

Ruben
06-16-2004, 01:49 PM
Hahaha, no I'm not pissed at you or anything, were would you get that idea? ;)

Anyways, so you want images fading in, being visible for a couple of secs, fading out, and then all over again, one by one, and each image appearing on a predefined position???

Answer "yes" if the above is correct, else answer "HELL FREAKIN NO!!!"

:rolleyes: - Ruben

Neptunz
06-16-2004, 08:41 PM
I'll take "HELL YEAH!" FOR $500.
Exactly.
Kauê

Ruben
06-17-2004, 10:33 AM
Aaahh, for $500 I'll do anything ;)

Does each image have to appear on a position belonging to that specific image or will the position randomly be picked from a list of positions??

Also, do you want the first image to be img1, and the second image img2, etc? Or does it have to be picked randomly??

:) - Ruben

PS. Just got a phonecall that I graduated from highschool!!! :eek:

Neptunz
06-17-2004, 10:54 AM
You know all this $#!+ and you're in high school? Holy crap. Congratulations!! :cool:
Yes, the images will fade in in the same position. I never thought about having it random. Random sounds good or the img1, img2 method. Which ever one works.

Thanks again.

Ruben
06-17-2004, 11:01 AM
Thanks alot, since this is kinda a non-sucky day I'll make you a quick sample

:rolleyes: - Ruben

praufet
06-17-2004, 11:16 AM
I'm more suprised that they called you. They way you phrased it made it sound like you won a competition or something;)

Neptunz
06-17-2004, 11:50 AM
HOLY CRAP!! A QUICK SAMPLE? Ssswwweeeeeettt! :eek:

Thanks, man. I'll be waiting. :D

Ruben
06-17-2004, 12:37 PM
I'm more suprised that they called you. They way you phrased it made it sound like you won a competition or something;)

Ehm...dunno how things go where you live, but in Holland every student gets a phonecall on a certain day and hour from a teacher telling you if you passed or failed...dunno why you are so surprised, actually it's better then winning a competition, I'm finally released from the sucky school I went to for 5 years :rolleyes:

HOLY CRAP!! A QUICK SAMPLE? Ssswwweeeeeettt!

Thanks, man. I'll be waiting.

Sorry for the waiting dude, just after I pressed the submit-button my dad screamed something about supper being ready, so I'll start making the sample right now...

:) - Ruben

praufet
06-17-2004, 01:06 PM
school's defiantely not that way here in the states

Ruben
06-17-2004, 01:37 PM
Here you go Neptunz, all of the explanation's inside of the movie...go and check out the attachement...

:) - Ruben

Neptunz
06-17-2004, 02:24 PM
Sweet deal, my friend. I will take a quick look at it while I'm here at work and I will go all out with it when I get home. I'll let you know how it goes. That was pretty fast. I don't know how well you are doing there in the Netherlands, but I'm sure you could find good work here in the U.S.

Thanks, man.
Kauê - :D

Ruben
06-17-2004, 02:30 PM
Hmm, well Holland is kinda overloaded with webdesigners and stuff, so it's hard to find work, haven't really tried to find work yet...dunno if I'd have a better change in the States...anyways, I've only been 17 years old for a couple of weeks now, so don't think I'll be living in the States in the near future :p

Besides, if I would I don't think my girl would appreciate me leaving, neither would I, and as a third factor there's the multimediadesign-training I'll be doing for the coming 5 years...

But you never know :rolleyes: - Ruben

PS. Or did you just make me an offer? ;)

Neptunz
06-18-2004, 09:04 AM
Hey, Ruben! That's what I'm talking about. I didn't get a chance do my own thing with it yet, but I checked your sample out. Can we set it to where the images pop up in a specific position?... maybe with specific xy coordinates? I noticed that with it picking random pictures sometimes the same picture shows up 3 times in a row. Is it easy to set up for img1 then img2 then img3...instead of random pics?

I'm extremely greatful for your help, Ruben. Being as I'm not advanced with AS I can't quite read the script and change as I please like you and most of these people on this site... even though it seems like all I'd need to change is just a few things. Respond to this when you get some time... no big rush. I'm glad you took the time to help me out.

I wish I could make you an offer. My company is in the beginning stages. Maybe at some point I can commission you to do some work. ;)

Kauê

Neptunz
06-18-2004, 11:04 AM
Never mind on the position issue, Ruben. I noticed the ( _parent._x = 50;
_parent._y = 50; ). So if all of my images are the same size and I set the xy the same for all of them they show up in the exact same spot. See, I'm getting there.

Did I mention this is tight!? :D That's slang for cool or awesome or sweet in the States.

Kauê :D :D

Ruben
06-19-2004, 10:12 AM
Never mind on the position issue, Ruben. I noticed the ( _parent._x = 50;
_parent._y = 50; ). So if all of my images are the same size and I set the xy the same for all of them they show up in the exact same spot. See, I'm getting there.

Did I mention this is tight!? :D That's slang for cool or awesome or sweet in the States.

Kauê :D :D

Hehehehe, well thanks for the compliment, I remembered 'tight' from Scary Movie 2 where this bimbo punches some girl in the face begins shouting at her "Yo! That jacket is TIGHT girl, ya'na what I meeeeean!?"...:p

Anyways, you're correct about the positioning-part... In fact: If you'd delete frame 2, 3 and 4 on the script-layer then the image just stays on the same position all over the time...

Regarding the random-thingie, if you can find these two lines of script inside of the effectClip:
// if the doRandom-variable has been set to true then pick a random image
imgClip.gotoAndStop(Math.round(Math.random()*(imgA mount-1))+1);
and replace it by these lines:
// if the doRandom-variable has been set to true then pick a random image
for (c=0;c<50;c++){
someRandom=Math.round(Math.random()*(imgAmount-1))+1;
if (someRandom != imgClip._currentframe){
c = 50;
}
}
imgClip.gotoAndStop(someRandom);
then I guess you'll be fine and it shouldn't happen again...

You know you can switch between random and sequence by setting changing the value of doRandom right?
doRandom = true; // this means that the images are picked randomly
doRandom = false; // this means that the images are NOT picked randomly
Simple as that :p

Tell me if you're still having trouble with the movie :) - Ruben

Neptunz
06-19-2004, 07:54 PM
That sounds about right. I knew it had to be easy, but I didn't know it was that literal and that easy. I'm going to test it out and do one myself soon. I will drop you an email and let you know how it went with a sample.

I checked your site out.... TIGHT work! :D

Thanks for coming through. Big ups to you, Ruben.
Kauê

Ruben
06-20-2004, 02:28 PM
That sounds about right. I knew it had to be easy, but I didn't know it was that literal and that easy. I'm going to test it out and do one myself soon. I will drop you an email and let you know how it went with a sample.

I checked your site out.... TIGHT work! :D

Thanks for coming through. Big ups to you, Ruben.
Kauê

Thanks for the compliment, we're working on the new version of the site, so keep visiting ;)

About the email: I'd like that, thanks

:) - Ruben