Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New Coder
    Join Date
    Mar 2007
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Buttons with squares around

    I have 6 buttons in a flash document all on a single layer. I then converted them to symbols and selected them as buttons. I then gave them an up, over and hit state and added:

    on (release) {
    getURL("mylink", "_self");
    }

    to all the buttons on the stage.

    Could somebody point me in the right direction here. I want a box to fly in around the image when it is hovered over. Where do I start?

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    You will need to use movieClips as buttons instead of buttons. Search for tutorials and I like them better anyways.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #3
    New Coder
    Join Date
    Mar 2007
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Search the forums or a general search on Google?

  • #4
    Senior Coder
    Join Date
    Oct 2008
    Location
    Long Beach
    Posts
    1,196
    Thanks
    36
    Thanked 164 Times in 164 Posts
    Search google for tutorials on animating movie clips.

    As for turning your buttons into movie clips non-dynamically:
    Click on each button on the state, then in the Properties window look for the drop-down on the top left. It should currently have Button selected, change that to Movie Clip and you can now access/manipulate those buttons as if they were MCs.

    If you like animating in Flash, you can create some motion guides for your button MCs to follow.
    http://www.entheosweb.com/Flash/motion_guide.asp
    http://www.echoecho.com/flashtweenings01.htm
    Last edited by itsallkizza; 11-11-2008 at 07:43 PM.
    Feel free to e-mail me if I forget to respond ;)
    ohsosexybrit@gmail.com

  • #5
    New Coder
    Join Date
    Mar 2007
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is it best to just use pure ActionScript for this?

  • #6
    Senior Coder
    Join Date
    Oct 2008
    Location
    Long Beach
    Posts
    1,196
    Thanks
    36
    Thanked 164 Times in 164 Posts
    I would use AS only, but I'm guessing I'm in the minority.

    Motion guides would be faster to create in small quantities and would be easier to visually manipulate. Individual motion tweens can also serve a one-time purpose.

    AS, once set up, is lighter, more portable, more reusable, and faster to edit. However the "once set up" part can be a mother.
    Feel free to e-mail me if I forget to respond ;)
    ohsosexybrit@gmail.com

  • #7
    New Coder
    Join Date
    Mar 2007
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Cheers for your continued help on this.

    So i have started like this:

    import mx.transitions.Tween;
    import mx.transitions.easing.*;

    onLoad = function () {
    new Tween(whoweare_mc,"_alpha",Regular.easeOut,0,100,12,false);
    new Tween(whoweare_mc,"_x",Regular.easeOut,0,38.7,12,false);
    }

    Am I heading in the right direction?

  • #8
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Well so far you have the movieClip named whoweare_mc fading in, and moving across the screen.

    I personally wouldn't use Actionscript for this unless you were very comfortable with it, because as it was pointed out before, it can be hard to setup initially. It also depends on how many buttons you have, and if you see yourself making more flash projects in the future which might benefit from this kind of thing. If you have only a handful of buttons, and don't plan on doing this with lots of other projects, then I would make the movieClips in the animation window.

    Generally, you make a similar structure inside of the movieClip like you could in the button (except the hit frame), but you can have it so that the "over" state starts an animation.

    http://www.echoecho.com/flashbuttons02.htm
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #9
    Senior Coder
    Join Date
    Oct 2008
    Location
    Long Beach
    Posts
    1,196
    Thanks
    36
    Thanked 164 Times in 164 Posts
    jfyi cb2004: If you choose to use AS3 (though as both jw and I suggested, it probably isn't optimal for your small project) I personally won't be a huge help to you. The company I work for still uses AS2 (because it requires Flashplayer 9) and I haven't personally upgraded myself. Any AS2 questions you have though, I'm always open
    Feel free to e-mail me if I forget to respond ;)
    ohsosexybrit@gmail.com


  •  

    Posting Permissions

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