5 Replies Latest reply on Feb 17, 2009 4:42 PM by Gregory Lafrance

    Assigning an effect through AS, not MXML

    Handycam Level 1
      In a previous project I used the view stack effects library from efflex.org.

      I used it through mxml, though:
      <viewStackEffects:Fade id="fade"/>

      And then on each of the items in the viewStack, I had:
      <mx:Canvas id="scene4" label="" width="100%" height="100%" showEffect="fade" hideEffect="fade">

      In my current project, however, I am creating the children of the View Stack in AS code, via a loop. So this method does not work.

      I am in a loop such as:
      for each(var question:XML in dataXML){
      var quest:QuestionStep = new QuestionStep();
      questions.addChild(quest);
      ...

      Where "questions" is the ID of the view stack. I can't seem to just use quest.showEffect = fade. I assume I need to programmatically create the fade and then somehow assign it to each object created via the loop.

      any ideas? There really weren't any docs with this library.