Welcome to WebDesignForums.net!
You're currently viewing WDF as a guest. By registering for a free account, you'll be able to participate with other members in our friendly community. Being a member allows you to ask questions and get answers for those troublesome web development tasks!

In addition, as a member you'll be able to post your websites up for review. Using our unique website review system you can gain some amazing feedback from some of the best web developers around. This is a completely free service to all registered members.

Ready to register yet? Registration is 100% free. Click Here To Join Now!

Change Symbol Position on Mouse RollOver, Add Points

Discussion in 'Adobe Flash Help' started by bchandark, Nov 14, 2009.

  1. Offline

    bchandark New Member

    Message Count:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Hello,
    I am just starting Flash CS3, and I would like some assistance with a game.

    In my game, a symbol (movieclip?) is inserted somewhere in the stage randomly. If you hover over it, it changes position automatically.
    I converted my target into a MovieClip, and made it possible to export for ActionScript.
    I put this in the ActionScript Class file

    class Target extends MovieClip

    I can't find the code I need to
    1) make target a button, graphic, or movieclip
    2) make the target randomly appear on the screen when frame is loaded
    3) make the target randomly move to a different place when hovered over
    4) make a score variable, and make it go up each time the target is hovered over.

    I have an idea of how to do #4, something like

    {
    var score;

    function OnLoad ()
    score = 0

    function onEnterFrame ()
    score=+1 if {code for hover over symbol}


    I would greatly appreciate any help.

    Thank you,
    Bchandark


  2. Offline

    JasonMc New Member

    Message Count:
    61
    Likes Received:
    0
    Trophy Points:
    0
    If you make the target a movieclip you can give it the features of a button.

    A lot of answers to your questions can be found at flashkit.com. they have tutorials, file downloads and a forum


Share This Page