13 Replies Latest reply on Aug 7, 2013 6:30 PM by 729exam

    My Flash is not running. Error #1009

    729exam

        • 1. Re: My Flash is not running. Error #1009
          kglad Adobe Community Professional & MVP

          you're trying to reference something (using actionscript) that doesn't exist when your code executes.

           

          to pinpoint that problematic line of code click file>publish settings>swf and tick "permit debugging".  retest.

           

          the problematic line of code will be in the error message.  if that doesn't make the problem and solution obvious, copy and paste the problematic line of code.

          • 2. Re: My Flash is not running. Error #1009
            729exam Level 1

            I am sorry. But i am very new to this. Could you please explain again?

             

            I tried your advice. This time my flash has sound on but nothing other than that. Please help me out again

             

            Thank you!

             

            • 3. Re: My Flash is not running. Error #1009
              729exam Level 1

              this is what it give me after tick "permit debugging"

               

              at com.devnet.osmf.controls::CaptionBar/set caption()[C:\Users\Administrator\Downloads\Compressed\MediaPresoWithDetails\_source\com\d evnet\osmf\controls\CaptionBar.as:152]
                  at com.devnet.osmf.overlays::DetailsScreen/set data()[C:\Users\Administrator\Downloads\Compressed\MediaPresoWithDetails\_source\com\devn et\osmf\overlays\DetailsScreen.as:264]
                  at com.devnet.osmf.application::ControlBar/set details()[C:\Users\Administrator\Downloads\Compressed\MediaPresoWithDetails\_source\com\d evnet\osmf\application\ControlBar.as:407]
                  at com.devnet.osmf.application::MediaPresoWithDetails/setMedia()[C:\Users\Administrator\Down loads\Compressed\MediaPresoWithDetails\_source\com\devnet\osmf\application\MediaPresoWithD etails.as:340]
                  at com.devnet.osmf.application::MediaPresoWithDetails/onConfigLoaded()[C:\Users\Administrato r\Downloads\Compressed\MediaPresoWithDetails\_source\com\devnet\osmf\application\MediaPres oWithDetails.as:137]
                  at flash.events::EventDispatcher/dispatchEventFunction()
                  at flash.events::EventDispatcher/dispatchEvent()
                  at flash.net::URLLoader/onComplete()

              • 4. Re: My Flash is not running. Error #1009
                kglad Adobe Community Professional & MVP

                copy and paste line 152 of CaptionBar.as.

                • 5. Re: My Flash is not running. Error #1009
                  729exam Level 1

                  Could you tell me copy and paste the line 152 of CaptionBar to where?

                  • 6. Re: My Flash is not running. Error #1009
                    kglad Adobe Community Professional & MVP

                    copy the line of code from line 152 of CaptionBar.as and paste that same line of code to this forum so i can see that line of code and help you correct that line of code.

                    1 person found this helpful
                    • 7. Re: My Flash is not running. Error #1009
                      729exam Level 1

                            this is line 152 of captionBar.as:

                       

                      captionField.text = value;

                       

                           this is line 264 of DetailsScreen.as:

                       

                      captionBar.caption = value.caption;

                       

                          this is line 407 of ControlBar.as

                       

                      detailsOverlay.data = value;

                       

                         this is line 340 of MediaPresoWIthDetails.as

                       

                      controlBar.details = getDetailData(index);

                       

                          this is line 137 of MediaPresoWithDetails.as

                       

                      setMedia(0, _autoPlay);

                       

                      i don't know where to find the rest of the errors

                      • 8. Re: My Flash is not running. Error #1009
                        kglad Adobe Community Professional & MVP

                        captionField does not exist in the scope of line 152 in CaptionBar when your code exists.

                         

                        copy the first 152 lines of CaptionBar and paste in a message in this forum.

                        1 person found this helpful
                        • 9. Re: My Flash is not running. Error #1009
                          729exam Level 1

                          **************************************

                          * Developed for the Adobe Flash Developer Center.

                          * Written by Dan Carr (dan@dancarrdesign.com), 2011.

                          *

                          * Distributed under the Creative Commons Attribution-ShareAlike 3.0 Unported License

                          * http://creativecommons.org/licenses/by-sa/3.0/

                          */

                          package com.devnet.osmf.controls

                          {

                              import com.devnet.osmf.application.MediaDisplay;

                              import com.devnet.osmf.events.MediaEvent;

                             

                              import flash.display.MovieClip;

                              import flash.display.Sprite;

                              import flash.events.Event;

                              import flash.events.MouseEvent;

                             

                              import flash.text.TextField;

                              import fl.transitions.Tween;

                              import fl.transitions.easing.*;

                             

                              //*********************************

                              // Event Metadata:

                             

                              [Event(name="change", type="flash.events.Event")]

                             

                              /**********************************

                               * The CaptionBar class creates a self-

                               * sizing title bar with built-in transitions.

                               *

                               * @langversion ActionScript 3.0

                               * @playerversion Flash 10.0.0

                               */

                              public class CaptionBar extends MovieClip

                              {

                                  //*****************************

                                  // Properties:

                                 

                                  private var _caption:String = "";

                                  private var _callToAction:String = "READ MORE";

                                  private var _tween:Tween;

                                  private var _tween2:Tween;

                                  private var _useCallToAction:Boolean = true;

                                 

                                  // Stage assets...

                                  public var background1:Sprite;

                                  public var background2:Sprite;

                                  private var captionField:TextField;

                                  private var callToActionField:TextField;

                                  public var callToActionIcon:Sprite;

                                  public var maskArea:Sprite;

                                 

                                  //*****************************

                                  // Constructor:

                                 

                                  public function CaptionBar():void

                                  {

                                      // Draw mask...

                                      maskArea = new Sprite();

                                      maskArea.graphics.beginFill(0xffffff, 1);

                                      maskArea.graphics.drawRect(0, 0, background1.width + background2.width, background1.height);

                                      maskArea.graphics.endFill();

                                      addChild(maskArea);

                                     

                                      // Attach mask

                                      this.mask = maskArea;

                                  }

                                 

                                  //*************************

                                  // Methods:

                                 

                                  /**

                                   * Activates the tween fade transition.

                                   *

                                   * @param    fadeDirection    True to transition in.

                                   */

                                  public function tween( fadeDirection:Boolean = true ):void

                                  {

                                      var startVal:uint = fadeDirection ? 0 : 1;

                                      var endVal:uint = fadeDirection ? 1 : 0;

                                     

                                      // Fade

                                      if( _tween ) {

                                          _tween.stop();

                                      }

                                      _tween = new Tween(this, "alpha", Strong.easeOut, startVal, endVal, 1.5, true);

                                  }

                                 

                                  /**

                                   * Activates the masked transition.

                                   *

                                   * @param    maskDirection    True to transition in.

                                   */

                                  public function transition( maskDirection:Boolean = true ):void

                                  {

                                      var startVal:int = maskDirection ? -width : 0;

                                      var endVal:int = maskDirection ? 0 : -width;

                                     

                                      // Transition mask...

                                      if( _tween2 ) {

                                          _tween2.stop();

                                      }

                                      _tween2 = new Tween(maskArea, "x", Strong.easeOut, startVal, endVal, 1.5, true);

                                  }

                                 

                                  /**

                                   * Updates the size of teh caption bar to

                                   * match the width of the text.

                                   */

                                  public function updateSize():void

                                  {

                                      background1.width = captionField.textWidth + 20;

                                     

                                      if( _useCallToAction )

                                      {

                                          background2.width = callToActionField.textWidth + 35;

                                          background2.x = background1.width;

                                          background2.visible = true;

                                          callToActionField.x = background2.x + 10;

                                          callToActionField.visible = true;

                                          callToActionIcon.x = background2.x + background2.width - 16;

                                          callToActionIcon.visible = true;

                                          maskArea.width = background1.width + background2.width;

                                          maskArea.height = background1.height;

                                          maskArea.x = 0;

                                      }

                                      else{

                                          background2.visible = false;

                                          callToActionField.visible = false;

                                          callToActionIcon.visible = false;

                                          maskArea.width = background1.width;

                                          maskArea.height = background1.height;

                                          maskArea.x = 0;

                                      }

                                  }

                                 

                                  //*************************

                                  // Getter/Setters:

                                 

                                  //-----------------

                                  // caption

                                 

                                  /**

                                   * Sets the caption

                                   */

                                 

                                  public function set caption( value:String ):void

                                  {

                                      _caption = value;

                                     

                                      // Update caption

                                      captionField.text = value;

                          • 10. Re: My Flash is not running. Error #1009
                            kglad Adobe Community Professional & MVP

                            is there an object named captionField on the timeline of a library symbol that has as linkage = CaptionBar?

                             

                            if not, that's the problem.

                             

                            if yes, it needs to exist when you call updateSize.

                            • 11. Re: My Flash is not running. Error #1009
                              729exam Level 1

                              I checked, there is no object named captionField and I deleted. that error disappear. I tried to do the same thing for calltoaction but it gave me a bunch of error. Is it the same thing for calltoaction? now my flash doesnt work at all. I make it Bold the error line below so you can see.

                               

                              /**************************************

                              * Developed for the Adobe Flash Developer Center.

                              * Written by Dan Carr (dan@dancarrdesign.com), 2011.

                              *

                              * Distributed under the Creative Commons Attribution-ShareAlike 3.0 Unported License

                              * http://creativecommons.org/licenses/by-sa/3.0/

                              */

                              package com.devnet.osmf.controls

                              {

                                  import com.devnet.osmf.application.MediaDisplay;

                                  import com.devnet.osmf.events.MediaEvent;

                                 

                                  import flash.display.MovieClip;

                                  import flash.display.Sprite;

                                  import flash.events.Event;

                                  import flash.events.MouseEvent;

                                 

                                  import flash.text.TextField;

                                  import fl.transitions.Tween;

                                  import fl.transitions.easing.*;

                                 

                                  //*********************************

                                  // Event Metadata:

                                 

                                  [Event(name="change", type="flash.events.Event")]

                                 

                                  /**********************************

                                   * The CaptionBar class creates a self-

                                   * sizing title bar with built-in transitions.

                                   *

                                   * @langversion ActionScript 3.0

                                   * @playerversion Flash 10.0.0

                                   */

                                  public class CaptionBar extends MovieClip

                                  {

                                      //*****************************

                                      // Properties:

                                     

                                      private var _caption:String = "";

                                      private var _callToAction:String = "READ MORE";

                                      private var _tween:Tween;

                                      private var _tween2:Tween;

                                      private var _useCallToAction:Boolean = true;

                                     

                                      // Stage assets...

                                      public var background1:Sprite;

                                      public var background2:Sprite;

                                      private var captionField:TextField;

                                      private var callToActionField:TextField;

                                      public var callToActionIcon:Sprite;

                                      public var maskArea:Sprite;

                                     

                                      //*****************************

                                      // Constructor:

                                     

                                      public function CaptionBar():void

                                      {

                                          // Draw mask...

                                          maskArea = new Sprite();

                                          maskArea.graphics.beginFill(0xffffff, 1);

                                          maskArea.graphics.drawRect(0, 0, background1.width + background2.width, background1.height);

                                          maskArea.graphics.endFill();

                                          addChild(maskArea);

                                         

                                          // Attach mask

                                          this.mask = maskArea;

                                      }

                                     

                                      //*************************

                                      // Methods:

                                     

                                      /**

                                       * Activates the tween fade transition.

                                       *

                                       * @param    fadeDirection    True to transition in.

                                       */

                                      public function tween( fadeDirection:Boolean = true ):void

                                      {

                                          var startVal:uint = fadeDirection ? 0 : 1;

                                          var endVal:uint = fadeDirection ? 1 : 0;

                                         

                                          // Fade

                                          if( _tween ) {

                                              _tween.stop();

                                          }

                                          _tween = new Tween(this, "alpha", Strong.easeOut, startVal, endVal, 1.5, true);

                                      }

                                     

                                      /**

                                       * Activates the masked transition.

                                       *

                                       * @param    maskDirection    True to transition in.

                                       */

                                      public function transition( maskDirection:Boolean = true ):void

                                      {

                                          var startVal:int = maskDirection ? -width : 0;

                                          var endVal:int = maskDirection ? 0 : -width;

                                         

                                          // Transition mask...

                                          if( _tween2 ) {

                                              _tween2.stop();

                                          }

                                          _tween2 = new Tween(maskArea, "x", Strong.easeOut, startVal, endVal, 1.5, true);

                                      }

                                     

                                      /**

                                       * Updates the size of teh caption bar to

                                       * match the width of the text.

                                       */

                                      public function updateSize():void

                                      {

                                          background1.width = captionField.textWidth + 20;

                                         

                                          if( _useCallToAction )

                                          {

                                              background2.width = callToActionField.textWidth + 35;

                                              background2.x = background1.width;

                                              background2.visible = true;

                                              callToActionField.x = background2.x + 10;

                                              callToActionField.visible = true;

                                              callToActionIcon.x = background2.x + background2.width - 16;

                                              callToActionIcon.visible = true;

                                              maskArea.width = background1.width + background2.width;

                                              maskArea.height = background1.height;

                                              maskArea.x = 0;

                                          }

                                          else{

                                              background2.visible = false;

                                              callToActionField.visible = false;

                                              callToActionIcon.visible = false;

                                              maskArea.width = background1.width;

                                              maskArea.height = background1.height;

                                              maskArea.x = 0;

                                          }

                                      }

                                     

                                      //*************************

                                      // Getter/Setters:

                                     

                                      //-----------------

                                      // caption

                                     

                                      /**

                                       * Sets the caption

                                       */

                                     

                                      public function set caption( value:String ):void

                                      {

                                          _caption = value;

                                         

                                      }

                                     

                                      public function get caption():String

                                      {

                                          return _caption;

                                      }

                                     

                                      //-----------------

                                      // callToAction

                                     

                                      /**

                                       * Sets the call to action text

                                       */

                                     public function set callToAction( value:String ):void

                                      {

                                          if( value != "" && value != null )

                                          {

                                              _callToAction = value;

                                             

                                          }

                                     

                                      public function get callToAction():String

                                      {

                                          return _callToAction;

                                      }

                                     

                                      //-----------------

                                      // useCallToAction

                                     

                                      /**

                                       * Disables or enables the call to action cues.

                                       */

                                     public function set useCallToAction( value:Boolean ):void

                                      {

                                          _useCallToAction = value;

                                      }

                                     

                                      public function get useCallToAction():Boolean

                                      {

                                          return _useCallToAction;

                                      }

                                  }

                              } (this line 193- last line)

                               

                              it say error 1084 in 194: expect rightbrace before end of program. Doesnt it already have an rightbrace?

                              • 12. Re: My Flash is not running. Error #1009
                                Ned Murphy Adobe Community Professional & MVP

                                Your   public function set callToAction   is missing its ending brace

                                1 person found this helpful
                                • 13. Re: My Flash is not running. Error #1009
                                  729exam Level 1

                                  Hi,

                                   

                                  I tried the flash on different computer not my laptop and it works great. no errors at all. My professor told me that it is configuration problem when I installed Adobe prevented it from publishing correctly. Could anyone help me with that? What should I do to solve that configaration problem?