0 Replies Latest reply on Sep 12, 2007 12:15 PM by Ahjin

    button can not be created - flash8

    Ahjin
      Hi,

      I'm using Flash professional 8 and I would like to create a component button in the actionscript instead of dragging a button into a stage. As long as I know, I have to use a "button" type instance to use "uploadMovie" function not "movieclip". In addition, I mainly do a project in a way that create one fla file and many classes(.as) . I don't use keyframes at all. So, what I tried to do is to write scripts like this:

      ------------------------------------------------------------------------------------------ --
      import mx.controls.Button;

      var button1;
      button1.createObject("Button", "button1", 100);
      ------------------------------------------------------------------------------------------ --

      This script has no error but as I test the file, I can't see any button on the screen.
      Q1. Is there missing script?
      Q2. Can I use such script in the actionscript file(.as)? Is there any difference between .fla and .as if I use the script to each of both?

      Thank you so much