Home‎ > ‎

Greeting Cards

Fun Effects and Greeting Cards
A simple project is to make greeting cards (Birthday cards, Christmas cards, Funny cards, etc). You can animate them by having something move, disappear/show again, bounce, jump, change color. change (e.g. from an egg to a chicken). You can add sound effects, music or even your own voice. You can show a video or a photo. You can do almost anything that your imagination can come up with.


Free Resources:
    Free Clipart - Free Photos - Free Game Art - more -  Digital Photos - Animation Library - TheFreeSites
    Do It Yourself Free Software - Gimp - Graphics/Drawing - Blender - 3D Art 
    SoundEffects - site1 - site2 - site3 

How to ...?

      1. How to add Pop-ups, Images Appear and Disappear, Animations  and Other Effects Using the Hide, Show, Move and Set (which changes any property of an object) commands

        note: After you import your graphic, do the following:
            put it where you want on the card
                open up it's "Property Inspector" and change its name to something simple like "rabbit"
                If it is too big, size it down then in its "Property Inspector" under "Size and Position" check the box that says "Lock size and position"

      Have an object disappear
            find and import an image, graphic or photo ("File", "Import as Control", "Image File")   e.g. "rabbit.jpg" 
            add a button and put the following code in it"
                on mouseUp
                        hide image "rabbit"
                end mouseUp

            when the person clicks on the button, the rabbit will disappear

      Have an object appear
            find and import an image, graphic or photo ("File", "Import as Control", "Image File")   e.g. "rabbit" put it where you want on the card. 
                open up it's "Property Inspector" and uncheck the box that say "Visible" and it will be invisible
            add a button and put the following code in it"
                on mouseUp
                        show image "rabbit"
                end mouseUp

           when the person clicks on the button, the rabbit will suddenly appear

      Have an object change to something else 
            find and import an image, graphic or photo ("File", "Import as Control", "Image File")   e.g. "rabbit" put it where you want on the card
                and set it to be invisible
            find and import another image, graphic or photo e.g. "hat" put it over top (where) the "rabbit" is
           add a button and put the following code in it"

                on mouseUp
                        hide image "hat"
                        show image "rabbit"
               end mouseUp
           when the person clicks on the button, the hat will disappear and the rabbit will appear

      Have an object jump someplace else
            find and import an image, graphic or photo ("File", "Import as Control", "Image File")   e.g. "rabbit.jpg" 
            add a button and put the following code in it"

                on mouseUp
                        set the loc of image "rabbit.jpg" to 200,250
                end mouseUp

           when the person clicks on the button, the rabbit will jump to another location. 
            (You can experiment with the numbers 200 and 250 to see what looks better. Try different numbers)

      Have an object move someplace else slowly
            find and import an image, graphic or photo ("File", "Import as Control", "Image File")   e.g. "rabbit.jpg" 
            add a button and put the following code in it"

                on mouseUp
                        move the image "rabbit.jpg" from 200,50 to 200,250 in 2 secs
                end mouseUp

           when the person clicks on the button, the rabbit will slowly move to the other location in 2 seconds. 
            (You can experiment with the numbers 200 and 250 to see what looks better. Try different numbers)
            (You can experiment with the time of 2 seconds and make it slower or faster)

     Have an object move around
            find and import an image, graphic or photo ("File", "Import as Control", "Image File")   e.g. "rabbit.jpg" 
            add a button and put the following code in it"

                on mouseUp
                        move the image "rabbit.jpg" to 200,250
                        move the image "rabbit.jpg" to 250,250
                        move the image "rabbit.jpg" to 250,200
                        move the image "rabbit.jpg" to 200,200
               end mouseUp

           when the person clicks on the button, the rabbit will move in a square. 
 
      Have an object move along a invisible path that you make
            find and import an image, graphic or photo ("File", "Import as Control", "Image File")   e.g. "rabbit.jpg" 
            draw a graphic with the "freehand" line tool
            add a button and put the following code in it"

                on mouseUp
                        move the image "rabbit.jpg" to the points of graphic "curve"
                end mouseUp

           when the person clicks on the button, the rabbit will slowly move to the other location in 2 seconds. 
            (You can experiment with the numbers 200 and 250 to see what looks better. Try different numbers)
            (You can experiment with the time of 2 seconds and make it slower or faster)


  2. How to add Music and Sound Effects using the "Play" command
        notenot all "wav" or "mp3" files will play - some of them are not made correctly

       Add your voice
            There is a free program called Audacity that you can download and use to record and alter your voice. Make a "wav" file and use it here

            find and import a sound effect ("File", "Import as Control", "Audio File")   -  It has to be a "wav" or "mp3" file 
            add a button and put the following code in it"
                on mouseUp
                        play "firecracker.wav"
                end mouseUp

       Add a sound effect
            find and import a sound effect ("File", "Import as Control", "Audio File")   -  It has to be a "wav" or "mp3" file 
            add a button and put the following code in it"
                on mouseUp
                        play "firecracker.wav"
                end mouseUp

       Add background music to keep playing
            find and import a music file ("File", "Import as Control", "Audio File")   -  It has to be a "wav" or "mp3" file
            add a button and put the following code in it"
                on mouseUp
                        play "ballad.wav" looping
                end mouseUp

       Add a button to stop the music
             add a button "Stop" and put the following code in it"
                on mouseUp
                        play empty
                end mouseUp

   
       Add background music to keep playing
            find and import a music file ("File", "Import as Control", "Audio File")   -  It has to be a "wav" or "mp3" file
            add a button and put the following code in it"

                on mouseUp
                        play "ballad.wav" looping
                end mouseUp


You can experiment and put these together and with good graphics, make some cool greeting cards

Examples
    Open up the sample livecode file below (effects.livecode) and look at the code on each button to see how the effects are done.



ċ
Effects.livecode
(12k)
cyril.pruszko@pgcps.org,
Mar 19, 2014, 10:22 AM
Comments