Dynamic Mirror Effect

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • binchaud
    New Member
    • Aug 2007
    • 1

    #1

    Dynamic Mirror Effect

    Is there a way to create a dynamic mirror effect that will create a reflection regardless of what is placed above a set line?

    Meaning, we should not have to duplicate symbols, flip them and create the effect manually.
    The flash should be smart enough to create the reflection on the fly.

    Explained further through:


    Been trying for days :(
  • xNephilimx
    Recognized Expert New Member
    • Jun 2007
    • 213

    #2
    Of course there is, just get a little creative.
    Here http://www.thenephilim.com.ar/dynarefs/dinare.swf is my way to do it, and I'll start explaining it right now. I'll only covere here the basics, if you explore the source file, you'll find more stuff, but I'm sure you'll be able to grasp it's contents with ease.

    You can download de source here:


    Here's how it's done:

    The first thing I did is a movieclip that will contain our actual icon and it's reflection and instance named it "btn".

    Then I made an icon, just a green sphere for the sake of simplicity, with the same dimensions of the icons (48x48 pixels).

    I converted this icon to movieclip and called it ico (with the same instance name), the I converted it again to movieclip this time with the instance name "pic", duplicated this one and instance named this other one as "ref", I flipped this one vertically and put it below the "pic" one. Then I centered both to btn.

    (I also made a dynamic mask for the reflection, to make it appear as the reflection fades away. I won't explain that, it's easy, and in the source file is something that's easy to spot and understand.)

    Now comes the fun part, the ActionScript part.
    In the main timeline write this:

    [CODE=actionscri pt]

    btn.pic.ico.loa dMovie("theIcon .png");
    btn.ref.ico.loa dMovie("theIcon .png");

    [/CODE]

    and that's it.
    Really simple.

    In my example there ara some more stuff, just to make the demo interactive, check the code out, and the most important, try, experiment, get your hands dirty with code, it's the best way to learn and understand.

    Kind regards,
    The_Nephilim

    Comment

    • johanwahlberg
      New Member
      • Oct 2007
      • 2

      #3
      Hello!
      I am looking for a way to get the same effect, but with text based menu objects that are dynamically loaded into the swf file with a "file.swf?var=v alue" query string. Would you like to help me modify this fla file to recieve a text string through the query string and apply the mirror effect on it? Preferrably with a transparent backround.

      Thanks in advance!

      Best regards
      Johan

      Comment

      • Motoma
        Recognized Expert Specialist
        • Jan 2007
        • 3236

        #4
        Originally posted by xNephilimx
        Of course there is, just get a little creative.
        Here http://www.thenephilim.com.ar/dynarefs/dinare.swf is my way to do it, and I'll start explaining it right now. I'll only covere here the basics, if you explore the source file, you'll find more stuff, but I'm sure you'll be able to grasp it's contents with ease.

        You can download de source here:


        Here's how it's done:

        The first thing I did is a movieclip that will contain our actual icon and it's reflection and instance named it "btn".

        Then I made an icon, just a green sphere for the sake of simplicity, with the same dimensions of the icons (48x48 pixels).

        I converted this icon to movieclip and called it ico (with the same instance name), the I converted it again to movieclip this time with the instance name "pic", duplicated this one and instance named this other one as "ref", I flipped this one vertically and put it below the "pic" one. Then I centered both to btn.

        (I also made a dynamic mask for the reflection, to make it appear as the reflection fades away. I won't explain that, it's easy, and in the source file is something that's easy to spot and understand.)

        Now comes the fun part, the ActionScript part.
        In the main timeline write this:

        [CODE=actionscri pt]

        btn.pic.ico.loa dMovie("theIcon .png");
        btn.ref.ico.loa dMovie("theIcon .png");

        [/CODE]

        and that's it.
        Really simple.

        In my example there ara some more stuff, just to make the demo interactive, check the code out, and the most important, try, experiment, get your hands dirty with code, it's the best way to learn and understand.

        Kind regards,
        The_Nephilim
        He xNephilimx, that demo is DAMN SNAPPY! Fantastic, truly.

        Comment

        • xNephilimx
          Recognized Expert New Member
          • Jun 2007
          • 213

          #5
          Hi, Motoma!
          Thanks! Glad you liked it!

          Originally posted by Motoma
          He xNephilimx, that demo is DAMN SNAPPY! Fantastic, truly.

          Comment

          Working...