Need Help with action script.

Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default Need Help with action script.

    I am working on a project for one of my classes, and in it I want to be able to click on an apple (which is a button) and make it fall. I have tried the on(releace) gotoAndStop(); commands as well as others. None seem to be working. If anyone has any ideas on how I can accomplish this I would greatly appreciate it.

    tina


    tina8621 webforumsuser@macromedia.com Guest

  2. Similar Questions and Discussions

    1. xml and action script
      I want to display the "Value" in a dynamic text field from an xml document called "stocks.xml". here is my action script code for the dynamic text...
    2. CF Grid / Java Script / Action Script
      Hi, Does anyone know of a good reference for the attributes CFgrid exposes in a flash form? eg. I would like to select the first row on load. ...
    3. action script help
      im trying to load an external swf file using the gotoAndPlay(_root.emptyClip.loadMovie("grey_bars.swf")); is it possible to load the same movie...
    4. Action script??!!?!
      HI, Im kinda new to this action script stuff and a friend of mine gave me some code a while back to look at. Basically its a menu system with...
    5. Need help with an Action Script
      Hello Everyone, I am developing the included action script for one of the Spanish teachers at my work place. The concept is that the students drag...
  3. #2

    Default Re: Need Help with action script.

    u want to do animation when click button, that`s right ?

    if apple button movie target is called apple try this

    on (release) {
    //if animation is a movie clip which is in button frames and its target is called MC
    apple.mc.gotoAndPlay(1);
    }

    if i understand u right that will help...


    elemental .std webforumsuser@macromedia.com Guest

  4. #3

    Default Re: Need Help with action script.

    It depends on what kind of solution you want to pursue, but you will need two things: a button and a movieclip. Here is maybe the simplest way that I might do it.

    Draw your apple and make it a graphic symbol.

    Make an invisible button. a circle just about the size of the apple in the Hit area, but leave the other keyframes blank

    Make a movieclip of the apple falling, using tweening, say between frame 1 and frame 20.

    Make another layer in the movie clip and add a keyframe in frame 1. And put the invisible button over the apple.

    On the button add the action on(release){this.play();}

    Make another layer in the movie clip. Call this "Actions" and in frame one add the action "stop();" and on Frame 20 add the action "stop();"

    I'm doing all this from memory, so there might be a type or two. Does it make sense?


    Rothrock webforumsuser@macromedia.com Guest

Posting Permissions

  • You may not post new threads
  • You may 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