10 Replies Latest reply on Feb 2, 2010 10:07 PM by Scott R. Hamilton

    Can an mxml component call an ActionScript subroutine?

    Scott R. Hamilton Level 1

      I have a question.

       

      I've developed an mxml component and I would like to be able to allow the

      user to call a print routine from within the component.

       

      I have included an action script file in the component using:

       

      <mx:Script source="PrintRecipe.as"/>

       

      which contains a function called doPrint.

       

      But I cannot call the function. The compiler gives me an error:

       

         Implicit conversion of a value with static type object to an unrelated type string

       

      I am almost certain that the compiler is refering to the function itself and not to

      any of its (arguments which are all strings).

       

      Is it possible to call a function from within a component?

       

       

      Scott