15 Replies Latest reply on Jan 21, 2009 6:49 AM by kglad

    Creating a button, then filling it with a box in AS 2 ?

      Hello guys,

      I'm a young designer with only a year of pro experience in flash design, and I already made some good progress during that time.
      however, I'm the only one in my company with some knowledge of flash and AS, and today I'm encountering a problem that long hours of research did not solve.
      I'm working on some banners for a marketing campaign (already did several without problems), but I've had a very, very stupid idea : automatizing the clicktag button creation.

      what I need is a script that creates a button the size of the stage, then creates a transparent fill inside and attaches some code on release, etc, for that button to work.

      what I have achieved so far : a working script creating a fill in a movieclip and using it as a button.
      the only little issue is that for the companies we work with, it HAS to be a button, and it HAS to have the code attached to it directly with an on (release) function.

      I've tried embedding the movie clip in a button, resizing the button, trying to refresh it, but it seems like it only keeps the hit zone it had at creation, and if the button is empty, then there's no hit zone :s

      I'd love some help on this, folks, and if someone around the world is willing to criticize my work, I'm attaching my actual code to this message :)