Error #1009 Using SpellUIForTLF

The error occurs when you activate the spelling
APPLICATION
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
   xmlns:s="library://ns.adobe.com/flex/spark"
   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" initialize="application1_initializeHandler(event)">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
import com.adobe.linguistics.spelling.SpellUIForTLF;
import flashx.textLayout.elements.TextFlow;
import mx.events.FlexEvent;
import spark.utils.TextFlowUtil;
[Bindable]
public var flow:TextFlow = TextFlowUtil.importFromString("<TextFlow xmlns='http://ns.adobe.com/textLayout/2008'><p><span>Spell cheecking in s:RichEditableText does not woork</span></p></TextFlow>");
protected function application1_initializeHandler(event:FlexEvent):void
//SpellUIForTLF.spellingConfigUrl = "config/AdobeSpellingConfig.xml";
private function enableFeature():void {
SpellUIForTLF.enableSpelling(richTextArea.textFlow, "en_US");
private function disableFeature() :void {
SpellUIForTLF.disableSpelling(richTextArea.textFlow);
]]>
</fx:Script>
<s:layout>
<s:VerticalLayout />
</s:layout>
<s:HGroup>
<s:Button id="tt2" label="enable Feature" click="enableFeature()" />
<s:Button id="tt1" label="disable Feature" click="disableFeature()" />
</s:HGroup>
<s:RichEditableText id="richTextArea" width="100%" height="100%" fontSize="30" textFlow="{flow}"/>
</s:Application>
ERROR
TypeError: Error #1009: No se puede acceder a una propiedad o a un método de una referencia a un objeto nulo.
at flashx.textLayout.container::TextContainerManager/getContentBounds()[C:\Vellum\branches\v 1\1.1\dev\output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManage r.as:644]
at spark.components::RichEditableText/textContainerManager_compositionCompleteHandler()[E:\d ev\4.x\frameworks\projects\spark\src\spark\components\RichEditableText.as:3990]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flashx.textLayout.container::TextContainerManager/dispatchEvent()[C:\Vellum\branches\v1\1 .1\dev\output\openSource\textLayout\src\flashx\textLayout\container\TextContainerManager.a s:1472]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flashx.textLayout.elements::TextFlow/dispatchEvent()[C:\Vellum\branches\v1\1.1\dev\output \openSource\textLayout\src\flashx\textLayout\elements\TextFlow.as:773]
at flashx.textLayout.compose::StandardFlowComposer/http://ns.adobe.com/textLayout/internal/2008::callTheComposer()[C:\Vellum\branches\v1\1.1\ dev\output\openSource\textLayout\src\flashx\textLayout\compose\StandardFlowComposer.as:690 ]
at flashx.textLayout.compose::StandardFlowComposer/internalCompose()[C:\Vellum\branches\v1\1 .1\dev\output\openSource\textLayout\src\flashx\textLayout\compose\StandardFlowComposer.as: 758]
at flashx.textLayout.compose::StandardFlowComposer/updateToController()[C:\Vellum\branches\v 1\1.1\dev\output\openSource\textLayout\src\flashx\textLayout\compose\StandardFlowComposer. as:557]
at flashx.textLayout.compose::StandardFlowComposer/updateAllControllers()[C:\Vellum\branches \v1\1.1\dev\output\openSource\textLayout\src\flashx\textLayout\compose\StandardFlowCompose r.as:519]
at com.adobe.linguistics.spelling::SpellingContextMenuForTLF()[E:\glo_lib\esg\users\ravi\squ iggly\main\AdobeSpellingUITLF\src\com\adobe\linguistics\spelling\SpellingContextMenuForTLF .as:95]
at com.adobe.linguistics.spelling::SpellUIForTLF/addContextMenu()[E:\glo_lib\esg\users\ravi\ squiggly\main\AdobeSpellingUITLF\src\com\adobe\linguistics\spelling\SpellUIForTLF.as:481]
at com.adobe.linguistics.spelling::SpellUIForTLF/loadDictComplete()[E:\glo_lib\esg\users\rav i\squiggly\main\AdobeSpellingUITLF\src\com\adobe\linguistics\spelling\SpellUIForTLF.as:464 ]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.adobe.linguistics.spelling.framework::SpellingService/loadDictComplete()[E:\glo_lib\e sg\users\ravi\squiggly\main\AdobeSpellingFramework\src\com\adobe\linguistics\spelling\fram ework\SpellingService.as:110]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.adobe.linguistics.spelling::HunspellDictionary/loadDictionaryComplete()[E:\glo_lib\es g\users\ravi\squiggly\main\AdobeSpellingEngine\src\com\adobe\linguistics\spelling\Hunspell Dictionary.as:150]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.adobe.linguistics.spelling.core.utils::SquigglyDictionaryLoader/loadDictionaryComplet e()[E:\glo_lib\esg\users\ravi\squiggly\main\AdobeSpellingEngine\src\com\adobe\linguistics\ spelling\core\utils\SquigglyDictionaryLoader.as:205]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at com.adobe.linguistics.spelling.core.utils::DictionaryLoader/handleComplete()[E:\glo_lib\e sg\users\ravi\squiggly\main\AdobeSpellingEngine\src\com\adobe\linguistics\spelling\core\ut ils\DictionaryLoader.as:83]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()

In his code he is sending a TextFlow as the parameter to SpellUIForTLF.enableSpelling.  So does it matter whether it is a  text flow from RichEditableText, as long as it is a TextFlow ?
SpellUIForTLF.enableSpelling(richTextArea.textFlow, "en_US");
Could you please explain what you mean by
"So in this particular case using SpellUIforTLF for TextFlow inside RichEditableText is the problem.
For now you may try to use SpellUIforTLF on TextFlow and make your own custom containers instead of using RichEditableText."
Asking this to get it clarified, as I am also going to use Squiggly in my TLF editor. Me too using RichEditableText. So I am going to use it like this.
                         var currentEditor:RichEditableText = editors.getChildByName(itemName) as RichEditableText;
                         var currTextFlow:TextFlow = currentEditor.textFlow.deepCopy() as TextFlow;                      
                         SpellUIForTLF.enableSpelling(currTextFlow, "en_US");
Anything wrong with this?
Thanks

