Adobe Director Online
 
Description Authored by: AdobeDirectorOnline Staff. Dated: May 03, 2008

Alex Zavatone
Alex Zavatone

Automated Button Graphics Generator

 

Automated Button Graphic Generator
Download

Imagine a scenario where we have built a fully functional Director application with a not so pleasant user interface and you are thinking of an application which could enhance your interface with those nice little buttons…this is what Zav’s Asset Builder for.

Automated Button Graphic Generator is a Director Application which helps you to create images well suited for buttons. Multiple shapes, multiple colors and different text…this is the beauty of this utility. Download this and enjoy!

How to use this?

Step 1: Create Buttons

  1. Automated Button Graphic Generator is a Director file with the external casts to it. Download the zab.zip and extract it.
  2. Open the file zav’s asset builder 024.dir and play the movie
  3. Choose a button template
  4. Choose the size and adjust the text alignment
  5. Edit the button text. Here, if you enter multiple lines, each line will be a different button.
  6. Finally, hit ‘Create Assets’
  7. Go to cast ‘Assets’ and there you will find each button in four states.

Please Note: This utility also has a feature to export as JPEG, PICT or PNG and it uses SharpExport xtra which is not D11 ready yet. So until then please don’t hit these buttons :)

Step 2: Use the buttons

We will use a sample file to show how to use the button graphics created in the earlier step. Later on you can use the scripts mentioned in any director file.

  1. Open usingButtons.dir
  2. Open external cast assets.cst where you have created the button graphics.
  3. copy the Button Graphics into the internal cast.
  4. Select active and mask together and drag it on to the stage so that the mask image is on top of active image.
  5. select the mask image and change the ink to ‘matte’ and blend to 0
  6. drag the ‘Button sprite specific subclass - sprite – 1’ script on top of the mask image.
  7. Play the movie and check the buttons. You can see how all the button states appear as and when required.
  8. Create a behavior with a handler called “Success” and put it on the mask sprite.  Put the things you want the button to do in that handler.

Note that if the registration points of the masks appear to be off by 1 pixel on the x axis (you can check by using onion skinning in the paint window) the regpoint can be adjusted with the following code:

on FixRegPoint memberNum, castNum

  adjustX = 1

  adjustY = 0

  myMember = member memberNum of castLib castNum

  AdjustRegpointH myMember, adjustX, adjustY

end

on AdjustRegpointH myMember, x,y

  the regPoint of member myMember = the regPoint of member myMember + point(x,y)

end

   
spacer image
This is not an Official site from Adobe. If you need any clarifications, please mail me at info@adobedirectoronline.com