A Flash Developer Resource Site

Results 1 to 18 of 18

Thread: dissolve fade out/in. Not your average fade

  1. #1
    Member
    Join Date
    Oct 2002
    Location
    England
    Posts
    80

    dissolve fade out/in. Not your average fade

    Does anyone know how I can get this disolve effect with a photo.
    Here is an example.
    dissolve effect
    When you click through each photo they dissolve up on the screen

  2. #2
    Beyond the Sea
    Join Date
    Mar 2000
    Posts
    997
    you're talking about that sort of "burn in" effect, correct?

    Well, you can either do it by hand with a tween or with actionscript.

    In a tween, click on your movieclip, go to the "color" drop-down and choose advanced. then click on the setttings button that appears. In the fields, put:
    100 255
    100 255
    100 255
    100 0

    and click ok. Now, tween the movieclip on the main timeline to a keyframe with Color: None.


    Now, to do this with actionscript, you must learn the color object and how it works with a color transform object. I'll give you this example, but you can read up on the color object in the help files for more information on how and why this all works.

    myTarget = junk;

    myTransform = {ra:100,rb:255,ga:100,gb:255,ba:100,bb:255,aa:100, ab:0};

    myColor = new Color(myTarget);

    myColor.setTransform(myTransform);

    howMuchtoSubtract = 10;
    nextStep = 255;

    this.onEnterFrame = function() {
    nextStep -= howMuchtoSubtract;
    if (nextStep <= 0) {
    delete this.onEnterFrame;
    }
    myTransform = {ra:100,rb:nextStep,ga:100,gb:nextStep,ba:100,bb:n extStep,aa:100,ab:0};
    myColor.setTransform(myTransform);
    }
    The Coolest Website EVER!
    Do you live in Kansas City? Come join us at KCWebCore

  3. #3
    Misery Chick Nightwind's Avatar
    Join Date
    Nov 2000
    Location
    Baltimore, MD
    Posts
    97

    Color burn effect

    I just came across these instructions...looking on how to do the exact same effect.

    I tried the first, easy, steps. And I cant get the tween to work.


    And the second steps, I dont know just where that code is supposed to go. Is it all on one frame, or some for the MC?

  4. #4
    Misery Chick Nightwind's Avatar
    Join Date
    Nov 2000
    Location
    Baltimore, MD
    Posts
    97

    I got it

    It worked at the last part "Color: Alpha 100%"

  5. #5
    Member
    Join Date
    Jun 2001
    Location
    Netherlands
    Posts
    38
    I have the same problem Nightwind had in the beginning. I havn't done much with colors coding in actionscript. I would like this to work!

    So from the last reply I understand the code must be placed on a MC. I presume that in this example the MC must be named "junk". And a picture in the MC? And than what? and what else inside the MC?

    Erik

  6. #6
    Beyond the Sea
    Join Date
    Mar 2000
    Posts
    997
    holy cow! Sorry to leave you hanging like that! I just barely changed over my e-mail on this site to one I'll check more frequently so this won't happen again.

    did you get it working? do you still need help?

    What I've found to be the best solution is to use Zeh's Tween prototype which you can find here:
    http://proto.layer51.com/d.aspx?f=804

    or from his official site (where you can download a convenient .mxp):
    http://hosted.zeh.com.br/mctween/

    you can also go here for a small sample file from me:
    http://www.richpaul.com/flash/photo_burn_zeh.html

    hope that helps...
    The Coolest Website EVER!
    Do you live in Kansas City? Come join us at KCWebCore

  7. #7
    Member
    Join Date
    Jun 2001
    Location
    Netherlands
    Posts
    38

    thanx

    thanx a bunch,

    that will sure help a lot!

    bye bye
    Erik

  8. #8
    Member
    Join Date
    Jun 2001
    Location
    Netherlands
    Posts
    38
    Kraken,

    In your zipfile I don't see the file: mc_tween2.as
    But in photo_burn_zeh.fla I see the following include function:
    #include "mc_tween2.as"

    I need that file too, right?
    I hope you can add it to the zipfile.

    bye EJ

  9. #9
    Beyond the Sea
    Join Date
    Mar 2000
    Posts
    997
    go to his site and download the .mxp It's the easiest way to install it in the correct folder and it even adds code hints to the Reference pane inside Flash. If you don't have the extension manager, head to macromedia's site:
    http://www.macromedia.com/exchange/em_download/

    here's a direct link to the .mxp:
    http://hosted.zeh.com.br/mctween/dow...en_2_23_26.mxp
    The Coolest Website EVER!
    Do you live in Kansas City? Come join us at KCWebCore

  10. #10
    Member
    Join Date
    Jun 2001
    Location
    Netherlands
    Posts
    38
    Alright alright,

    Now it works just right!

    First time I 'worked' with extensions.

    What other nice features can be added through extensions?
    Any other suggestions?

    EJ

  11. #11
    Beyond the Sea
    Join Date
    Mar 2000
    Posts
    997
    Yeah, check out the macromedia exchange.
    http://www.macromedia.com/cfusion/exchange/index.cfm
    There are some nice ones in there, but many of them are also for sale, not free.

    Also, poke around that proto.layer51.com site. There are some nice things that people have whipped up that are basically extensions to existing flash objects and classes that make life easier...
    The Coolest Website EVER!
    Do you live in Kansas City? Come join us at KCWebCore

  12. #12
    Quote Originally Posted by Kraken
    you can also go here for a small sample file from me:
    http://www.richpaul.com/flash/photo_burn_zeh.html
    can you adjust the speed of the transition burn and make it backwards (meaning to white)?

    Thanks
    Last edited by dichiee; 09-23-2005 at 01:04 PM.
    dichiee
    rainedesigns.com

  13. #13
    Beyond the Sea
    Join Date
    Mar 2000
    Posts
    997
    of course.
    have a look at the documentation on zeh's site to understand what you need to pass the tween function. In the colorTransformTo function, you pass the time (in seconds) as the 9th argument when calling the function. So, if you wanted to make a movieclip called "my_mc" transform from plain to white in one second, you would write something like this:
    my_mc.colorTransformTo(100,255,100,255,100,255,100 ,0,1);

    this is all after you've installed the most current .mxp and used #include to put his prototype into your movie.
    The Coolest Website EVER!
    Do you live in Kansas City? Come join us at KCWebCore

  14. #14
    Thanks the timing works but I can't figure out the backwards... picture burn to white

    help me please
    dichiee
    rainedesigns.com

  15. #15
    Beyond the Sea
    Join Date
    Mar 2000
    Posts
    997
    did you put in my code that I wrote above? what happened? post up your code. what are you trying to do?
    The Coolest Website EVER!
    Do you live in Kansas City? Come join us at KCWebCore

  16. #16
    I'm trying to do this kind of effect for pictures galleries

    http://www.templatehelp.com/aff/prev...tes.php&i=9205

    I'm using the sample you did (http://www.richpaul.com/flash/photo_burn_zeh.html) with the code you gave earlier

    //if you have a photo in your library, you
    //could attach it here.
    //root.attachMovie("myPhoto","myP",10);

    //set up the default color transform of white:
    myWhite = {ra:100,rb:255,ga:100,gb:255,ba:100,bb:255,aa:100, ab:0};

    //create the default color object, pointing
    //to your photo MC.
    myC = new Color(myP);

    //transform your MC to white.
    myC.setTransform(myWhite);

    //now, using the tween function "colorTransformTo"
    //make it fade to normal over 3 seconds.
    myP.colorTransformTo(100,255,100,255,100,255,100 ,0,1);

    stop();
    dichiee
    rainedesigns.com

  17. #17
    Beyond the Sea
    Join Date
    Mar 2000
    Posts
    997
    yeah, so you see where I did myC.setTransform(myWhite) ?
    well, that sets the movieclip to white instantly. You want to use that before you transform from white to normal. If you don't want it to transform from white, you don't need to set that transform initially, so leave that part out.

    Read the documentation here:
    http://hosted.zeh.com.br/mctween/documentation.html

    that will explain each of the methods to zeh's tweening prototypes. Play around with them. Look up functions you don't understand (like setTransform) in the dictionary. You'll get it.
    The Coolest Website EVER!
    Do you live in Kansas City? Come join us at KCWebCore

  18. #18
    there you go! hehe thanks so much you rock now I need to figure out to run this with multiple images
    dichiee
    rainedesigns.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center