Skip to main content
Inspiring
April 9, 2007
Question

how to setup a Desaturation Tween

  • April 9, 2007
  • 48 replies
  • 4046 views
Hi just a quick question, i have a function to swap depths and tween the _alpha property of some movie clips, ---=> Thanx kglad <=--- but i was wondering if theres a way to change the color property without filters??
im especially interested in the Saturation / De-Saturation for this idea i have.

or do i need to use import flash.filters to do this?

if this is the only way, i dont think it will be worth it, unless creating a function for it is simple.

Thanx in advance.
This topic has been closed for replies.

48 replies

SketchstaAuthor
Inspiring
April 30, 2007
Hey dude, sorry for the late reply.. I been hell busy lately.

Thanx for all your help, you really saved me a whole lot of time. MUCH APPRECIATED
I got it all to work just fine, even the loading of each image.
Only thing that is abit off is, while it's loading, it displays NaN% or stops on a loaded number if the mouse doesnt move.
But everyone moves their mouse all over the place, so i hope no one notices. =)

anyway, it works thats all that matters.
Thanx dude.
kglad
Community Expert
Community Expert
April 16, 2007
that looks ok.
kglad
Community Expert
Community Expert
April 15, 2007
there's thread starting about exactly this issue. it involves using an _alpha transition to fade out a previously loaded swf while the current loaded fades in.
SketchstaAuthor
Inspiring
April 15, 2007
hey kglad, yeah i just saw the post. Thanx

right now im just trying to get this preloader to work for the Thumbs aswell. I made this code, and it seems to be working fine for the images...but im having problems getting it to work for the Thumbs when they load.
My boss is angry with me, so im not worried about any transitions anymore right now...I just want to finish this, and get him off my back.

then learn transitions.
This is my first loadMovie() preloader, and its working without a listener...I always thought to have a preloader you NEED a listener..
i guess i have to put one in when i worry about transitions.
Here it is now, with the loader.

and this is the code im using, let me know if theres anything wrong or if anything could be better... thanx.
kglad
Community Expert
Community Expert
April 14, 2007
the xml doesn't have anything to do with the preloader your going to make. you're just getting the data about the image names etc from the xml file.

in your released() function you're loading the large images. it's after you execute the loadMovie() in release that you'll start your preloader looping to check the load progress of the large images. when a large image has completed loading you can start your transition from the previously loaded large image (if there was one) to the current large image.

in order to have a smooth transition effect you'll need to alternate between two target movieclips. one that will contain the previously loaded large image and one that will contain the current one.
SketchstaAuthor
Inspiring
April 14, 2007
ok maybe i gave myself abit too much credit...i dont think i'll be able to do this without abit more help..

ive already tried something, but only just realised how wrong it is...so im not gonna show you due to more embarrasment ... =P

first off...i should mention that i dont know any preloader codes that use loadMovie() so i think i should learn that first..
second, i have no idea how to alternate between two movieClips like you said.
only way i can think of is to use if() statements...but even that, i dont know how to say..." whatever is there before. do this! "

im useless.... that much i do know... =)

SketchstaAuthor
Inspiring
April 14, 2007
ohh ok, yeah thats something i should remember.

ok, i've removed the onEnterFrame from the for loop, and replaced your initial setInterval() in the onLoad function outside the for loop.

( if theres anything else that needs changing, tell me, this is my first time working with XML, and my first time working on a code this in-depth )

so how doi set up a preloader, when using XML to load pics?
do i need to get the pic info from the XML itself, or can Flash read all the info while the pics are getting loaded?

give me just an " idea " of how it should work...i wanna see if i can atleast do this by myself.. =)
SketchstaAuthor
Inspiring
April 13, 2007
hmm... oops..

to tell you the truth, i was kinda only guessing.. I figured that initialiseF() was the one starting everything by setting up the hit area.

I havent done the out() and release() functions yet... i just wanted to get all the loading done first, so i added it to the over() function.

i'll change the initialiseF() and spinF() functions around.
and paste the new code after.
SketchstaAuthor
Inspiring
April 13, 2007
im preety slow at the moment, i havent slept yet..
but this is the only way i got it to work. I stopped your setInterval(), and placed it on a onEnterFrame() handler..

is that what you meant?

btw... i noticed just now, that theres a difference between calling a function like..

spinF();
and
spinF;

is that an importand difference? should i make a note to remember this?
kglad
Community Expert
Community Expert
April 13, 2007
spinF() will call the function one time when it is encountered. so, using

kglad
Community Expert
Community Expert
April 13, 2007
where's your released() function? that's the one that's loading the larger images and needs to use a preloader.

and what's in initializeF() that you need to call repeatedly? did you rename the spinF() to initializeF()?

the spinF() you will call repeatedly, but you only need one loop to do that.
SketchstaAuthor
Inspiring
April 13, 2007
You proud of me?? =P

yeah the hit area is out of wack there...but when i load that page into the template, the hit area is just on the front thumbs.
Thats what i was saying before, about the results of the math changing when i load it into another .swf
also, when i load it into the template swf, only the bottom part of the hit area responds... but who cares..you cant see the area anyway..

umm. im using loadMovie();
is that bad?
i'll paste the code in a fresh post..
SketchstaAuthor
Inspiring
April 13, 2007
Heres the xml loading bit..

kglad
Community Expert
Community Expert
April 13, 2007
you'll need the preloader to know when to initiate the transition function.
SketchstaAuthor
Inspiring
April 13, 2007
ooooooo yeahhh!!!

i got it working...i cant believe it... all the coffee and no sleep has paid off =)
with most of the thanx to you though..

anyway, heres where i've stopped because i dont know where and how to add a preloader to this now...

If i set up a preloader for [ obj ] that should preload all the pics coming in right??

anyway, heres what i have so far. I cant go on to making transitions for the images because, like you said, i need a preloader first.
If you wanna see your code now, let me know.

Here is the link
kglad
Community Expert
Community Expert
April 13, 2007
that looks good. you just need to lower that mouse hit area so it's over the carousel.

how you set up your preloader depends upon how you load your enlarged images. are you using loadMovie(), loadMovieNum() or loadClip()?
SketchstaAuthor
Inspiring
April 12, 2007
yeah thats the only way i know of doing it. But i think this Topic im looking for had some sort of function that, no matter what comes into a movieClip ( the holder ) it will play some transition before displaying the image..

but it may be like you said and it has a preloader with listener to trigger the effects.

It might be a good idea to have a preloader for each pic anyway, cuz i hate waiting for loading if it takes a long time...other people might feel like me too =)

is making a preloader the same if im loading from XML file?
never thought about that.

anyway, it's just about 4:30...Soccer is about to start. =P
stupid Live games have to play so early in the morning..

neway... Thanx for all your help today, and im sorry if im a pain ( cuz im such a newbie ) =P
I really appreciate you helping me out so much =)