dcsimg
A Flash Developer Resource Site

Results 1 to 15 of 15

Thread: Probabally extremely easy, but im lost...

  1. #1
    King of the 2600
    Join Date
    Feb 2003
    Posts
    92

    Probabally extremely easy, but im lost...

    I'm looking to create an effect in my Flash movie, but I'm having trouble doing it. I have my background image, and in PhotoShop I cut out the head and made it a lighter color, now in Flash I want to have the bg there, and when you roll over the head, I want the lighter colored one I made in PhotoShop to fade in. Any help would be much appreciated.

    Thanks,
    Jeff

  2. #2
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    2 layers and alpha tweening (or AS "alpha tweens") on both layers.

  3. #3
    King of the 2600
    Join Date
    Feb 2003
    Posts
    92
    Thanks a ton. I just wish I understood that.

  4. #4
    I have an icon and U dont! johnwun's Avatar
    Join Date
    Nov 2000
    Location
    Santa Cruz, CA
    Posts
    258
    assuming you have a 'image1' and 'image2' MC's on the stage,
    try this:
    PHP Code:
    image2.onEnterFrame = function() {
        if (
    image2._alpha >= 100 or image2._alpha <= 0) {
            
    inc = -inc;
        }
        
    image2._alpha += inc;
        
    //trace(inc+" " +image2._alpha);
    };

    inc 5
    Attached Files Attached Files
    Last edited by johnwun; 03-12-2003 at 04:35 PM.
    [a.fun>b.fun ? trace("do(a)") : trace("do(b)");

    wundes.com

  5. #5
    King of the 2600
    Join Date
    Feb 2003
    Posts
    92
    I tried it but I'm doing something wrong I guess, is there a tutorial anywhere?

    Thanks again,
    Jeff

  6. #6
    I have an icon and U dont! johnwun's Avatar
    Join Date
    Nov 2000
    Location
    Santa Cruz, CA
    Posts
    258
    Did you download the attached fla?
    [a.fun>b.fun ? trace("do(a)") : trace("do(b)");

    wundes.com

  7. #7
    King of the 2600
    Join Date
    Feb 2003
    Posts
    92
    yup

  8. #8
    I have an icon and U dont! johnwun's Avatar
    Join Date
    Nov 2000
    Location
    Santa Cruz, CA
    Posts
    258
    Ok, so what happened?
    Did my fla not work?
    Did you try to apply it and it didn't work at all?
    Did you apply it, and it doesn't work the way you want, or
    does it all just not make any sense?

    Perhaps if you post your fla here, I can modify it to do what you want, but I need more info as to what you are trying to acchieve, and why it hasn't worked for you so far...
    [a.fun>b.fun ? trace("do(a)") : trace("do(b)");

    wundes.com

  9. #9
    King of the 2600
    Join Date
    Feb 2003
    Posts
    92
    Well, the effect I'm trying to acheive is this, the background image is a black and white screen shot of a counterstrike model, when the mouse is rolled ove different parts of the body (ie: head, hand, gun, etc) I want these parts to fade to the lighter colored image, then when you click them, it loads the desired feature. When the head is clicked, the news pops up, when the gun is clicked, our roster shows up, stuff like that.

    Thanks a ton,
    Jeff

  10. #10
    I have an icon and U dont! johnwun's Avatar
    Join Date
    Nov 2000
    Location
    Santa Cruz, CA
    Posts
    258
    OK, try this one...

    The code is commented so you should be able to figure it out. LEt me know if you have any questions...
    Attached Files Attached Files
    [a.fun>b.fun ? trace("do(a)") : trace("do(b)");

    wundes.com

  11. #11
    King of the 2600
    Join Date
    Feb 2003
    Posts
    92
    thanks, again. but i still cant to it, im having a hard time with flash i guess. am i supposed to rename my images to imag1 and image2?

    Thanks,
    Jeff

  12. #12
    I have an icon and U dont! johnwun's Avatar
    Join Date
    Nov 2000
    Location
    Santa Cruz, CA
    Posts
    258

    YES

    Sort of... I gave you one example. It soulds like you want to do several of these for each part of your model.
    I'm asuming your body is broken into the component pieces, with the over state, and the b&w state.

    You will have to repeat the code I gave you for each image/over pair that you have. Just replace the "image1" with the top image, and "image2" with the bottom image... Play with it for a few hours... It will start to make sense, I promise...
    [a.fun>b.fun ? trace("do(a)") : trace("do(b)");

    wundes.com

  13. #13
    King of the 2600
    Join Date
    Feb 2003
    Posts
    92
    do I convert the images to movie clips? or leave them as is?

    Thanks,
    Jeff
    Last edited by Atarian; 03-12-2003 at 07:46 PM.

  14. #14
    I have an icon and U dont! johnwun's Avatar
    Join Date
    Nov 2000
    Location
    Santa Cruz, CA
    Posts
    258
    to movie clips... Everything to movie clips...
    [a.fun>b.fun ? trace("do(a)") : trace("do(b)");

    wundes.com

  15. #15
    King of the 2600
    Join Date
    Feb 2003
    Posts
    92
    i give up, it doesnt do anything for me when i try it.

    Thanks again,
    Jeff

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