Professional Web Applications Themes

Bounce Lingo .... - Macromedia Director Lingo

Hi all, Newbie lingo programmer here. Im trying to create a behaviour that when placed on sprites will make them bounce - just like on the taskbar in Mac OSX. As I know very little about how to create this effect fluidly, I was wondering if I could have some help? Heres what I want to happen: - User moves mouse over sprite - It starts to bounce - If they move the mouse off, the sprite will finish the bounce, then stop - Else keep bouncing. Should be fairly simple huh? Heres what Ive got so far :S Hover ...

  1. #1

    Default Bounce Lingo ....

    Hi all,
    Newbie lingo programmer here. Im trying to create a behaviour that when
    placed on sprites will make them bounce - just like on the taskbar in Mac
    OSX. As I know very little about how to create this effect fluidly, I was
    wondering if I could have some help?

    Heres what I want to happen:
    - User moves mouse over sprite
    - It starts to bounce
    - If they move the mouse off, the sprite will finish the bounce, then stop
    - Else keep bouncing.

    Should be fairly simple huh? Heres what Ive got so far :S Hover over the
    rings in the bottom left corner:

    [url]http://www.feenster.co.uk/testrpm.htm[/url]

    Heres the code
    //================================
    property spritenum, ring, dir, startV, moveList, mouseIn

    on beginsprite me
    ring = sprite(me.spritenum)
    startV = ring.locV
    moveList = [startV, startV - 3, startV - 7, startV - 10, startV - 6,
    startV - 1, startV + 3, startV +1]
    dir = -2
    end

    on exitFrame me
    if mouseIn = true then
    if moveList <> [] then
    ring.locV = moveList[1]
    deleteAt moveList,1
    else
    moveList = [startV, startV - 3, startV - 7, startV - 10,
    startV - 6, startV - 1, startV + 3, startV +1]
    end if
    end if
    end

    on mouseEnter me
    mouseIn = true
    end

    on mouseLeave me
    mouseIn = false
    moveList = [startV, startV - 3, startV - 7, startV - 10, startV - 6,
    startV - 1, startV + 3, startV +1]
    end
    //================================

    Im guessing this is a pretty bad way to do it. Its very rigid, and has many
    faults (such as the sprite not finishing a bounce when the mouse is moved
    away). Can anyone help me? The code, explanations of how to do it, or URL's
    would be good. I want it to be as fluid as possible.

    Thanks in advance,
    Matt
    -------------------------------------
    REPLY TO ADDRESS IS INVALID
    matt (at) feenster (dot) co (dot) uk


    dirtycow Guest

  2. #2

    Default Re: Bounce Lingo ....

    on exitFrame me
    if moveList <> [] then
    ring.locV = moveList[1]
    deleteAt moveList,1
    else
    if mouseIn = true then --I only moved this line
    moveList = [startV, startV - 3, startV - 7, startV - 10,
    startV - 6, startV - 1, startV + 3, startV +1]
    end if
    end if
    end

    HTH/Christoffer

    "dirtycow" <feenygenie.co.uk> skrev i meddelandet
    news:bln1q2$ddb80$1ID-148468.news.uni-berlin.de...
    > Hi all,
    > Newbie lingo programmer here. Im trying to create a behaviour that when
    > placed on sprites will make them bounce - just like on the taskbar in Mac
    > OSX. As I know very little about how to create this effect fluidly, I was
    > wondering if I could have some help?
    >
    > Heres what I want to happen:
    > - User moves mouse over sprite
    > - It starts to bounce
    > - If they move the mouse off, the sprite will finish the bounce, then stop
    > - Else keep bouncing.
    >
    > Should be fairly simple huh? Heres what Ive got so far :S Hover over the
    > rings in the bottom left corner:
    >
    > [url]http://www.feenster.co.uk/testrpm.htm[/url]
    >
    > Heres the code
    > //================================
    > property spritenum, ring, dir, startV, moveList, mouseIn
    >
    > on beginsprite me
    > ring = sprite(me.spritenum)
    > startV = ring.locV
    > moveList = [startV, startV - 3, startV - 7, startV - 10, startV - 6,
    > startV - 1, startV + 3, startV +1]
    > dir = -2
    > end
    >
    > on exitFrame me
    > if mouseIn = true then
    > if moveList <> [] then
    > ring.locV = moveList[1]
    > deleteAt moveList,1
    > else
    > moveList = [startV, startV - 3, startV - 7, startV - 10,
    > startV - 6, startV - 1, startV + 3, startV +1]
    > end if
    > end if
    > end
    >
    > on mouseEnter me
    > mouseIn = true
    > end
    >
    > on mouseLeave me
    > mouseIn = false
    > moveList = [startV, startV - 3, startV - 7, startV - 10, startV - 6,
    > startV - 1, startV + 3, startV +1]
    > end
    > //================================
    >
    > Im guessing this is a pretty bad way to do it. Its very rigid, and has
    many
    > faults (such as the sprite not finishing a bounce when the mouse is moved
    > away). Can anyone help me? The code, explanations of how to do it, or
    URL's
    > would be good. I want it to be as fluid as possible.
    >
    > Thanks in advance,
    > Matt
    > -------------------------------------
    > REPLY TO ADDRESS IS INVALID
    > matt (at) feenster (dot) co (dot) uk
    >
    >

    Christoffer Enedahl Guest

  3. #3

    Default Re:Bounce Lingo ....

    I'm sure there will be a bouncing behavior at

    [url]http://www.mediamacros.com[/url]

    oh sorry its a not exactly a bouncing behavior your after. but trouble is I don't have a mac so I don't know what this is like.

    I don't suppose you could point to something similar on the web.

    btw theres some interesting behaviors on my site for movement at

    [url]http://www.geocities.com/hairybobby2000/movemenu.html[/url]


    HAIRYBOBBY - why didn't I choose a really cool name like the vulcanpimp

    [url]http://www.geocities.com/hairybobby2000[/url]

    new vector shape behaviors here

    [url]http://www.geocities.com/hairybobby2000/vertexhome.html[/url]
    hairybobby webforumsuser@macromedia.com Guest

  4. #4

    Default Re: Bounce Lingo ....


    "Christoffer Enedahl" <christoffer-listno-enedahl-spam.com> wrote in
    message news:blr347$e9i$1forums.macromedia.com...
    > on exitFrame me
    > if moveList <> [] then
    > ring.locV = moveList[1]
    > deleteAt moveList,1
    > else
    > if mouseIn = true then --I only moved this line
    > moveList = [startV, startV - 3, startV - 7, startV - 10,
    > startV - 6, startV - 1, startV + 3, startV +1]
    > end if
    > end if
    > end
    Thanks Christoffer. That seems to have made things a lot more fluid, and
    tidied the code up a bit.

    Hairybobby - the OSX thing. OSX has a taskbar at the bottom of the screen
    where you can place shortcuts to programs etc. When you hover over a
    shortcut, it bounces on the spot with a really nice motion. Sorry cant find
    an example on the net, but if I get this code working as I want it, ill post
    back.

    Matt


    dirtycow Guest

Similar Threads

  1. counting bounce back emails
    By Whizzzper in forum Coldfusion - Advanced Techniques
    Replies: 0
    Last Post: April 15th, 03:54 PM
  2. debian popularity contest mail bounce
    By K S Sreeram in forum Debian
    Replies: 3
    Last Post: July 2nd, 03:30 PM
  3. Now can I bounce or reject e-mails?
    By Bob Wheeler in forum Linux Setup, Configuration & Administration
    Replies: 0
    Last Post: June 29th, 11:15 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139