0 Replies Latest reply on Jan 25, 2007 2:03 PM by spookmc

    Place AS generated text in a MC instead of stage

    spookmc
      Probably anothorther trivial question, having to do with the way I should create movieclips.

      I have created some script to display options from an array. (zip file: http://www.flashfocus.nl/forum/attachment.php?attachmentid=5689 )
      These options can be selected and the index of the selected option is traced.
      I created this in an Object: dialogInterface(dialogClip);

      Intention is to place this object inside a movieclip. But I can only succeed when I call in my fla file, frame1:

      dialogInterface1 = new DialogInterface(this);

      And my content is shown on the stage.

      Question: How can I call a mc to show this little selection script in?

      I can create an instance of a movieClip and place the code:

      dialogInterface1 = new DialogInterface(this);
      dialogInterface1.displayOptions(option);

      In the first frame of this clip. But then I need to do so for all instances I will place on the canvas.
      Can I do this by scripting in a more elegant way??
      I would like to have a Class DialogGui, with a displayDialog method, that accepts a dialoGObejct with the information to be shown.
      Something like: dialogGUI.displayDialogWindow(dialogObjectWelcome), that I can call whenever I need a dilaog.

      Can this be done (easily)?