A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Making Buttons... Switching Images

  1. #1
    Senior Member
    Join Date
    Oct 2002
    Location
    Las Vegas
    Posts
    155

    Making Buttons... Switching Images

    i was wondering if anyone could tell me how to make these tabs into buttons so that they come forward when clicked... here is the image i'm working on to give you some idea what i'm talking about


  2. #2
    Senior Member Dead Rabbit's Avatar
    Join Date
    Oct 2002
    Location
    Back in Tampa FLA again - and happy!
    Posts
    2,403
    Placing the tabs into a sprite will make it possible. I've attached an example. In this movie, I added the tops of the tabs as shapes (reshaped rectangles) and used the Transform action to color the long part of the tab, which is a seperate shape.

    In scene 1, I assigned a mouse event (On Press) to each tab to move the playhead in the sprite. In scene 2, I used (On RollOver) to do the same thing.

    Hope this helps!
    Attached Files Attached Files
    While changing my profile, I accidentally clicked the link that said
    "Add 'Dead Rabbit' to your Ignore List"
    so now I can't talk to myself anymore...

    The Repository -:- The Forum

  3. #3
    Senior Member
    Join Date
    Oct 2002
    Location
    Las Vegas
    Posts
    155
    i wish it helped too... i appreciate you taking the time but i was lost after opening up the file


    i did the images in photoshop and imported them... every color has it's own layer and are one peice... can't i set the top tabs as buttons and have the layers move forward when clicked

    sorry... i have some idea but i'm really new to this

  4. #4
    Senior Member Vincent26381's Avatar
    Join Date
    Feb 2003
    Location
    The Netherlands
    Posts
    833
    I believe the first scene of what Dead Rabbit made fits your problem perfectly. Just right-click on scene 2 and delete it. When a tab is clciked it comes to the front.
    Vincent
    SWIS BV

    Last edited by Markp.com on 07-23-2003 at 02:25 AM

  5. #5
    Senior Member Dead Rabbit's Avatar
    Join Date
    Oct 2002
    Location
    Back in Tampa FLA again - and happy!
    Posts
    2,403
    The first thing is to understand what the sprite is and what it does, then build upon it as necessary. Read the SWiSH Help file on sprites for a primer.

    Although the drawing is a little crude, I modified the .swi to give the appearance of moving the entire folder forward. This requires copying the tabs, then cutting off the tab portion of the copy. The cut-off tab tops stay visible, and the entire tab, a second object, is placed on top using a Place effect within the sprite.

    The mouse events are attached to the cut-off tabs only. Take a look at the sprite, how the labels and Stop actions are placed, then look at the Actions Panel for RedTab, BlueTab and PurplTab objects to see how it all works.
    Attached Files Attached Files
    While changing my profile, I accidentally clicked the link that said
    "Add 'Dead Rabbit' to your Ignore List"
    so now I can't talk to myself anymore...

    The Repository -:- The Forum

  6. #6
    Senior Member
    Join Date
    Oct 2002
    Location
    Las Vegas
    Posts
    155
    ok... i'll start dissecting your file and read the help files... again... thanks... but one question... my tabs are over laping... the way you have it set up... this will still work for me right?

    so the tabs come forward and don't look like they are behind the other tabs

  7. #7
    Senior Member Dead Rabbit's Avatar
    Join Date
    Oct 2002
    Location
    Back in Tampa FLA again - and happy!
    Posts
    2,403
    On the second .swi, yes - that's the way it will look. You'll either have to cut off the tabs to use as buttons or create some invisible buttons over the tabs to control the sprite.
    While changing my profile, I accidentally clicked the link that said
    "Add 'Dead Rabbit' to your Ignore List"
    so now I can't talk to myself anymore...

    The Repository -:- The Forum

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center