Similar Messages

  • Error 1009 / Using swf in Flex

    Hi all.
    I am creating a small Flex Application which will include a swf.
    The application consists of two panels, with the left being a Flash app. As the user moves the mouse over the Flash, it should trigger different messages on the right panel.
    A screenshot is attached to get an idea of what I'm aiming for.
    This is the error I'm getting:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at flash_component_fla::MainTimeline/frame1()
    Additionally, I'm struggling with two things:
    How do I get the output panel to display in the Rockwell font
    How do I get the Flash part to send the mouse position to the Flex?
    So this is what I have:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
         xmlns:mx="http://www.adobe.com/2006/mxml"
         layout="absolute"
         height="610" width="750"
         creationComplete="showCursor()" backgroundColor="white" cornerRadius="10" borderStyle="solid">
         <mx:Style>
         .boxClass {
            fontFamily: Rockwell, Trebuchet MS, Helvetica, "_sans";
            color: Red;
            fontSize: 12;
            fontWeight: bold;
        </mx:Style>
        <mx:Script>
        <![CDATA[
        [Bindable] public var clickText:XMLList;
        private var panelText:XML =
                     <textDetails>
                          <bodyPart>
                                  <partName>throat</partName>
                                  <partNo>You cannot donate when you have a sore throat or a throat infection</partNo>
                                  <partYes>Once the sore throat has cleared, or a week after any antibiotics have finished, you can donate.</partYes>
                             </bodyPart>
                             <bodyPart>
                                  <partName>pregnancy</partName>
                                  <partNo>You cannot donate wwhile you are pregnant</partNo>
                                  <partYes>You can donate when the expected baby iis nine months old</partYes>
                             </bodyPart>
                             <bodyPart>
                                  <partName>hayfever</partName>
                                  <partNo>Only restricted iif you are feeling unwell</partNo>
                                  <partYes>You can donate iif you are feeling well, even iif you are taking medication</partYes>
                             </bodyPart>
                             <bodyPart>
                                  <partName>dentist</partName>
                                  <partNo>Wait seven days after complicated dental work, such aas tooth extractions</partNo>
                                  <partYes>You can donate after simple inspections, or after 24hrs after fillings.</partYes>
                             </bodyPart>
                             <bodyPart>
                                  <partName>asthma</partName>
                                  <partNo>If you having the effects of the asthma</partNo>
                                  <partYes>You can donate iif you are feeling well, even iif you uuse a preventative inhaler</partYes>
                             </bodyPart>
                             <bodyPart>
                                  <partName>Surgery</partName>
                                  <partNo>Major Surgery: Please call the helpline</partNo>
                                  <partYes>Minor Surgery: As long aas there were no complications and the donor has recovered.</partYes>
                             </bodyPart>
                        </textDetails>
              import mx.managers.CursorManagerPriority;
               import mx.managers.CursorManager;
               import flash.events.Event;
               private function functions():void     {
                             throat.addEventListener(MouseEvent.CLICK, changeText);
              private function changeText(event:Event):void {
                             clickText = panelText.bodyPart[0].partYes;
                             output.text= clickText;
         [Embed("nbs1.gif")]
          private var customCursor:Class;
         private function showCursor():void
            CursorManager.setCursor(
              customCursor,
              CursorManagerPriority.HIGH,
              -1,
              -1);
         ]]>
           </mx:Script>
         <mx:Panel x="481" y="69" width="250" height="516" layout="absolute" id="rt">
              <mx:Text x="10" y="10" text="Other Considerations..."/>
              <mx:Accordion x="8" y="36" width="212" height="277">
                   <mx:Canvas label="Blood Transfusions" width="100%" height="100%" dropShadowEnabled="true" dropShadowColor="#F50B0B">
                        <mx:Text x="10" y="10" width="190">
                             <mx:htmlText>If you have recieved a blood transfusion since the beginning of 1980, you cannot currently donate.</mx:htmlText>
                        </mx:Text>
                   </mx:Canvas>
                   <mx:Canvas label="Travel" width="100%" height="100%">
                   <mx:Text x="10" y="10" width="190">
                             <mx:htmlText>Travellers to malarial areas and countries with West Nile Virus should contact the helpline for more details.</mx:htmlText>
                        </mx:Text>
                   </mx:Canvas>
                   <mx:Canvas label="Weight" width="100%" height="100%">
                   <mx:Text x="10" y="10" width="190">
                             <mx:htmlText>You need to weigh 50kg, or 7st 12lb to donate.</mx:htmlText>
                        </mx:Text>
                   </mx:Canvas>
                   <mx:Canvas label="Tattoos and piercings" width="100%" height="100%">
                        <mx:Text x="10" y="10" width="190">
                             <mx:htmlText>Any new piercings or tattoos, or acupuncture? You now have to wait just four months before being eligible to donate.</mx:htmlText>
                        </mx:Text>
                   </mx:Canvas>
                   <mx:Canvas label="Age Limits" width="100%" height="100%">
                        <mx:Text x="10" y="10" width="190">
                             <mx:htmlText>
                                  Under 16: Too young. Sorry!
                                  16 - 17: You can register, but not donate 17 - 65: Please register! 66 - 70: If you have ever donated, you can donate 70+: Only if you have donated in the last two years.
                             </mx:htmlText>
                        </mx:Text>
                   </mx:Canvas>
                   <mx:Canvas label="Antibiotics" width="100%" height="100%">
                        <mx:Text x="10" y="10" width="190">
                             <mx:htmlText>
                                  You can donate seven days after the antibiotics have finished, as long as the infection has cleared.
                             </mx:htmlText>
                        </mx:Text>
                   </mx:Canvas>
                   <mx:Canvas label="Common Cold" width="100%" height="100%">
                        <mx:Text x="10" y="10" width="190">
                             <mx:htmlText>
                                  You can donate when the cold has cleared and you are feeling well.
                             </mx:htmlText>
                        </mx:Text>
                   </mx:Canvas>
              </mx:Accordion>
              <mx:TextArea
                   id="output"
                   x="10" y="321"
                   text="Move the cursor over the bodies to find out more about how your health affects blood donation!"
                   width="210" color="#F21212" styleName="boxClass" height="68"/>
         </mx:Panel>
         <mx:Image x="667" y="35" source="NHS.jpg" width="65" height="26"/>
         <mx:Image x="10" y="22" source="headline.gif"/>
         <mx:SWFLoader x="10" y="69" source="flash_component.swf" id="throat"/>
    </mx:Application>

    Hmm, thanks Flex HarUI... IU I kinda think the boffins at Adobe are less likely than me to have the problems.
    I'm going to attach the swf and it's associated .fla if that is any more help.
    For the record this is the Error Message:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at flash_component_fla::MainTimeline/frame1()
    Any help would be hugely appreciated...

  • Using papervision in flash builder and getting TypeError: Error #1009: when using object.pitch(5)

    When i use papervision in flash builder and i am doing a test, when i render a sphere using papervision with the following code it renders me the sphere.
    When i add a line sphere.pitch(2);      ||
    sphere.yaw(2);
    sphere.roll(2);
    i get the following error,
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at PvTest/onRenderTick()[D:\Android 3D\PvTest\src\PvTest.as:39]
    Can anyone help me figure out the error
    For additional Info, these are the imports i am doing:
    import org.papervision3d.objects.primitives.Sphere;
    import org.papervision3d.view.BasicView;

    I followed the steps and read some of your comments on the same top topic in another thread. When I put it on the first frame it was okay but the next button on that page had the same problem.  So what I am guessing is that I have to either create a document class or put the actions where the buttons are.  Am I understanding that correctly?  In the other thread in which you helped someone else; there was so comments about document class.  I found a tutorial on it and the way I understand it is that it you can put you actions in an external document.  But you have to include in the event listener the frame in which you want that action to happen.
    Thaks for your help.  And patience.

  • I see error 1009 every time i want to use apple store.whats that ?

    i see error 1009 every time i want to use apple store.whats that ?

    it means you are trying to use the app store from a country that you are not in

  • Error #1009 in my Platform Game! Please Help!!!

    In my basic platform game I have a "hero" that can walk and jump on the "ground." There is also a door to the next scene, which is the next level.The first scene works fine, but "TypeError: Error #1006: value is not a function. at Charles3_fla::MainTimeline/frame1()" pops up once in the output. It works however, and I'm not worried about it. The second I go throught the door though, Scene 2 opens, but then starts flashing as "TypeError: Error #1009: Cannot access a property or method of a null object reference. at Charles3_fla::MainTimeline/onenter()" pops up A LOT in the output. I don't know how to fix it, and would like help. P.S. I am using Adobe CS5 with actionscript 3
    Here is the code for Scene 1:
    hero.gotoAndStop('still');
    var Key:KeyObject = new KeyObject(stage);
    var vy:Number=0;
    var gravity:Number=2;
    var jumped:Boolean = false;
    stage.addEventListener(Event.ENTER_FRAME,onenter)(true);
    function onenter(e:Event):void{
    vy+=gravity;
    if(! ground.hitTestPoint(hero.x,hero.y,true)) {
      hero.y+vy;
    if(ground.hitTestPoint(hero.x+(hero.width/2), hero.y-(hero.height/2), true)) {
      hero.x-=13;
    if(ground.hitTestPoint(hero.x-(hero.width/2), hero.y-(hero.height/2), true)) {
      hero.x+=13;
    if (vy>10) {
      vy=10;
    for (var i:int = 0; i<10; i++) {
      if (ground.hitTestPoint(hero.x,hero.y,true)) {
       hero.y--;
       vy=6;
       jumped=true;
    if(door.hitTestObject(hero)){
        gotoAndPlay(1,"Scene 2");
    if(hero.y>300){
      vy=6;
      jumped=true;
      if(Key.isDown(Key.UP) && jumped){
       vy=-13;
       jumped=false;
       hero.y+=vy;
    if(Key.isDown(Key.RIGHT)){
      hero.x+=10;
      hero.scaleX=1;
      hero.gotoAndStop('walking');
      }else if(Key.isDown(Key.LEFT)){
      hero.x-=10;
      hero.scaleX=-1;
      hero.gotoAndStop('walking');
      }else{
       hero.gotoAndStop('still');
    And for Scene 2...
    hero.gotoAndStop('still');
    var Key1:KeyObject =KeyObject(stage);
    var vy1:Number=0;
    var gravity1:Number=2;
    var jumped1:Boolean = false;
    stage.addEventListener(Event.ENTER_FRAME,onenter1)(true);
    function onenter1(e:Event):void{
    vy1+=gravity;
    if(! ground.hitTestPoint(hero.x,hero.y,true)) {
      hero.y+vy;
    if(ground.hitTestPoint(hero.x+(hero.width/2), hero.y-(hero.height/2), true)) {
      hero.x-=13;
    if(ground.hitTestPoint(hero.x-(hero.width/2), hero.y-(hero.height/2), true)) {
      hero.x+=13;
    if (vy1>10) {
      vy1=10;
    for (var i:int = 0; i<10; i++) {
      if (ground.hitTestPoint(hero.x,hero.y,true)) {
       hero.y--;
       vy1=6;
       jumped1=true;
    if(door.hitTestObject(hero)){
        gotoAndPlay(1,"Scene 2");
    if(hero.y>300){
      vy1=6;
      jumped1=true;
      if(Key.isDown(Key.UP) && jumped1){
       vy1=-13;
       jumped1=false;
       hero.y+=vy;
    if(Key.isDown(Key.RIGHT)){
      hero.x+=10;
      hero.scaleX=1;
      hero.gotoAndStop('walking');
      }else if(Key.isDown(Key.LEFT)){
      hero.x-=10;
      hero.scaleX=-1;
      hero.gotoAndStop('walking');
      }else{
       hero.gotoAndStop('still');
    Please reply as soon as possible, and thanks for your time
    swiatekalex555

    Ok sorry about my misunderstanding. Here's the code with the errors Highlighted. I also downloaded a "KeyObject.as" package, and the contents of that are on the bottom.
    hero.gotoAndStop('still');
    var Key:KeyObject = new KeyObject(stage);
    var vy:Number=0;
    var gravity:Number=2;
    var jumped:Boolean = false;
    stage.addEventListener(Event.ENTER_FRAME,onenter)(true);
    function onenter(e:Event):void{
    vy+=gravity;
    if(! ground.hitTestPoint(hero.x,hero.y,true)) {
      hero.y+vy;
    if(ground.hitTestPoint(hero.x+(hero.width/2), hero.y-(hero.height/2), true)) {
      hero.x-=13;
    if(ground.hitTestPoint(hero.x-(hero.width/2), hero.y-(hero.height/2), true)) {
      hero.x+=13;
    if (vy>10) {
      vy=10;
    for (var i:int = 0; i<10; i++) {
      if (ground.hitTestPoint(hero.x,hero.y,true)) {
       hero.y--;
       vy=6;
       jumped=true;
    if(door.hitTestObject(hero)){
        gotoAndPlay(1,"Scene 2");
    if(hero.y>300){
      vy=6;
      jumped=true;
      if(Key.isDown(Key.UP) && jumped){
       vy=-13;
       jumped=false;
       hero.y+=vy;
    if(Key.isDown(Key.RIGHT)){
      hero.x+=10;
      hero.scaleX=1;
      hero.gotoAndStop('walking');
      }else if(Key.isDown(Key.LEFT)){
      hero.x-=10;
      hero.scaleX=-1;
      hero.gotoAndStop('walking');
      }else{
       hero.gotoAndStop('still');
    And for Scene 2...
    hero.gotoAndStop('still');
    var Key1:KeyObject =KeyObject(stage);
    var vy1:Number=0;
    var gravity1:Number=2;
    var jumped1:Boolean = false;
    stage.addEventListener(Event.ENTER_FRAME,onenter1)(true);
    function onenter1(e:Event):void{
    vy1+=gravity;
    if(! ground.hitTestPoint(hero.x,hero.y,true)) {
      hero.y+vy;
    if(ground.hitTestPoint(hero.x+(hero.width/2), hero.y-(hero.height/2), true)) {
      hero.x-=13;
    if(ground.hitTestPoint(hero.x-(hero.width/2), hero.y-(hero.height/2), true)) {
      hero.x+=13;
    if (vy1>10) {
      vy1=10;
    for (var i:int = 0; i<10; i++) {
      if (ground.hitTestPoint(hero.x,hero.y,true)) {
       hero.y--;
       vy1=6;
       jumped1=true;
    if(door.hitTestObject(hero)){
        gotoAndPlay(1,"Scene 2");
    if(hero.y>300){
      vy1=6;
      jumped1=true;
      if(Key.isDown(Key.UP) && jumped1){
       vy1=-13;
       jumped1=false;
       hero.y+=vy;
    if(Key.isDown(Key.RIGHT)){
      hero.x+=10;
      hero.scaleX=1;
      hero.gotoAndStop('walking');
      }else if(Key.isDown(Key.LEFT)){
      hero.x-=10;
      hero.scaleX=-1;
      hero.gotoAndStop('walking');
      }else{
       hero.gotoAndStop('still');
    the KeyObject.as
    package {
    import flash.display.Stage;
    import flash.events.KeyboardEvent;
    import flash.ui.Keyboard;
    import flash.utils.Proxy;
    import flash.utils.flash_proxy;
      * The KeyObject class recreates functionality of
      * Key.isDown of ActionScript 1 and 2
      * Usage:
      * var key:KeyObject = new KeyObject(stage);
      * if (key.isDown(key.LEFT)) { ... }
    dynamic public class KeyObject extends Proxy {
      private static var stage:Stage;
      private static var keysDown:Object;
      public function KeyObject(stage:Stage) {
       construct(stage);
      public function construct(stage:Stage):void {
       KeyObject.stage = stage;
       keysDown = new Object();
       stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
       stage.addEventListener(KeyboardEvent.KEY_UP, keyReleased);
      flash_proxy override function getProperty(name:*):* {
       return (name in Keyboard) ? Keyboard[name] : -1;
      public function isDown(keyCode:uint):Boolean {
       return Boolean(keyCode in keysDown);
      public function deconstruct():void {
       stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
       stage.removeEventListener(KeyboardEvent.KEY_UP, keyReleased);
       keysDown = new Object();
       KeyObject.stage = null;
      private function keyPressed(evt:KeyboardEvent):void {
       keysDown[evt.keyCode] = true;
      private function keyReleased(evt:KeyboardEvent):void {
       delete keysDown[evt.keyCode];
    Help if you can,
    swiatekalex555

  • Error #1009 - think it has to do with a movie file

    This error keeps on coming up when im trying to complete my flash website, the error seams to linked to a movie file that is interrupting something somewhere
    this is the complete error message,
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at wokringonsite_fla::MainTimeline/frame3()[wokringonsite_fla.MainTimeline::frame3:16]
              at flash.display::Sprite/constructChildren()
              at flash.display::Sprite()
              at flash.display::MovieClip()
              at flash.display::MovieClip/nextFrame()
              at wokringonsite_fla::MainTimeline/updatePreloader()[wokringonsite_fla.MainTimeline::frame1: 12]
    this is the code from the begining
    stop();
    //Preloader
    loaderInfo.addEventListener(ProgressEvent.PROGRESS, updatePreloader);
    function updatePreloader(evtObj:ProgressEvent):void
              //container for the progress of the site (download)
              var percent:Number = Math.floor((evtObj.bytesLoaded*100)/evtObj.bytesTotal);
              preloader_txt.text = percent+"%";
              if (percent==100){
                        nextFrame();
    next frame
    stop();
    //Animate in the home_mc from right to left, using the Tween class.
    //Flash - go get code that's going to make the tween work...
    import fl.transitions.Tween;
    import fl.transitions.TweenEvent;
    import fl.transitions.easing.*;
    //content_mc animation - animate in..
    var homeTween:Tween = new Tween(content_mc,"x",Regular.easeOut,content_mc.x,350,1,true);
    //Move the background into place
    new Tween(bkgd_mc,"x",Regular.easeOut,bkgd_mc.x,0,1,true);
    //handle events for buttons...
    home.addEventListener(MouseEvent.CLICK, clickSection);
    about.addEventListener(MouseEvent.CLICK, clickSection);
    portfolio.addEventListener(MouseEvent.CLICK, clickSection);
    contact.addEventListener(MouseEvent.CLICK, clickSection);
    AD5.addEventListener(MouseEvent.CLICK, clickSection);
    AD6.addEventListener(MouseEvent.CLICK, clickSection);
    AD7.addEventListener(MouseEvent.CLICK, clickSection);
    tvc.addEventListener(MouseEvent.CLICK, clickSection);
    function clickSection(evtObj:MouseEvent){
              //trace shows what's happening.. in the output window
              trace ("The "+evtObj.target.name+" button was clicked!")
              //go to the section clicked on...
              gotoAndStop(evtObj.target.name);
    var aboutTween:Tween = new Tween(content_mc,"x",Regular.easeOut,content_mc.x, 0,1,true);
    //Move the background into place
    new Tween(bkgd_mc,"x",Regular.easeOut,bkgd_mc.x,-166,1,true); ------- this basic code is used for all windows from home to tvc ,
    tvc code
    var tvcTween:Tween = new Tween(content_mc,"x",Regular.easeOut,content_mc.x,-2500,1,true);
    //Move the background into place
    new Tween(bkgd_mc,"x",Regular.easeOut,bkgd_mc.x,-1500,1,true);
    tvcTween.addEventListener(TweenEvent.MOTION_FINISH,donePlaying);
    function donePlaying(e:TweenEvent):void{
              trace ("done playing!");
              content_mc.tvc_mc.myvideo.play();
    I have absolutely no idea and right now it seams like a maze trapped in the puzzel trapped in pac man,
    any help would be fantastic
    cheers

    hey man this is a screen shot from frame 3, there is nothing in frame 16 which makes me wonder

  • Another TypeError: Error #1009 Problem

    Hey all,   I've searched the 'net and searched these forums but can't seem to figure out what I'm doing wrong.  I'm creating a flash based game for school that so far has ten frames on the timeline.  I have buttons on frame one, frame 5, and frame 10. I have actionscript code to control those buttons on frame 1, frame 5, and frame 10 respectively.  The code is worded identically on each frame with the exception that I've changed the button names and the function names that are called when the mouse button is pressed.   The code works fine on frame 1 and on frame 5, but when I click the button on frame 5 that sends me to frame 10, I get this error immediately:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at keys2BibleTest_fla::MainTimeline/frame10()
        at flash.display::MovieClip/gotoAndStop()
        at keys2BibleTest_fla::MainTimeline/stormBtnHandler1()
    I have verified that each instance of the buttons do indeed have the name of the button being listened for in the event handlers. I can change the type from button to movieclip and it works fine.  I can also remove frames 1 through 9 and the code works.
    Here's the code:
    Frame 1:
    stop();
    enterBtn.addEventListener(MouseEvent.MOUSE_DOWN, enterBtnHandler1);
    function enterBtnHandler1(event:MouseEvent):void {
        gotoAndStop(5, "Scene 1");
    Frame 5:
    import flash.events.MouseEvent;
    stormBtn.addEventListener(MouseEvent.MOUSE_DOWN, stormBtnHandler1);
    function stormBtnHandler1(event:MouseEvent):void {
        gotoAndStop(10, "Scene 1");
    chickenOutBtn.addEventListener(MouseEvent.MOUSE_DOWN, chickenOutBtnHandler1);
    function chickenOutBtnHandler1(event:MouseEvent):void {
        gotoAndStop(1, "Scene 1");
    Frame 10:
    import flash.events.MouseEvent;
    creationBtn.addEventListener(MouseEvent.MOUSE_DOWN, creation);
    function creation(event:MouseEvent):void {
        gotoAndStop(3, "Scene 1");
    lifeBtn.addEventListener(MouseEvent.MOUSE_DOWN, lifeOfChrist);
    function lifeOfChrist(event:MouseEvent):void {
        navigateToURL(new URLRequest("http://www.ceoutreach.org"));
    I can't for the life of me figure out what's wrong.  Can anyone help?
    Thank you,
    Mike

    Ned,
    thank you for your reply. Unfortunately, my buttons are on separate layers and separated by blank keyframes to boot.  When I posted originally, the buttons were all on the same layer BUT separated by blank keyframes. After doing some research on the web, I moved the buttons to their own separate layers (one button per layer) and kept the blank keyframes as well.
    Currently, my only filled keyframes are one, five, and ten. All other keyframes are blank except for my labels and actionscript code. I'm using separate layers for labels and actions, too. I attempted to attach the file with my original post but received the message that .fla files are not allowed.  I don't know about your window, but mine says Max size 5.0 MB (my file is 2), All files types allowed except.... .fla is not one of those in the exception list so I expected it to go.
    It's got something to do with the two buttons on frame 10.... I just went into the actionscript and bypassed frame 5, going directly to frame 10 when the Enter button is depressed, and got the same error message.   There's something in the code I'm just not seeing.... when I comment out the code for the buttons, no error message.  Put the code back in, error message comes back.  Delete the buttons and the code and insert new ones, the error message comes back.
    It's got me totally stumped.
    Thank you for trying,
    Mike
    Edit: I forgot to mention, frame ten is the only place on the timeline where instances of these particular buttons are being used. The other frames are populated with different buttons.  Also, when I change the type to movieclip, everything works.  Weird, huh?

  • First flexunit test is always failing with Error Error #1009: Cannot access a property or method of

    Hi,
    I have flexunit project which I am trying to run on linux server.
    1. I have Tests project.
    2. I am trying to compile it on linux server and creating Tests.swf file and then executing Tests.swf using ant on 64 bit linux server using standalone flash debug player.
    3. Tests project contains 4 tests and first tests always fail with following error,
        test:
         [flexunit] Validating task attributes ...
         [flexunit] Generating default values ...
         [flexunit] Using default working dir [/mnt/build/VinitFlexUnitBranch/workspace/src/Tests]
         [flexunit] Using the following settings for the test run:
         [flexunit] FLEX_HOME: [/var/lib/flex4.1sdk]
         [flexunit] haltonfailure: [true]
         [flexunit] headless: [false]
         [flexunit] display: [99]
         [flexunit] localTrusted: [true]
         [flexunit] player: [flash]
         [flexunit] port: [1024]
         [flexunit] swf: [/mnt/build/VinitFlexUnitBranch/workspace/bin/Tests.swf]
         [flexunit] timeout: [60000ms]
         [flexunit] toDir: [/mnt/build/VinitFlexUnitBranch/workspace/src/Tests/report]
         [flexunit] Setting up server process ...
         [flexunit] Entry [/mnt/build/VinitFlexUnitBranch/workspace/bin] already available in local trust file at [/home/deploy/.macromedia/Flash_Player/#Security/FlashPlayerTrust/flexUnit.cfg].
         [flexunit] Executing 'gflashplayer' with arguments:
         [flexunit] '/mnt/build/VinitFlexUnitBranch/workspace/bin/Tests.swf'
         [flexunit]
         [flexunit] The ' characters around the executable and arguments are
         [flexunit] not part of the command.
         [flexunit]
         [flexunit] Starting server ...
         [flexunit] Opening server socket on port [1024].
         [flexunit] Waiting for client connection ...
         [flexunit] Client connected.
         [flexunit] Setting inbound buffer size to [262144] bytes.
         [flexunit] Receiving data ...
         [flexunit] Sending acknowledgement to player to start sending test data ...
         [flexunit]
         [flexunit] FlexUnit test pause in suite Tests.Classes.DummyASyncTest had errors.
         [flexunit]
         [flexunit] Stopping server ...
         [flexunit] End of test data reached, sending acknowledgement to player ...
         [flexunit] Closing client connection ...
         [flexunit] Closing server on port [1024] ...
         [flexunit] <testcase classname="Tests.Classes::DummyASyncTest" name="pause" time="8" status="error"><error message="Error #1009: Cannot access a property or method of a null object reference." type="Tests.Classes::DummyASyncTest.pause" ><![CDATA[TypeError: Error #1009: Cannot access a property or method of a null object reference.
         [flexunit] at org.fluint.uiImpersonation.flex::FlexEnvironmentBuilder/buildVisualTestEnvironment()
         [flexunit] at org.fluint.uiImpersonation::VisualTestEnvironmentBuilder/buildVisualTestEnvironment()
         [flexunit] at org.flexunit.internals.runners.watcher::FrameWatcher/getStage()
         [flexunit] at org.flexunit.internals.runners.watcher::FrameWatcher()
         [flexunit] at org.flexunit.internals.runners.statements::StackAndFrameManagement()
         [flexunit] at org.flexunit.runners::BlockFlexUnit4ClassRunner/withStackManagement()
         [flexunit] at org.flexunit.runners::BlockFlexUnit4ClassRunner/withDecoration()
         [flexunit] at org.flexunit.runners::BlockFlexUnit4ClassRunner/methodBlock()
         [flexunit] at org.flexunit.runners::BlockFlexUnit4ClassRunner/runChild()
         [flexunit] at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()
         [flexunit] at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )
         [flexunit] at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()
         [flexunit] at org.flexunit.runners::ParentRunner/run()
         [flexunit] at org.flexunit.runners::Suite/runChild()
         [flexunit] at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()
         [flexunit] at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )
         [flexunit] at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()
         [flexunit] at org.flexunit.runners::ParentRunner/run()
         [flexunit] at org.flexunit.runners::Suite/runChild()
         [flexunit] at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()
         [flexunit] at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )
         [flexunit] at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()
         [flexunit] at org.flexunit.runners::ParentRunner/run()
         [flexunit] at org.flexunit.runner::FlexUnitCore/beginRunnerExecution()
         [flexunit] at org.flexunit.runner::FlexUnitCore/verifyRunnerCanBegin()
         [flexunit] at org.flexunit.token::AsyncCoreStartupToken/sendReady()
         [flexunit] at org.flexunit.runner.notification.async::AsyncListenerWatcher/sendReadyNotification()
         [flexunit] at org.flexunit.runner.notification.async::AsyncListenerWatcher/handleListenerReady()
         [flexunit] at flash.events::EventDispatcher/dispatchEventFunction()
         [flexunit] at flash.events::EventDispatcher/dispatchEvent()
         [flexunit] at org.flexunit.listeners::CIListener/setStatusReady()
         [flexunit] at org.flexunit.listeners::CIListener/dataHandler()
         [flexunit] at flash.events::EventDispatcher/dispatchEventFunction()
         [flexunit] at flash.events::EventDispatcher/dispatchEvent()
         [flexunit] at flash.net::XMLSocket/scanAndSendEvent()]]></error></testcase>
         [flexunit] <endOfTestRun/>
         [flexunit] Analyzing reports ...
         [flexunit]
         [flexunit] Suite: Tests.Classes.DummyASyncTest
         [flexunit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.008 sec
         [flexunit]
         [flexunit] Results :
         [flexunit]
         [flexunit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.008 sec
         [flexunit]
        BUILD FAILED
        /mnt/build/VinitFlexUnitBranch/workspace/src/Tests/build.xml:26: FlexUnit tests failed during the test run.
        at org.flexunit.ant.tasks.TestRun.analyzeReports(Unknown Source)
        at org.flexunit.ant.tasks.TestRun.run(Unknown Source)
        at org.flexunit.ant.tasks.FlexUnitTask.execute(Unknown Source)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.Main.runBuild(Main.java:809)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
        Total time: 1 second
    Exited with status 1
    [deploy]$
    4. Everytime I run this, any test which is run first will fail and all other tests will pass.
    My Tests.as file is as below:
    * Tests.as
    package
    import Tests.XTestSuite;
    import flash.display.Sprite;
    import mx.core.FlexSprite;
    import org.flexunit.listeners.CIListener;
    import org.flexunit.listeners.UIListener;
    import org.flexunit.runner.FlexUnitCore;
    public class Tests extends Sprite
    public var flexSprite:FlexSprite;
    public function Tests()
    onCreationComplete();
    public function onCreationComplete() : void {
    var core : FlexUnitCore = new FlexUnitCore();
    core.addListener(new CIListener());
    core.runClasses(Tests.XTestSuite);
    public function currentRunTestSuite():Array
    var testsToRun:Array = new Array();
    testsToRun.push(Tests.XTestSuite);
    return testsToRun;
    XTestSuite try to run 4 flexunit test classes.
    one of that flexunit test script class is as below:
    package Tests.Classes
    import flexunit.framework.Assert;
    import org.flexunit.Assert;
    import org.flexunit.asserts.assertEquals;
    public class DummyASyncTest
    [Test]
    public function pause() : void
    assertEquals(true, true);
    trace("I M in dummy");
    All other tests are dummy tests which just asserts(true, true).
    I am not sure if I doing something wrong or forgot to take care of something.

    Hi,
    I have flexunit project which I am trying to run on linux server.
    1. I have Tests project.
    2. I am trying to compile it on linux server and creating Tests.swf file and then executing Tests.swf using ant on 64 bit linux server using standalone flash debug player.
    3. Tests project contains 4 tests and first tests always fail with following error,
        test:
         [flexunit] Validating task attributes ...
         [flexunit] Generating default values ...
         [flexunit] Using default working dir [/mnt/build/VinitFlexUnitBranch/workspace/src/Tests]
         [flexunit] Using the following settings for the test run:
         [flexunit] FLEX_HOME: [/var/lib/flex4.1sdk]
         [flexunit] haltonfailure: [true]
         [flexunit] headless: [false]
         [flexunit] display: [99]
         [flexunit] localTrusted: [true]
         [flexunit] player: [flash]
         [flexunit] port: [1024]
         [flexunit] swf: [/mnt/build/VinitFlexUnitBranch/workspace/bin/Tests.swf]
         [flexunit] timeout: [60000ms]
         [flexunit] toDir: [/mnt/build/VinitFlexUnitBranch/workspace/src/Tests/report]
         [flexunit] Setting up server process ...
         [flexunit] Entry [/mnt/build/VinitFlexUnitBranch/workspace/bin] already available in local trust file at [/home/deploy/.macromedia/Flash_Player/#Security/FlashPlayerTrust/flexUnit.cfg].
         [flexunit] Executing 'gflashplayer' with arguments:
         [flexunit] '/mnt/build/VinitFlexUnitBranch/workspace/bin/Tests.swf'
         [flexunit]
         [flexunit] The ' characters around the executable and arguments are
         [flexunit] not part of the command.
         [flexunit]
         [flexunit] Starting server ...
         [flexunit] Opening server socket on port [1024].
         [flexunit] Waiting for client connection ...
         [flexunit] Client connected.
         [flexunit] Setting inbound buffer size to [262144] bytes.
         [flexunit] Receiving data ...
         [flexunit] Sending acknowledgement to player to start sending test data ...
         [flexunit]
         [flexunit] FlexUnit test pause in suite Tests.Classes.DummyASyncTest had errors.
         [flexunit]
         [flexunit] Stopping server ...
         [flexunit] End of test data reached, sending acknowledgement to player ...
         [flexunit] Closing client connection ...
         [flexunit] Closing server on port [1024] ...
         [flexunit] <testcase classname="Tests.Classes::DummyASyncTest" name="pause" time="8" status="error"><error message="Error #1009: Cannot access a property or method of a null object reference." type="Tests.Classes::DummyASyncTest.pause" ><![CDATA[TypeError: Error #1009: Cannot access a property or method of a null object reference.
         [flexunit] at org.fluint.uiImpersonation.flex::FlexEnvironmentBuilder/buildVisualTestEnvironment()
         [flexunit] at org.fluint.uiImpersonation::VisualTestEnvironmentBuilder/buildVisualTestEnvironment()
         [flexunit] at org.flexunit.internals.runners.watcher::FrameWatcher/getStage()
         [flexunit] at org.flexunit.internals.runners.watcher::FrameWatcher()
         [flexunit] at org.flexunit.internals.runners.statements::StackAndFrameManagement()
         [flexunit] at org.flexunit.runners::BlockFlexUnit4ClassRunner/withStackManagement()
         [flexunit] at org.flexunit.runners::BlockFlexUnit4ClassRunner/withDecoration()
         [flexunit] at org.flexunit.runners::BlockFlexUnit4ClassRunner/methodBlock()
         [flexunit] at org.flexunit.runners::BlockFlexUnit4ClassRunner/runChild()
         [flexunit] at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()
         [flexunit] at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )
         [flexunit] at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()
         [flexunit] at org.flexunit.runners::ParentRunner/run()
         [flexunit] at org.flexunit.runners::Suite/runChild()
         [flexunit] at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()
         [flexunit] at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )
         [flexunit] at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()
         [flexunit] at org.flexunit.runners::ParentRunner/run()
         [flexunit] at org.flexunit.runners::Suite/runChild()
         [flexunit] at org.flexunit.internals.runners::ChildRunnerSequencer/executeStep()
         [flexunit] at org.flexunit.internals.runners.statements::StatementSequencer/handleChildExecuteComplete( )
         [flexunit] at org.flexunit.internals.runners.statements::StatementSequencer/evaluate()
         [flexunit] at org.flexunit.runners::ParentRunner/run()
         [flexunit] at org.flexunit.runner::FlexUnitCore/beginRunnerExecution()
         [flexunit] at org.flexunit.runner::FlexUnitCore/verifyRunnerCanBegin()
         [flexunit] at org.flexunit.token::AsyncCoreStartupToken/sendReady()
         [flexunit] at org.flexunit.runner.notification.async::AsyncListenerWatcher/sendReadyNotification()
         [flexunit] at org.flexunit.runner.notification.async::AsyncListenerWatcher/handleListenerReady()
         [flexunit] at flash.events::EventDispatcher/dispatchEventFunction()
         [flexunit] at flash.events::EventDispatcher/dispatchEvent()
         [flexunit] at org.flexunit.listeners::CIListener/setStatusReady()
         [flexunit] at org.flexunit.listeners::CIListener/dataHandler()
         [flexunit] at flash.events::EventDispatcher/dispatchEventFunction()
         [flexunit] at flash.events::EventDispatcher/dispatchEvent()
         [flexunit] at flash.net::XMLSocket/scanAndSendEvent()]]></error></testcase>
         [flexunit] <endOfTestRun/>
         [flexunit] Analyzing reports ...
         [flexunit]
         [flexunit] Suite: Tests.Classes.DummyASyncTest
         [flexunit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.008 sec
         [flexunit]
         [flexunit] Results :
         [flexunit]
         [flexunit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.008 sec
         [flexunit]
        BUILD FAILED
        /mnt/build/VinitFlexUnitBranch/workspace/src/Tests/build.xml:26: FlexUnit tests failed during the test run.
        at org.flexunit.ant.tasks.TestRun.analyzeReports(Unknown Source)
        at org.flexunit.ant.tasks.TestRun.run(Unknown Source)
        at org.flexunit.ant.tasks.FlexUnitTask.execute(Unknown Source)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
        at org.apache.tools.ant.Main.runBuild(Main.java:809)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
        Total time: 1 second
    Exited with status 1
    [deploy]$
    4. Everytime I run this, any test which is run first will fail and all other tests will pass.
    My Tests.as file is as below:
    * Tests.as
    package
    import Tests.XTestSuite;
    import flash.display.Sprite;
    import mx.core.FlexSprite;
    import org.flexunit.listeners.CIListener;
    import org.flexunit.listeners.UIListener;
    import org.flexunit.runner.FlexUnitCore;
    public class Tests extends Sprite
    public var flexSprite:FlexSprite;
    public function Tests()
    onCreationComplete();
    public function onCreationComplete() : void {
    var core : FlexUnitCore = new FlexUnitCore();
    core.addListener(new CIListener());
    core.runClasses(Tests.XTestSuite);
    public function currentRunTestSuite():Array
    var testsToRun:Array = new Array();
    testsToRun.push(Tests.XTestSuite);
    return testsToRun;
    XTestSuite try to run 4 flexunit test classes.
    one of that flexunit test script class is as below:
    package Tests.Classes
    import flexunit.framework.Assert;
    import org.flexunit.Assert;
    import org.flexunit.asserts.assertEquals;
    public class DummyASyncTest
    [Test]
    public function pause() : void
    assertEquals(true, true);
    trace("I M in dummy");
    All other tests are dummy tests which just asserts(true, true).
    I am not sure if I doing something wrong or forgot to take care of something.

  • TypeError: Error #1009: Cannot access a property or method of a null object reference.      at FC_Home_A

    Dear Sir,
    I really need your valuable assistance i was about to finish a project but at very last moment i am stuck. Here is the explanation below...
    I have two files called "holder.swf" and "slide.swf" i want to improt the "slide.swf" using this action below
    var myLoader:Loader = new Loader();
    var url:URLRequest = new URLRequest("slide.swf");
    myLoader.load(url);
    addChild(myLoader);
    myLoader.x = 2;
    myLoader.y = 2;
    Also i have attached the flash file of "holder.swf". My concern is the moment i am calling the "slide.swf" inside the "holder.swf" it is showing the following error...
    " TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at FC_Home_Ads_Holder_v2_fla::MainTimeline() "
    Here are the files uploaded for your reference, please download this file http://www.touchpixl.com/ForumsAdobecom.zip
    This error is being occured from "MainTimeline.as" file here is the code been use inside of this file below....
    package FC_Home_Ads_Holder_v2_fla
        import __AS3__.vec.*;
        import adobe.utils.*;
        import com.danehansen.*;
        import com.greensock.*;
        import com.greensock.easing.*;
        import com.greensock.plugins.*;
        import flash.accessibility.*;
        import flash.desktop.*;
        import flash.display.*;
        import flash.errors.*;
        import flash.events.*;
        import flash.external.*;
        import flash.filters.*;
        import flash.geom.*;
        import flash.globalization.*;
        import flash.media.*;
        import flash.net.*;
        import flash.net.drm.*;
        import flash.printing.*;
        import flash.profiler.*;
        import flash.sampler.*;
        import flash.sensors.*;
        import flash.system.*;
        import flash.text.*;
        import flash.text.engine.*;
        import flash.text.ime.*;
        import flash.ui.*;
        import flash.utils.*;
        import flash.xml.*;
        public dynamic class MainTimeline extends flash.display.MovieClip
            public function MainTimeline()
                new Vector.<String>(6)[0] = "Productivity";
                new Vector.<String>(6)[1] = "Leadership";
                new Vector.<String>(6)[2] = "Execution";
                new Vector.<String>(6)[3] = "Education";
                new Vector.<String>(6)[4] = "Speed of Trust";
                new Vector.<String>(6)[5] = "Sales";
                super();
                addFrameScript(0, this.frame1);
                return;
            public function init():void
                var loc1:*=null;
                com.greensock.plugins.TweenPlugin.activate([com.greensock.plugins.Aut oAlphaPlugin]);
                loc1 = new flash.net.URLLoader(new flash.net.URLRequest(this.XML_LOC));
                var loc2:*;
                this.next_mc.buttonMode = loc2 = true;
                this.prev_mc.buttonMode = loc2;
                stage.scaleMode = flash.display.StageScaleMode.NO_SCALE;
                stage.align = flash.display.StageAlign.TOP_LEFT;
                loc1.addEventListener(flash.events.Event.COMPLETE, this.xmlLoaded, false, 0, true);
                this.prev_mc.addEventListener(flash.events.MouseEvent.CLICK, this.minusClick, false, 0, true);
                this.next_mc.addEventListener(flash.events.MouseEvent.CLICK, this.plusClick, false, 0, true);
                return;
            public function xmlLoaded(arg1:flash.events.Event):void
                var loc1:*=null;
                var loc2:*=0;
                this.xmlData = new XML(arg1.target.data);
                loc2 = 0;
                while (loc2 < this.LABELS.length)
                    loc1 = new Btn(this.LABELS[loc2], loc2);
                    this.btnHolder_mc.addChild(loc1);
                    this.BTNS.push(loc1);
                    trace(this.LABELS[loc2]);
                    ++loc2;
                this.current = uint(this.xmlData.@firstPick);
                trace("-----width-----");
                trace(this.contentMask.width);
                var loc3:*=this.contentMask.width / this.LABELS.length;
                trace(loc3);
                loc2 = 0;
                while (loc2 < this.BTNS.length)
                    this.BTNS[loc2].width = loc3;
                    this.BTNS[loc2].x = loc3 * loc2;
                    ++loc2;
                this.btnHolder_mc.addEventListener(flash.events.MouseEvent.CLICK, this.numClick, false, 0, true);
                this.selectMovie();
                return;
            public function numClick(arg1:flash.events.MouseEvent):void
                this.killTimer();
                this.current = arg1.target.i;
                this.selectMovie();
                return;
            public function killTimer():void
                this.timerGoing = false;
                if (this.timer)
                    this.timer.reset();
                    this.timer.addEventListener(flash.events.TimerEvent.TIMER, this.plusClick, false, 0, true);
                    this.timer = null;
                return;
            public function selectMovie():void
                if (this.timerGoing)
                    this.timer = new flash.utils.Timer(uint(this.xmlData.ad[com.danehansen.MyMath.modulo(t his.current, this.xmlData.ad.length())].@delay), 1);
                    this.timer.start();
                    this.timer.addEventListener(flash.events.TimerEvent.TIMER, this.plusClick, false, 0, true);
                while (this.holder_mc.numChildren > 0)
                    this.holder_mc.removeChild(this.holder_mc.getChildAt(0));
                var loc1:*=new flash.display.Loader();
                loc1.load(new flash.net.URLRequest(this.xmlData.ad[com.danehansen.MyMath.modulo(thi s.current, this.xmlData.ad.length())].@loc));
                this.holder_mc.addChild(loc1);
                var loc2:*=0;
                while (loc2 < this.BTNS.length)
                    this.BTNS[loc2].deselect();
                    ++loc2;
                this.BTNS[com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length())].select();
                var loc3:*=this.BTNS[com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length())].x + this.BTNS[com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length())].width / 2 + this.btnHolder_mc.x;
                trace("addLength:" + this.xmlData.ad.length());
                trace(loc3, com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length()));
                com.greensock.TweenLite.to(this.indicator_mc, 0.3, {"x":loc3, "ease":com.greensock.easing.Cubic.easeOut});
                loc1.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, this.adLoaded, false, 0, true);
                return;
            public function adLoaded(arg1:flash.events.Event):void
                var evt:flash.events.Event;
                var loc1:*;
                evt = arg1;
                try
                    evt.target.content.xmlData = this.xmlData.ad[com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length())];
                catch (er:Error)
                return;
            public function minusClick(arg1:flash.events.MouseEvent):void
                this.killTimer();
                var loc1:*;
                var loc2:*=((loc1 = this).current - 1);
                loc1.current = loc2;
                this.selectMovie();
                return;
            public function plusClick(arg1:flash.events.Event):void
                if (arg1.type != "timer")
                    this.killTimer();
                var loc1:*;
                var loc2:*=((loc1 = this).current + 1);
                loc1.current = loc2;
                this.selectMovie();
                trace("next");
                return;
            public function ENDED(arg1:flash.events.Event):void
                if (arg1.type != "timer")
                    this.killTimer();
                var loc1:*;
                var loc2:*=((loc1 = this).current + 1);
                loc1.current = loc2;
                this.selectMovie();
                trace("next");
                return;
            public function STARTED(arg1:flash.events.Event):void
                this.killTimer();
                return;
            function frame1():*
                this.timerGoing = true;
                addEventListener("endNow", this.ENDED, false, 0, true);
                addEventListener("startNow", this.STARTED, false, 0, true);
                this.init();
                return;
            public const XML_LOC:String=stage.loaderInfo.parameters.xmlLoc ? stage.loaderInfo.parameters.xmlLoc : "home_ads.xml";
            public const LABELS:__AS3__.vec.Vector.<String>=new Vector.<String>(6);
            public const BTNS:__AS3__.vec.Vector.<Btn>=new Vector.<Btn>();
            public const TRANSITION_TIME:Number=0.2;
            public var contentMask:flash.display.MovieClip;
            public var btnHolder_mc:flash.display.MovieClip;
            public var holder_mc:flash.display.MovieClip;
            public var indicator_mc:flash.display.MovieClip;
            public var prev_mc:flash.display.MovieClip;
            public var next_mc:flash.display.MovieClip;
            public var current:int;
            public var xmlData:XML;
            public var timer:flash.utils.Timer;
            public var timerGoing:Boolean;
    Here is the folder uploaded on the server for you to get clear picture, please click on this link to download the entire folder. http://www.touchpixl.com/ForumsAdobecom.zip
    I am not being able to resolve the issue, it needs a master to get the proper solution. I would request you to help me.
    Thanks & Regards
    Sanjib Das

    Here is the entire code of MainTimeline.as below, please correct it.
    package FC_Home_Ads_Holder_v2_fla
        import __AS3__.vec.*;
        import adobe.utils.*;
        import com.danehansen.*;
        import com.greensock.*;
        import com.greensock.easing.*;
        import com.greensock.plugins.*;
        import flash.accessibility.*;
        import flash.desktop.*;
        import flash.display.*;
        import flash.errors.*;
        import flash.events.*;
        import flash.external.*;
        import flash.filters.*;
        import flash.geom.*;
        import flash.globalization.*;
        import flash.media.*;
        import flash.net.*;
        import flash.net.drm.*;
        import flash.printing.*;
        import flash.profiler.*;
        import flash.sampler.*;
        import flash.sensors.*;
        import flash.system.*;
        import flash.text.*;
        import flash.text.engine.*;
        import flash.text.ime.*;
        import flash.ui.*;
        import flash.utils.*;
        import flash.xml.*;
        public dynamic class MainTimeline extends flash.display.MovieClip
            public function MainTimeline()
                new Vector.<String>(6)[0] = "Productivity";
                new Vector.<String>(6)[1] = "Leadership";
                new Vector.<String>(6)[2] = "Execution";
                new Vector.<String>(6)[3] = "Education";
                new Vector.<String>(6)[4] = "Speed of Trust";
                new Vector.<String>(6)[5] = "Sales";
                super();
                addFrameScript(0, this.frame1);
                return;
            public function init():void
                var loc1:*=null;
                com.greensock.plugins.TweenPlugin.activate([com.greensock.plugins.AutoAlphaPlugin]);
                loc1 = new flash.net.URLLoader(new flash.net.URLRequest(this.XML_LOC));
                var loc2:*;
                this.next_mc.buttonMode = loc2 = true;
                this.prev_mc.buttonMode = loc2 = true;
                stage.scaleMode = flash.display.StageScaleMode.NO_SCALE;
                stage.align = flash.display.StageAlign.TOP_LEFT;
                loc1.addEventListener(flash.events.Event.COMPLETE, this.xmlLoaded, false, 0, true);
                this.prev_mc.addEventListener(flash.events.MouseEvent.CLICK, this.minusClick, false, 0, true);
                this.next_mc.addEventListener(flash.events.MouseEvent.CLICK, this.plusClick, false, 0, true);
                return;
            public function xmlLoaded(arg1:flash.events.Event):void
                var loc1:*=null;
                var loc2:*=0;
                this.xmlData = new XML(arg1.target.data);
                loc2 = 0;
                while (loc2 < this.LABELS.length)
                    loc1 = new Btn(this.LABELS[loc2], loc2);
                    this.btnHolder_mc.addChild(loc1);
                    this.BTNS.push(loc1);
                    trace(this.LABELS[loc2]);
                    ++loc2;
                this.current = uint(this.xmlData.@firstPick);
                trace("-----width-----");
                trace(this.contentMask.width);
                var loc3:*=this.contentMask.width / this.LABELS.length;
                trace(loc3);
                loc2 = 0;
                while (loc2 < this.BTNS.length)
                    this.BTNS[loc2].width = loc3;
                    this.BTNS[loc2].x = loc3 * loc2;
                    ++loc2;
                this.btnHolder_mc.addEventListener(flash.events.MouseEvent.CLICK, this.numClick, false, 0, true);
                this.selectMovie();
                return;
            public function numClick(arg1:flash.events.MouseEvent):void
                this.killTimer();
                this.current = arg1.target.i;
                this.selectMovie();
                return;
            public function killTimer():void
                this.timerGoing = false;
                if (this.timer)
                    this.timer.reset();
                    this.timer.addEventListener(flash.events.TimerEvent.TIMER, this.plusClick, false, 0, true);
                    this.timer = null;
                return;
            public function selectMovie():void
                if (this.timerGoing)
                    this.timer = new flash.utils.Timer(uint(this.xmlData.ad[com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length())].@delay), 1);
                    this.timer.start();
                    this.timer.addEventListener(flash.events.TimerEvent.TIMER, this.plusClick, false, 0, true);
                while (this.holder_mc.numChildren > 0)
                    this.holder_mc.removeChild(this.holder_mc.getChildAt(0));
                var loc1:*=new flash.display.Loader();
                loc1.load(new flash.net.URLRequest(this.xmlData.ad[com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length())].@loc));
                this.holder_mc.addChild(loc1);
                var loc2:*=0;
                while (loc2 < this.BTNS.length)
                    this.BTNS[loc2].deselect();
                    ++loc2;
                this.BTNS[com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length())].select();
                var loc3:*=this.BTNS[com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length())].x + this.BTNS[com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length())].width / 2 + this.btnHolder_mc.x;
                trace("addLength:" + this.xmlData.ad.length());
                trace(loc3, com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length()));
                com.greensock.TweenLite.to(this.indicator_mc, 0.3, {"x":loc3, "ease":com.greensock.easing.Cubic.easeOut});
                loc1.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, this.adLoaded, false, 0, true);
                return;
            public function adLoaded(arg1:flash.events.Event):void
                var evt:flash.events.Event;
                var loc1:*;
                evt = arg1;
                try
                    evt.target.content.xmlData = this.xmlData.ad[com.danehansen.MyMath.modulo(this.current, this.xmlData.ad.length())];
                catch (er:Error)
                return;
            public function minusClick(arg1:flash.events.MouseEvent):void
                this.killTimer();
                var loc1:*;
                var loc2:*=((loc1 = this).current - 1);
                loc1.current = loc2;
                this.selectMovie();
                return;
            public function plusClick(arg1:flash.events.Event):void
                if (arg1.type != "timer")
                    this.killTimer();
                var loc1:*;
                var loc2:*=((loc1 = this).current + 1);
                loc1.current = loc2;
                this.selectMovie();
                trace("next");
                return;
            public function ENDED(arg1:flash.events.Event):void
                if (arg1.type != "timer")
                    this.killTimer();
                var loc1:*;
                var loc2:*=((loc1 = this).current + 1);
                loc1.current = loc2;
                this.selectMovie();
                trace("next");
                return;
            public function STARTED(arg1:flash.events.Event):void
                this.killTimer();
                return;
            function frame1():*
                this.timerGoing = true;
                addEventListener("endNow", this.ENDED, false, 0, true);
                addEventListener("startNow", this.STARTED, false, 0, true);
                this.init();
                return;
            public const XML_LOC:String=stage.loaderInfo.parameters.xmlLoc ? stage.loaderInfo.parameters.xmlLoc : "home_ads.xml";
            public const LABELS:__AS3__.vec.Vector.<String>=new Vector.<String>(6);
            public const BTNS:__AS3__.vec.Vector.<Btn>=new Vector.<Btn>();
            public const TRANSITION_TIME:Number=0.2;
            public var contentMask:flash.display.MovieClip;
            public var btnHolder_mc:flash.display.MovieClip;
            public var holder_mc:flash.display.MovieClip;
            public var indicator_mc:flash.display.MovieClip;
            public var prev_mc:flash.display.MovieClip;
            public var next_mc:flash.display.MovieClip;
            public var current:int;
            public var xmlData:XML;
            public var timer:flash.utils.Timer;
            public var timerGoing:Boolean;

  • Adobe Air + Box2D.swc = TypeError: Error #1009 // New way to handle .swc files in Flash for iOS Apps?

    Hi,
    I need your help please - I have to update one of my iOS Apps. In this App I use Box2d for a simple maze game (it's an app for kids). When I publish & test this game on my Mac it works fine. I can drag my Hero (fish) through this Maze and all collision detections, gravity etc. work perfect.
    When I test it on my iPad it doesn't work. The device debugger shows this error message:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at global$init()
      at global$init()
      at Box2DAS.Common::b2Base$/initialize()[/Users/jan/Documents/_Projekte/Spielplatz/Universal_ Retina/src/com/Box2DAS/Common/b2Base.as:31]
      at wck::WCK/create()[/Users/jan/Documents/_Projekte/Spielplatz/Universal_Retina/src/com/wck/ WCK.as:26]
      at misc::Entity/ensureCreated()[/Users/jan/Documents/_Projekte/Spielplatz/Universal_Retina/s rc/com/misc/Entity.as:50]
      at misc::Entity/handleAddedToStage()[/Users/jan/Documents/_Projekte/Spielplatz/Universal_Ret ina/src/com/misc/Entity.as:100]
      at misc::Entity/handleAddedToStage()
    Line 31: loader = new CLibInit();
    I guess "CLibInit" should come from the .swc file.
    The thing is:
    I didn't change anything in this maze game - it seems this has to do something with the new Flash and/or Adobe Air version. Box2D.swc file is included:
    It always worked like this - and it works when testing it on my Mac - but it is no longer working on my current system.
    So I started my Mac from an older system (10.9.5 on an external HD) and published the App from Flash CS6 and Adobe Air 13.0 - then it suddenly worked on my iPad as before. I was able to tap an the fish and drag it arround.
    The same project / app published from my current OS X 10.10 + Flash CC 2014 + Adobe Air 15.0.0.302 is not working. I always receive this Error Message - I can not drag the fish - nothing happens. And I have no idea why this happens and what else I could do. I searched the whole day for a solution but didn't find anything.
    So did anything change by the way Flash and/or Air handles .swc files? Is there an other way to include: import cmodule.Box2D.* / CLibInit ?
    Please - if anyone has a clue - please let me know!!
    Best regards
    Jan

    Update:
    There is also an Android Version of this App. I just published and tested a new version of it on my kindle fire & Samsung Galaxy Tab 2. On both Tablets the maze works perfect. I'm able to drag the fish around etc.
    Then I published this Android Version for iOS and tested it on my iPad. Again I'm getting the Error message:
    TypeError: Error #1009: Cannot access a property or method of a null object reference. 
      at global$init() 
      at global$init() 
      at Box2DAS.Common::b2Base$/initialize()[/Users/jan/Documents/_Projekte/Spielplatz/Universal_ Retina/src/com/Box2DAS/Common/b2Base.as:31] 
      at wck::WCK/create()[/Users/jan/Documents/_Projekte/Spielplatz/Universal_Retina/src/com/wck/ WCK.as:26] 
      at misc::Entity/ensureCreated()[/Users/jan/Documents/_Projekte/Spielplatz/Universal_Retina/s rc/com/misc/Entity.as:50] 
      at misc::Entity/handleAddedToStage()[/Users/jan/Documents/_Projekte/Spielplatz/Universal_Ret ina/src/com/misc/Entity.as:100] 
      at misc::Entity/handleAddedToStage
    ...and the fish is stuck - I can't drag it - nothing happens. So this error only occurs when I publish the App for iOS - as an .ipa. Did anything change in the way Air handles .swc files?
    I'm totally confused
    If anybody has an idea what I could try - PLEASE LET ME KNOW!!

  • Error#1009. Actionscript error in Flash Game I'm making...

    Hi,
    I'm making a Flash game and rather than putting all the AS3 on a seperate .as file, I'm throwing it on the timeline, which may or may not be a mistake since this game is getting really big, really fast and messy.
    And so I'm getting this error when I test:
    TypeError: Error #1009: Cannot access a property or method of a null object reference at GameBeta_MainTimeline_fla::MainTimeline/frame1()
    From what I've read on this error, it refers to something that isn't instantiated yet, like something that's out of order? Like I'm referring to something that doesn't exist at the point in time that I'm referring to it? So I'm looking at my AS3 and have NO idea. Here is what I have written:
    stop();
    //TITLE PAGE
    play_game.addEventListener(MouseEvent.CLICK, startgame)
    function startgame(evt:MouseEvent):void
        gotoAndStop("Name Input");
    //Name and Gender input page
    var userName:String;
    inputField.addEventListener(Event.CHANGE, onInput)
    function onInput(e:Event):void
         outputField.text = "So your name is " + inputField.text + " are you sure?";
         userName = inputField.text;
    confirm_input.addEventListener(MouseEvent.CLICK, toCreationpg)
    function toCreationpg(evt:MouseEvent):void
        gotoAndStop("Fem Creation");
        outputField.text = "So your name is "+ userName;
    //Character Creation Page
    readytostart.addEventListener(MouseEvent.CLICK, firstscene_plz)
    function firstscene_plz(evt:MouseEvent):void
        gotoAndStop("Day03");
        outputField.text = "Let's make your character, "+ userName;
    So, any ideas as to why I'm getting this error?
    Before I had each page with it's own Actionscript and buttons inside their own movieclips on the timeline. That was getting confusing so I took everything out of the movieclips to place everything on one timeline and have one layer of Actionscript hoping to simplify things and find the problem easier. No luck. It's supposed to have a Title page and a button that goes to the 2nd page where you input your name, and while you type, it shows your name before you confirm by hitting another button that finally goes to the Character Creation page. When I test, I just get that Error#1009, it'll get to the 2nd page for the name input, but the text fields act wacky and the button to proceed isn't working. I'm hoping that when I find the source of this error, the rest will be fixed as well.
    Thanks in advance for any advice offered! I'll greatly appreciate it.

    Yeah, that's what makes me even more confused. I have a seperate file where I'm testing the name input mechanics alone, just using this piece of actionscript, one input box with an instance inputField and a dynamic box outputField, a button, instance enter_name, that confirms and repeats the input on the next page. And it works.
    inputField.addEventListener(Event.CHANGE, onInput)
    var userName:String;
    function onInput(e:Event):void
         outputField.text = "You typed " + inputField.text;
         userName = inputField.text;
    enter_name.addEventListener(MouseEvent.CLICK, onClick)
    function onClick(evt:MouseEvent):void
        gotoAndStop("frame two");
        outputField.text = "So your name is "+ userName;
    So I don't get the error with that seperate file so could it be that other things are conflicting with this? Perhaps the order in which I've written my actionscript or the way I've organized my frames? In my other file, it says it's the inputField Event Listener but it'll work when I take out all the other frames and script...

  • Runtime Error 1009 After Converting from Flex 3.6 to 4.5.1

    I am in the process of converting my application from SDK 3.6 to 4.5.1.  The process is going smoothly thanks to the many resources out there including Greg Lafrance's series http://www.adobe.com/devnet/flex/articles/migrating-flex-apps-part1.html
    I am now getting an error while the application is loading in the browser.  The error text is:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at main/initApp()...
    The error occurs in the AS code where I am attempting to get the URL from the player using the mx.utils.URLUtil library.  In particular, I am setting a global variable in my app to the URL of the visitor.  The specific code for this is:
    this.stServerName=URLUtil.getServerName(mainApp.url);
    Is URLUtil still in use in Flex 4.5.1?  If not, is there another way to get the server name from the host?
    Thanks!
    Lee

    URLUtil still exists.  I would verify what is null.

  • Could somebody explain why I am getting this Error #1009 message?

    Hi. I am following a tutorial on lynda.com in hopes of learning how to use actionscript 3.0 and my copy of flash CS4 to create games. I wrote my code exactly like it showed in the tutorial, but for some reason I will occasionally receive an error that says
    "TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at Monster/die()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at fl.motion::AnimatorBase/end()
    at fl.motion::AnimatorBase/handleLastFrame()
    at fl.motion::AnimatorBase/nextFrame()
    at fl.motion::AnimatorBase/handleEnterFrame()"
    It doesn't happen all the time but it will every once in a while. There doesn't really seem to be anything specifically that triggers it either. I also happened to notice that not all of the enemies respond to being clicked on. I don't know if these two things are related or not. I don't know if the error is caused by the code for the monster library item or the code for the main timeline. Thank you in advance for looking at my code.
    This is my code for the monster library item:
    import fl.motion.Animator;
    import fl.motion.MotionEvent;
    var this_xml:XML = <Motion duration="30" xmlns="fl.motion.*" xmlns:geom="flash.geom.*" xmlns:filters="flash.filters.*">
    <source>
      <Source frameRate="10" x="275" y="200" scaleX="1" scaleY="1" rotation="0" elementType="movie clip" symbolName="monster">
       <dimensions>
        <geom:Rectangle left="-32.5" top="-32.95" width="65.05" height="65.95"/>
       </dimensions>
       <transformationPoint>
        <geom:Point x="0.49961568024596464" y="0.49962092494313876"/>
       </transformationPoint>
      </Source>
    </source>
    <Keyframe index="0" tweenSnap="true" tweenSync="true">
      <tweens>
       <SimpleEase ease="0"/>
      </tweens>
    </Keyframe>
    <Keyframe index="29" tweenSnap="true" tweenSync="true" scaleX="2.782" scaleY="2.697">
      <tweens>
       <SimpleEase ease="0"/>
      </tweens>
    </Keyframe>
    </Motion>;
    var this_animator:Animator = new Animator(this_xml, this);
    this_animator.play();
    this_animator.addEventListener(MotionEvent.MOTION_END, hurtPlayer);
    function hurtPlayer(MotionEvent):void
    var main:MovieClip = MovieClip(this.parent.parent);
    main.decreaseEnergy();
    this.parent.removeChild(this);
    this.addEventListener(MouseEvent.CLICK, killMonster);
    function killMonster(event:MouseEvent):void
    this_xml = <Motion duration="5" xmlns="fl.motion.*" xmlns:geom="flash.geom.*" xmlns:filters="flash.filters.*">
    <source>
      <Source frameRate="10" x="275" y="200" scaleX="1" scaleY="1" rotation="0" elementType="movie clip" symbolName="monster" class="Monster">
       <dimensions>
        <geom:Rectangle left="-32.5" top="-32.95" width="65.05" height="65.95"/>
       </dimensions>
       <transformationPoint>
        <geom:Point x="0.49961568024596464" y="0.49962092494313876"/>
       </transformationPoint>
      </Source>
    </source>
    <Keyframe index="0" rotateDirection="cw" rotateTimes="1" tweenSnap="true" tweenSync="true">
      <tweens>
       <SimpleEase ease="0"/>
      </tweens>
    </Keyframe>
    <Keyframe index="4" rotateDirection="cw" rotateTimes="1" tweenSnap="true" tweenSync="true" scaleX="0.416" scaleY="0.378">
      <color>
       <Color alphaMultiplier="0"/>
      </color>
      <tweens>
       <SimpleEase ease="0"/>
      </tweens>
    </Keyframe>
    </Motion>;
    this_animator = new Animator(this_xml, this);
    this_animator.play();
    this_animator.addEventListener(MotionEvent.MOTION_END, die);
    function die(event:MotionEvent):void
    var main:MovieClip = MovieClip(this.parent.parent);
    main.increaseScore();
    this_animator.removeEventListener(MotionEvent.MOTION_END, hurtPlayer);
    this.parent.removeChild(this);
    This is my code for the main timeline:
    var monstersInGame:uint;
    var monsterMaker:Timer;
    var container_mc:MovieClip;
    var cursor:MovieClip;
    var score:int;
    var energy:int;
    function initializeGame():void
    monstersInGame = 10;
    monsterMaker = new Timer(1000, monstersInGame);
    container_mc = new MovieClip;
    addChild(container_mc);
    monsterMaker.addEventListener(TimerEvent.TIMER, createMonsters);
    monsterMaker.start();
    cursor = new Cursor();
    addChild(cursor);
    cursor.enabled = false;
    Mouse.hide();
    stage.addEventListener(MouseEvent.MOUSE_MOVE, dragCursor);
    score = 0;
    energy = energy_mc.totalFrames;
    energy_mc.gotoAndStop(energy);
    function dragCursor(event:MouseEvent):void
    cursor.x = this.mouseX;
    cursor.y = this.mouseY;
    function createMonsters(event:TimerEvent):void
    var monster:MovieClip;
    monster = new Monster();
    monster.x = Math.random() * stage.stageWidth;
    monster.y = Math.random() * stage.stageHeight;
    container_mc.addChild(monster);
    function increaseScore():void
    score ++;
    if(score >= monstersInGame)
      monsterMaker.stop();
    function decreaseEnergy():void
    energy --;
    if(energy <= 0)
      monsterMaker.stop();
    else
      energy_mc.gotoAndStop(energy);
    initializeGame();

    Ok. Apparently, I didn't test it enought times to get the error. I went back and tested it again to get the error. When I did this, the
    trace(this); revealed [object Monster]
    and
    trace(this.parent); revealed [object MovieClip].
    The only one that was different was the one that gave the error. For that one the
    trace(this); revealed [object Monster]
    and
    trace(this.parent); revealed null.
    Then it gave all of the error information.

  • Error 1009 - TypeError: Error #1009: Cannot access a property or method of a null object reference.

    hello,
    I am trying to load a menu as an external file ....  and getting this :  TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at com::menu()
    here is my code:
    if(!menuLoader){   
    var menuRequest:URLRequest = new URLRequest("menu.swf");
    var menuLoader:Loader = new Loader();
    menuLoader.load(menuRequest);
    container.addChild(menuLoader);
    menuLoader.x = 700;
    menuLoader.y = 50;
    can anyone give me a helping hand?
    thanks in advance.

    use:
    here is my code:
    if(menuLoader!=null){   
    var menuRequest:URLRequest = new URLRequest("menu.swf");
    var menuLoader:Loader = new Loader();
    menuLoader.load(menuRequest);
    container.addChild(menuLoader);
    menuLoader.x = 700;
    menuLoader.y = 50;

  • Error #1009 at mx.controls::DataGrid/mx.controls:DataGrid::mouseUpHandler()

    Hello.
    At first sorry for my english.
    I have encountered problem with DataGrid control.
    There is DataGrid control, which have custom ItemRenderer
    (MulticolorDataGridItemRenderer).
    This DataGrid control has several properties:
    1) click on a row changes it background color
    2) click on "Filter ON" button, filter DataGrid by "status"
    field
    "TypeError: Error #1009: Cannot access a property or method
    of a null object reference.
    at
    mx.controls::DataGrid/mx.controls:DataGrid::mouseUpHandler()"
    This error occure when filter is ON, by click on a row. It
    occures occasionally. I note that it
    occur when DataGrid's vertical scrollbar is not in top
    position.
    If I remove recovering of scroll position, this bug
    disappear.
    Sample code:
    ~~~~~~~~~~~~
    1. Application mxml:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.controls.List;
    private var objPrevSelectedItem:Object = null;
    private var arrList:Array = [{name: "Matt", lastname:
    "Chotin", status: "0", selected: "0"},
    {name: "Ely", lastname: "Greenfield", status: "1", selected:
    "0"},
    {name: "Christophe", lastname: "Coenraets", status: "2",
    selected: "0"},
    {name: "Sho", lastname: "Kuwamoto", status: "1", selected:
    "0"},
    {name: "Steven", lastname: "Webster", status: "4", selected:
    "0"},
    {name: "Alistair", lastname: "McLeod", status: "3",
    selected: "0"},
    {name: "Chafic", lastname: "Kazoun", status: "1", selected:
    "0"},
    {name: "Manish", lastname: "Jethani", status: "2", selected:
    "0"},
    {name: "Mike", lastname: "Chambers", status: "4", selected:
    "0"},
    {name: "Ted", lastname: "Patrick", status: "0", selected:
    "0"},
    {name: "Roger", lastname: "Gonzales", status: "1", selected:
    "0"},
    {name: "David", lastname: "Zuckerman", status: "3",
    selected: "0"},
    {name: "Alex", lastname: "Uhlmann", status: "3", selected:
    "0"},
    {name: "Peter", lastname: "Ent", status: "3", selected:
    "0"},
    {name: "Adobe", lastname: "Consulting", status: "2",
    selected: "0"},
    {name: "Marcel", lastname: "Boucher", status: "4", selected:
    "0"},
    {name: "Andrew", lastname: "Trice", status: "1", selected:
    "0"},
    {name: "Mike", lastname: "Morearty", status: "1", selected:
    "0"},
    {name: "Everything", lastname: "Flex", status: "0",
    selected: "0"},
    {name: "Jesse", lastname: "Warden", status: "3", selected:
    "0"},
    {name: "Richinternet", lastname: "Blog", status: "2",
    selected: "0"},
    {name: "Flex", lastname: "Daddy", status: "2", selected:
    "0"},
    {name: "Keun", lastname: "Lee", status: "0", selected: "0"},
    {name: "David", lastname: "Koletta", status: "4", selected:
    "0"},
    {name: "Brian", lastname: "Deitte", status: "1", selected:
    "0"},
    {name: "Darron", lastname: "Schal", status: "2", selected:
    "0"},
    {name: "Narciso", lastname: "Jaramillo", status: "3",
    selected: "0"},
    {name: "Kiwi", lastname: "Teamblog", status: "4", selected:
    "0"},
    {name: "Anthony", lastname: "Rumsey", status: "0", selected:
    "0"}];
    [Bindable]
    private var arrcollDP:ArrayCollection = new
    ArrayCollection(arrList);
    private function fnSelectRow(event:Event):void
    if (objPrevSelectedItem != null)
    objPrevSelectedItem["selected"] = new String("0");
    ArrayCollection(DataGrid(event.target).dataProvider).itemUpdated(objPrevSelectedItem);
    var numScrolPos:Number =
    DataGrid(event.target).verticalScrollPosition;
    Object(DataGrid(event.target).selectedItem)["selected"] =
    new String("1");
    ArrayCollection(DataGrid(event.target).dataProvider).itemUpdated(DataGrid(event.target).s electedItem);
    objPrevSelectedItem =
    Object(DataGrid(event.target).selectedItem);
    if (arrcollDP.filterFunction != null)
    arrcollDP.filterFunction = fnFilter;
    arrcollDP.refresh();
    DataGrid(event.target).verticalScrollPosition = numScrolPos;
    private function fnFilter(item:Object):Boolean
    var bResult:Boolean = new Boolean(false);
    if (String(item["status"]) == "0")
    bResult = true;
    return bResult;
    ]]>
    </mx:Script>
    <mx:DataGrid
    width="100%"
    height="100"
    dataProvider="{arrcollDP}"
    itemRenderer="MulticolorDataGridItemRenderer"
    draggableColumns="false"
    rowHeight="17"
    paddingTop="1"
    paddingBottom="1"
    horizontalGridLineColor="#a0a0a0"
    horizontalGridLines="true"
    change="fnSelectRow(event)">
    <mx:columns>
    <mx:DataGridColumn headerText="Name" dataField="name"
    width="250" textAlign="left" sortable="false"/>
    <mx:DataGridColumn headerText="Last Name"
    dataField="lastname" width="250" textAlign="left"
    sortable="false"/>
    <mx:DataGridColumn headerText="Status" dataField="status"
    width="80" textAlign="center" sortable="false"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:Button label="Filter ON" y="110" x="5"
    click="arrcollDP.filterFunction = fnFilter;
    arrcollDP.refresh();"/>
    <mx:Button label="Filter OFF" y="110" x="105"
    click="arrcollDP.filterFunction = null; arrcollDP.refresh();"/>
    </mx:Application>
    2. MulticolorDataGridItemRenderer component mxml:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:DataGridItemRenderer xmlns:mx="
    http://www.adobe.com/2006/mxml"
    background="true" dataChange="fnChangeColor(event);">
    <mx:Script>
    <![CDATA[
    import mx.controls.dataGridClasses.DataGridColumn;
    import mx.events.FlexEvent;
    import mx.controls.Alert;
    private function fnChangeColor(event:FlexEvent):void
    if (Object(this.data) != null)
    if (!(this.data is DataGridColumn))
    var strTmp:String = String(Object(this.data)["status"]);
    if (strTmp == "0")
    this.backgroundColor = 0xccffcc;
    else if (strTmp == "1")
    this.backgroundColor = 0xffff99;
    else if (strTmp == "2")
    this.backgroundColor = 0x99ccff;
    else if (strTmp == "3")
    this.backgroundColor = 0xffcc99;
    else if (strTmp == "4")
    this.backgroundColor = 0xcc66ff;
    if (String(Object(this.data)["selected"]) == "1")
    this.backgroundColor = 0xff9933;
    ]]>
    </mx:Script>
    </mx:DataGridItemRenderer>
    And one another question: why did disappear standard DataGrid
    control selection mechanism, when I used custom
    DataGridItemRenderer? Try to use the sample code above withou
    fnSelectRow function.
    TIA

    Hi, I will try to explain what i have undestood about this issue.
    I have an application that loads at runtime some modules, and in my project configuration (Flex Modules), i specified some modules to compile optimizing to main application. Besides that, my project uses RSL to the framework linkage, and i perceived that the compiler output reports some warning messages just like "The CSS type selector 'DataGrid' was not processed, because the type was not used in the application." or others similars "The CSS type selector 'TextArea' was not processed, because the type was not used in the application.".
    When i run the application, and click the first time in some grid column, the error "Type Coercion failed: cannot convert ......@abcda2 to ........." happens.
    It happens because, these controls or components has not been linked in the main application compilation, and so, when you use the first module that uses one of these components, only the module loads an instance of these components and maintain on its part of memory.
    Dispite of being loaded in the main application, each module and main application has its SystemManager instance to register and load components, and because of it, when the application try to cast instances of the same component, but at differents SystemManager's singleton implementations, the above error occurs.
    So my solution was to add some reference of the controls or components that appears at the warning messages that was not compiled, to force the main application compilation to add these components at its SystemManager singletons first than any module.
    Only add the name of the component and import its package. Do not have to add to the stage. See below.
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" ....>
    <mx:Script>
            <![CDATA[
                        DataGrid;
                        TextArea;
            ]]>
        </mx:Script>
    </mx:Application>

Maybe you are looking for

  • RAM Memory Usage

    we are using FMS 4.03 over a 2-4 day period or RAM usage goes from after reboot 15% to 90% the server has 32Gb of RAM we have many people streaming from the server how can I reduce RAM usage without compromising stream quality any suggestions?

  • HT5035 transfer account balance to another account

    I downloaded gift card to account I no longer use and want to transfer balance to current account, can this be done?

  • PSE 4.0 Compatibility with CS3?

    Simple question from a newbie. . . Are .psd files from CS3 downward comaptible with PSE 4.0?

  • Evaluate Open Source Jar

    Thanks for reading. How can I evaluate an open source jar?

  • When opening Firefox, all I get is the Mozilla Crash Reporter

    Clicking on Firefox icon takes me directly to the Mozilla Crash Reporter. Restarting and exiting have no effect. The "report" has been submitted numerous times with no response - have no crash ID assigned == User Agent == Mozilla/4.0 (compatible; MSI