1009 Error (Null Object Call) Flash CS4

Hi All
I'm very new to Flash (this is my first attempt) and am trying to figure out how to deal with this error I'm getting.
The code is supposed to animate a flyout menu on a mouse hover event.
I'm actually surprised I have made it this far before getting stumped.
Please help, My brain hurts. 
Here is my code:
import fl.transitions.Tween;
import fl.transitions.easing.*;
var FishingSub_mc:MovieClip = FishingSub_mc;
var Fishing_btn:SimpleButton = Fishing_btn;
function FishingFlyout (event:MouseEvent):void
    var FishingTween:Tween = new Tween (FishingSub_mc,"y",Regular.easeOut,0,40,20,false);
    Fishing_btn.addEventListener(MouseEvent.MOUSE_OVER,FishingFlyout);
And here is the error I'm getting:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at menu_fla::MainTimeline/frame1()[menu_fla.MainTimeline::frame1:12]
Thanks for your help.
Dave

I am not sure why you have these two lines...
var FishingSub_mc:MovieClip = FishingSub_mc;
var Fishing_btn:SimpleButton = Fishing_btn;
If those two objects are items on your stage, then you should not need those lines of code at all. The important thing is to be sure that you have the instance names assigned to the objects.  Whichever object is being targeted on line 12 is out of scope when that code executes.
Some of the possible reasons...
- the object doesn't have the instance name assigned to it
- the object animates into the movie and does not have that instance name assigned at each keyframe
- the object is somewhere down a timeline when that code executes

Similar Messages

  • Is it possible to use 3D objects in Flash CS4 for animation?

    Hi,
    Is it possible to use 3D objects created in 3D Max, Blendor, iClone etc. to perform animation to make Flash Movie more realistic? Can I make nice animations like in iClone 4 Software?
    If it is possible to use 3D Objects in Flash, please provide a sample Tutorial Link if you have any.
    Thanks in advance.

    Here are some links to 3d tutorils which u might find useful
    http://www.adobe.com/devnet/flash/3d_animation.html
    http://www.adobe.com/designcenter/flash/articles/lrvid4059_fl.html
    http://www.flashandmath.com/flashcs4/
    http://www.kirupa.com/developer/flashcs4/intro_3d_flashcs4_pg1.htm

  • Rotate an Object in Flash CS4

    Hi everybody,
    I'm new to flash and would like to animate-spin the
    navigation buttons on a website. I thought that if I created the
    object and then moved down on the timeline and rotated it with the
    3d rotation tool, that would do the trick, but it doesn't work when
    i test the movie. Can someone tell me how to animate the object (in
    this case, the button is saved as a movie clip) so that it spins
    around? i tried this tutorial (
    http://www.flashvault.net/tutorial.asp?ID=73),
    but got multiple errors on the action script code.
    Second, there will be 4 nav buttons in all on the site,
    what's the best way to create the navbar? Do I try to create
    individual flash files for each button and insert into dreamweaver
    separately or is there a better way to create the entire nav bar in
    flash and then bring that into dreamweaver?
    Thanks,
    Veronica

    This is one of those cases where you really need to learn
    ActionScript, which takes time..
    Here's a better tutorial that should get you further..
    http://www.wuup.co.uk/as3-basics-rotate-a-movieclip-with-actionscript-30/

  • Error instantiate font in flash cs4

    have you ever seen this error?
    Image error
    how can I fix?
    tanks

    I should probably add that i'm using a vista 64bit pc

  • Error null object

    Hello, I have two components, and I want to initialize one variable in one component and do variable++ in the other component and trace the number. These are the two components:
    MyComponent:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="150" height="35">
       <mx:Script>
          <![CDATA[
            public var _idAccount:Number=1;
          ]]>
       </mx:Script>
    </mx:Canvas>
    MyComponent2:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="100" height="20" xmlns:comp="comp.*">
    <mx:Script>
            <![CDATA[
            public var mc:MyComponent;
              public var number:Number = mc._idAccount;
            public function plus():void {
                   trace(number);
                   number++;
            ]]>
    </mx:Script>
        <mx:Button id="button" label="++" click="plus()" width="100%" height="100%"/>
    </mx:Canvas>
    It don't have to be exactly like in my code, if you have a better sugestion better for me.
    Thanks!

    You could do the increment in Component 1
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="294" height="222" xmlns:ns1="*">
        <mx:Script>
            <![CDATA[
                [Bindable]
                private var _number:int;
                private function incNumber():void {
                    _number ++;
            ]]>
        </mx:Script>
        <mx:Label x="10" y="10" text="{_number.toString()}" width="144"/>
        <ns1:Comp2 x="21.5" y="75" width="251" height="118" numberInc="incNumber()">
        </ns1:Comp2>
    </mx:Canvas>
    And listen for an event from Component 2 telling the increment to take place,
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300" xmlns:ns1="*">
        <mx:Script>
            <![CDATA[
                private function incNumber():void {
                    dispatchEvent(new Event('numberInc'))
            ]]>
        </mx:Script>
        <mx:Metadata>
            [Event(name="numberInc", type="flash.events.Event")]
        </mx:Metadata>
        <mx:Button x="22" y="28" label="Inc Number" click="incNumber()"/>
    </mx:Canvas>
    That was Comp1 doesn;t have to reach into Comp 2 for the number.  Obviously mine is instansiated in mxml, but if in code then yes as Brana said you need to instansiate it with the new keyword, and *** the event listener.
    Andrew

  • Flash cs4 deletes frames on locked layers

    Hello!
    I have a problem. While I am drawing, and deleting while all other layers are locked except the one I draw on,
    flash deletes frames from the locked layers on the timeline randomly.
    It is very annoying, because its a bug, and sometimes I need to redraw a lots of my works.

    I am having this EXACT same error message, but it is happening whenever I make a movieclip within a fla file. Once I rotate through the error the movie clip appears as only an outline box on my stage, although opening the button (along with the error showing up again) is viewable and editable. Anything I try to do with the clip...edit, move, anything... the error pops on my screen repeatedly.
    This all started after I had a major crash and had to reinstall my system. My registration of CS4 Design Premium was messed up so I ran the Flex Licensing app as suggested by the Adobe site. All other programs work fine... just Flash is messed up. HELP!
    P.S... I did try the deletion of prefs, etc as suggested here... that did not work. Also, the file I am working on works fine on another computer running the same version of flash, so it has to be related to a missing or corrupted file I'm guessing, but I don't know which one. I even uninstalled and reinstalled flash to no avail.
    -------------------ANSWER FOUND PROBLEM FIXED!!!!--------------------
    After 10 days I finally found the solution that worked on twelvestone.com
    tonzeejee 2010.01.05,  01:32AM — SOLUTION...
    [ in the barrel ]
    posts: 1       join date: 2010.01.05
    Here's the solution if you're on a Mac running 10.5.X or later...
    QUIT Flash (don't CLOSE the window - QUIT the app completely (Flash menu next to the apple menu > "Quit")
    Browse to Macintosh HD/Users/"your user name"/Library/Application Support/Adobe
    Completely  delete the folder called "Flash CS4" or "Flash CS3", depending on which  version you're using. This means empty the trash.
    Re-launch Flash app - should be good to go.

  • Flash CS4 Crashes on Startup

    I've been running flash CS4 without error for a few months now, recently though whenever I close it I can't open it back up or I get this error:
    "The application Adobe Flash CS4 has unexpectedly quit.
    A crash report has been generated. To provide us with the best chance of fixing this problem, please select Continue to add a detailed description that includes the steps required to reproduce the crash.
    Adobe will use this crash report to help find a future solution to this problem."
    Recently I've been creating panel extensions and commands but deleting them from the directories to stop them loading didn't make any difference so i doubt it's that.
    Installed the 10.0.2 update just now but that made no difference.
    Restarting can usually allow me another use of flash but that's not a very efficient way of working.
    I found some references on another site that said the only solution he found was buying a new computer, another said deleting some DLLs from a sony program worked but I don't have that program.
    Any solutions? Thanks, Alex.

    Hi frunze256,
    We need to see a copy of your user configuration folder to trouble shoot the root cause of this issue. Can you please send me an email at [email protected]? I need your email so I can set up a drop box and send you the instructions.
    In the mean time do this:
    Browse to C:\Documents and Settings\<username>\Local Settings\Application Data\Adobe\.
    Zip up your Flash CS4 folder and drop that into our ftp site once you get the instructions from me.
    Delete the original Flash CS4 folder.
    Follow  this tech note and recreate your preferences files.
    http://kb2.adobe.com/cps/520/cpsid_52048.html
    Let me know if you are still having issues after deleting the user config files and preferences.
    Thanks,
    Quynh
    Flash Pro QA

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

    Hi all,
    I am new to ActionScript and Flash, and I am getting this error: TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at jessicaclucas_fla::MainTimeline/stopResumescroll()
    I have several different clips in one movie that have scrolling content. When I click a button to move to a different clip that doesn’t have a certain scroll, it gives me this error. I cannot figure out how to fix this. You can see the site I am working on: http://www.jessicaclucas.com. I would really appreciate some help! Thank you in advance. Here is the code:
    //Import TweenMax and the plugin for the blur filter
    import gs.TweenMax;
    import gs.plugins.BlurFilterPlugin;
    //Save the content’s and mask’s height.
    //Assign your own content height here!!
    var RESUMECONTENT_HEIGHT:Number = 1500;
    var RESUME_HEIGHT:Number = 450;
    //We want to know what was the previous y coordinate of the content (for the animation)
    var oldResumeY:Number = myResumecontent.y;
    //Position the content on the top left corner of the mask
    myResumecontent.x = myResume.x;
    myResumecontent.y = myResume.y;
    //Set the mask to our content
    myResumecontent.mask = myResume;
    //Create a rectangle that will act as the Resumebounds to the scrollMC.
    //This way the scrollMC can only be dragged along the line.
    var Resumebounds:Rectangle = new Rectangle(resumescrollMC.x,resumescrollMC.y,0,450);
    //We want to know when the user is Resumescrolling
    var Resumescrolling:Boolean = false;
    //Listen when the user is holding the mouse down on the scrollMC
    resumescrollMC.addEventListener(MouseEvent.MOUSE_DOWN, startResumescroll);
    //Listen when the user releases the mouse button
    stage.addEventListener(MouseEvent.MOUSE_UP, stopResumescroll);
    //This function is called when the user is dragging the scrollMC
    function startResumescroll(e:Event):void {
    //Set Resumescrolling to true
    Resumescrolling = true;
    //Start dragging the scrollMC
    resumescrollMC.startDrag(false,Resumebounds);
    //This function is called when the user stops dragging the scrollMC
    function stopResumescroll(e:Event):void {
    //Set Resumescrolling to false
    Resumescrolling = false;
    //Stop the drag
    resumescrollMC.stopDrag();
    //Add ENTER_FRAME to animate the scroll
    addEventListener(Event.ENTER_FRAME, enterResumeHandler);
    //This function is called in each frame
    function enterResumeHandler(e:Event):void {
    //Check if we are Resumescrolling
    if (Resumescrolling == true) {
    //Calculate the distance how far the scrollMC is from the top
    var distance:Number = Math.round(resumescrollMC.y - Resumebounds.y);
    //Calculate the percentage of the distance from the line height.
    //So when the scrollMC is on top, percentage is 0 and when its
    //at the bottom the percentage is 1.
    var percentage:Number = distance / RESUME_HEIGHT;
    //Save the old y coordinate
    oldResumeY = myResumecontent.y;
    //Calculate a new y target coordinate for the content.
    //We subtract the mask’s height from the contentHeight.
    //Otherwise the content would move too far up when we scroll down.
    //Remove the subraction to see for yourself!
    var targetY:Number = -((RESUMECONTENT_HEIGHT - RESUME_HEIGHT) * percentage) + myResume.y;
    //We only want to animate the scroll if the old y is different from the new y.
    //In our movie we animate the scroll if the difference is bigger than 5 pixels.
    if (Math.abs(oldResumeY - targetY) > 5) {
    //Tween the content to the new location.
    //Call the function ResumetweenFinished() when the tween is complete.
    TweenMax.to(myResumecontent, 0.3, {y: targetY, blurFilter:{blurX:22, blurY:22}, onComplete: ResumetweenFinished});
    //This function is called when the tween is finished
    function ResumetweenFinished():void {
    //Tween the content back to “normal” (= remove blur)
    TweenMax.to(myResumecontent, 0.3, {blurFilter:{blurX:0, blurY:0}});

    Hi again,
    Thank you for helping. I really appreciate it! Would it be easier to say, if resumescrollMC exists, then execute these functions? I was not able to figure out the null statement from your post. Here is what I am trying (though I am not sure it is possible). I declared the var resumescrollMC, and then I tried to put pretty much the entire code into an if (resumescrollMC == true) since this code only needs to be completed when resumescrollMC is on the stage. It is not working the way I have tried, but I am assuming I am setting up the code incorrectly. Or, an if statement is not supposed to be issued to an object:
    //Import TweenMax and the plugin for the blur filter
    import gs.TweenMax2;
    import gs.plugins.BlurFilterPlugin2;
    //Save the content's and mask's height.
    //Assign your own content height here!!
    var RESUMECONTENT_HEIGHT:Number = 1500;
    var RESUME_HEIGHT:Number = 450;
    var resumescrollMC:MovieClip;
    if (resumescrollMC == true) {
    //We want to know what was the previous y coordinate of the content (for the animation)
    var oldResumeY:Number = myResumecontent.y;
    //Position the content on the top left corner of the mask
    myResumecontent.x = myResume.x;
    myResumecontent.y = myResume.y;
    //Set the mask to our content
    myResumecontent.mask = myResume;
    //Create a rectangle that will act as the Resumebounds to the scrollMC.
    //This way the scrollMC can only be dragged along the line.
    var Resumebounds:Rectangle = new Rectangle(resumescrollMC.x,resumescrollMC.y,0,450);
    //We want to know when the user is Resumescrolling
    var Resumescrolling:Boolean = false;
    //Listen when the user is holding the mouse down on the scrollMC
    resumescrollMC.addEventListener(MouseEvent.MOUSE_DOWN, startResumescroll);
    //Listen when the user releases the mouse button
    stage.addEventListener(MouseEvent.MOUSE_UP, stopResumescroll);
    //This function is called when the user is dragging the scrollMC
    function startResumescroll(e:Event):void {
    //Set Resumescrolling to true
    Resumescrolling = true;
    //Start dragging the scrollMC
    resumescrollMC.startDrag(false,Resumebounds);
    //This function is called when the user stops dragging the scrollMC
    function stopResumescroll(e:Event):void {
    //Set Resumescrolling to false
    Resumescrolling = false;
    //Stop the drag
    resumescrollMC.stopDrag();
    //Add ENTER_FRAME to animate the scroll
    addEventListener(Event.ENTER_FRAME, enterResumeHandler);
    //This function is called in each frame
    function enterResumeHandler(e:Event):void {
    //Check if we are Resumescrolling
    if (Resumescrolling == true) {
    //Calculate the distance how far the scrollMC is from the top
    var distance:Number = Math.round(resumescrollMC.y - Resumebounds.y);
    //Calculate the percentage of the distance from the line height.
    //So when the scrollMC is on top, percentage is 0 and when its
    //at the bottom the percentage is 1.
    var percentage:Number = distance / RESUME_HEIGHT;
    //Save the old y coordinate
    oldResumeY = myResumecontent.y;
    //Calculate a new y target coordinate for the content.
    //We subtract the mask's height from the contentHeight.
    //Otherwise the content would move too far up when we scroll down.
    //Remove the subraction to see for yourself!
    var targetY:Number = -((RESUMECONTENT_HEIGHT - RESUME_HEIGHT) * percentage) + myResume.y;
    //We only want to animate the scroll if the old y is different from the new y.
    //In our movie we animate the scroll if the difference is bigger than 5 pixels.
    if (Math.abs(oldResumeY - targetY) > 5) {
    //Tween the content to the new location.
    //Call the function ResumetweenFinished() when the tween is complete.
    TweenMax.to(myResumecontent, 0.3, {y: targetY, blurFilter:{blurX:22, blurY:22}, onComplete: ResumetweenFinished});
    //This function is called when the tween is finished
    function ResumetweenFinished():void {
    //Tween the content back to "normal" (= remove blur)
    TweenMax.to(myResumecontent, 0.3, {blurFilter:{blurX:0, blurY:0}});

  • 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;

  • Error #1009 while loading swf "Cannot access a property or method of a null object reference."

    Hello
    I'm trying to load a swf called "polaroids.swf" into my main swf called "09replacesSWF.swf". I keep getting the error when I test the movie. I'm completely lost and have been at this for hours. If I just test polaroids.fla the movie works fine but if I try to load it into 09replacesSWF.swf, I get the error. I need some help PLEASE!!!!!
    I tried to debug the movie and flash says......."Cannot display source code at this location".
    ....... TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at Polaroids$iinit()
    Here is my AS code
    package {
        import flash.display.*;
        import flash.filters.*;
        import flash.utils.*;
        import flash.net.*;
        import flash.events.*;
        import flash.filters.DropShadowFilter;
        import caurina.transitions.*;
        public class Polaroids extends MovieClip {
            //Variables
            public var stageContainer:MovieClip;
            private var _scaleTempo:Number;
            private var _thumbStr:Number;
            private var _stageHeight:Number;
            private var _stageWidth:Number;
            private var _count:Number;
            private var _initBGHeight:Number;
            private var _initBGWidth:Number;
            //Arrays
            private var _backgroundImageArr:Array;
            private var _imageURLArr:Array;
            private var _imageCaptionArr:Array;
            private var _imagesArr:Array;
            //Bitmaps
            private var _image:Bitmap;
            private var _backgroundImage:Bitmap;
            private var _bitmap:BitmapData;
            private var _backgroundBitmap:BitmapData;
            //XML
            private var _xmlLoader:URLLoader;
            private var _imageXML:XML;
            //Holders
            private var _imageContainer:ImageContainer;
            private var _backgroundImageHolder:MovieClip;
            //Image States
            private var _activeImage = null;
            private var _previousActiveImage = null;
            //Loaders
            private var backgroundImageLoader:Loader;
            public function Polaroids() {
                //sets up initial variable values
                _count = 0;
                _backgroundImageArr=new Array;
                _imageURLArr=new Array;
                _imageCaptionArr=new Array;
                _imagesArr=new Array;
                _scaleTempo=9;
                _thumbStr = .3;
                backgroundImageLoader = new Loader();
                _stageHeight=stage.stageHeight;
                _stageWidth=stage.stageWidth;
                _backgroundImageHolder = new MovieClip();
                stageContainer = new MovieClip();
                addChild(stageContainer);
                init();
            //Add Stage Listener
            private function addedToStage(e:Event):void {
                stage.addEventListener(Event.RESIZE, onResize);
            Initialise
            private function init():void {
                //Setup stage
                stage.align     = StageAlign.TOP_LEFT;
                stage.scaleMode = StageScaleMode.NO_SCALE;
                //Load XML
                var _xmlLoader:URLLoader=new URLLoader;
                _xmlLoader.load(new URLRequest("photos.xml"));
                _xmlLoader.addEventListener(Event.COMPLETE,processXML);
                this.addEventListener(Event.ADDED_TO_STAGE, addedToStage);
            Process XML
            private function processXML(e:Event):void {
                _imageXML=new XML(e.target.data);
                _backgroundImageArr[0] = _imageXML.@backgroundImage;
                for (var i:int=0; i < _imageXML.*.length(); i++) {
                    _imageURLArr[i]=_imageXML.image[i].@url;
                    _imageCaptionArr[i]=_imageXML.image[i].@caption;
                loadImages();
                loadBackgroundImage();
            Load Background Image
            private function loadBackgroundImage():void {
                backgroundImageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,addBack ground);
                backgroundImageLoader.load(new URLRequest(_backgroundImageArr[0]));
            Add background image to stage
            private function addBackground(e:Event):void {
                _backgroundImage=Bitmap(e.target.content);
                _backgroundBitmap=_image.bitmapData;
                _backgroundImage.smoothing = true;
                _backgroundImageHolder.addChild(_backgroundImage);
                _initBGHeight = backgroundImageLoader.contentLoaderInfo.height;
                _initBGWidth = backgroundImageLoader.contentLoaderInfo.width;
                if ((_initBGWidth/_initBGHeight) > (stage.stageWidth/stage.stageHeight)) {
                    _backgroundImageHolder.height = stage.stageHeight;
                    _backgroundImageHolder.width =  _backgroundImageHolder.height * _initBGWidth / _initBGHeight;
                } else {
                    _backgroundImageHolder.width = stage.stageWidth;
                    _backgroundImageHolder.height= _backgroundImageHolder.width * _initBGHeight / _initBGWidth;
            Load Images
            private function loadImages():void {
                for (var i:int=0; i < _imageURLArr.length; i++) {
                    var imageLoader:Loader=new Loader;
                    imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,addImage);
                    imageLoader.load(new URLRequest(_imageURLArr[i]));
            Add images to MovieClip on Stage
            private function addImage(e:Event):void {
                _image=Bitmap(e.target.content);
                _bitmap=_image.bitmapData;
                _image.smoothing = true;
                _imageContainer = new ImageContainer();
                _imageContainer.falseBtn.buttonMode = true;
                _imageContainer.falseBtn.doubleClickEnabled = true;
                _imageContainer.imageHolder.addChild(_image);//Add Bitmap to a MoviClip _imageContainer
                _image.x = _imageContainer.width/2 - (_image.width/2 + 15);
                _image.y = _imageContainer.height/2 - (_image.height/2 + 80) ;
                _imageContainer.imageCaption.text = _imageCaptionArr[_count];
                _imageContainer.scaleX = _thumbStr;
                _imageContainer.scaleY = _thumbStr;
                _imageContainer.rotation = 30 - 60 * Math.random();
                if (Math.round(Math.random() * 1) == 1) {
                    _imageContainer.y=stage.stageHeight * Math.random() + _imageContainer.height * 2;
                    if (Math.round(Math.random() * 1) == 1) {
                        _imageContainer.x=stage.stageWidth + _imageContainer.width * 2;
                    } else {
                        _imageContainer.x=- _imageContainer.width * 2;
                } else {
                    _imageContainer.x=stage.stageWidth * Math.random() + _imageContainer.width * 2;
                    if (Math.round(Math.random() * 1) == 1) {
                        _imageContainer.y=stage.stageHeight + _imageContainer.height * 2;
                    } else {
                        _imageContainer.y=- _imageContainer.height * 2;
                //Setup Attributes
                _imageContainer.newX = Math.round((_imageContainer.width/2) + (stage.stageWidth-_imageContainer.width)*Math.random());
                _imageContainer.newY = Math.round((_imageContainer.height/2) + (stage.stageHeight-_imageContainer.height)*Math.random());
                _imageContainer.oldRotation = _imageContainer.rotation;
                _imageContainer.oldX = _imageContainer.newX;
                _imageContainer.oldY = _imageContainer.newY;
                _imageContainer.startX = _imageContainer.x;
                _imageContainer.startY = _imageContainer.y;
                _imageContainer.oldHeight = _imageContainer.scaleY;
                _imageContainer.oldWidth = _imageContainer.scaleX;
                _imageContainer.id = _count;
                _imageContainer.addEventListener(Event.ENTER_FRAME, animateImage);
                _imageContainer.addEventListener(MouseEvent.MOUSE_DOWN,dragImage);
                _imageContainer.addEventListener(MouseEvent.MOUSE_UP,dropImage);
                _imageContainer.addEventListener(MouseEvent.MOUSE_OUT, dropImage);
                _imageContainer.falseBtn.addEventListener(MouseEvent.DOUBLE_CLICK, setup_activeImage);
                _imagesArr.push(_imageContainer);//Add image reference to an Array
                _imageContainer.filters = [new DropShadowFilter(0,0,0,.9,8,8,1,1,false,false)];
                //Button Listeners
                _imageContainer.nextBtn.visible = false;
                _imageContainer.previousBtn.visible = false;
                _imageContainer.nextBtn.buttonMode = true;
                _imageContainer.previousBtn.buttonMode = true;
                _imageContainer.nextBtn.addEventListener(MouseEvent.MOUSE_DOWN, nextImage);
                _imageContainer.previousBtn.addEventListener(MouseEvent.MOUSE_DOWN, previousImage);
                //Add Container to Stage
                addChild(_imageContainer);
                stageContainer.addChild(_imageContainer);
                _count++;
            Animate Images onto Stage
            private function animateImage(e:Event):void {
                e.target.y += (e.target.newY - e.target.y) / _scaleTempo;
                e.target.x += (e.target.newX - e.target.x) / _scaleTempo;
                if (Math.round(e.target.y) == e.target.newY) {
                    e.target.removeEventListener(Event.ENTER_FRAME, animateImage);
            Drag & Drop Images
            private function dragImage(e:MouseEvent) {
                if (e.currentTarget != _activeImage) {
                    e.currentTarget.startDrag();
                    if (_activeImage == null) {
                        stageContainer.setChildIndex(DisplayObject(e.currentTarget), stageContainer.numChildren-1);
                    } else {
                        stageContainer.setChildIndex(DisplayObject(e.currentTarget), stageContainer.numChildren-2);
            private function dropImage(e:MouseEvent) {
                if (e.currentTarget != _activeImage) {
                    e.currentTarget.stopDrag();
                    e.currentTarget.oldX = e.currentTarget.x;
                    e.currentTarget.oldY = e.currentTarget.y;
            onResize Handler
            private function onResize(e:Event):void {
                for (var i:int = 0; i<_imagesArr.length; i++) {
                    if (_imagesArr[i] != _activeImage) {
                        _imagesArr[i].x = Math.round(stage.stageWidth * (_imagesArr[i].x/_stageWidth));
                        _imagesArr[i].y = Math.round(stage.stageHeight * (_imagesArr[i].y/_stageHeight));
                    } else {
                        _activeImage.x = stage.stageWidth/2;
                        _activeImage.y = stage.stageHeight/2;
                    _imagesArr[i].oldX = Math.round(stage.stageWidth * (_imagesArr[i].oldX/_stageWidth));
                    _imagesArr[i].oldY = Math.round(stage.stageHeight * (_imagesArr[i].oldY/_stageHeight));
                    _imagesArr[i].newX = Math.round(stage.stageWidth * (_imagesArr[i].newX/_stageWidth));
                    _imagesArr[i].newY = Math.round(stage.stageHeight * (_imagesArr[i].newY/_stageHeight));
                    _imagesArr[i].startX = Math.round(stage.stageWidth * (_imagesArr[i].startX/_stageWidth));
                    _imagesArr[i].startY = Math.round(stage.stageHeight * (_imagesArr[i].startY/_stageHeight));
                //Background Resizer
                if ((_initBGWidth/_initBGHeight) > (stage.stageWidth/stage.stageHeight)) {
                    _backgroundImageHolder.height = stage.stageHeight;
                    _backgroundImageHolder.width =  _backgroundImageHolder.height * _initBGWidth / _initBGHeight;
                } else {
                    _backgroundImageHolder.width = stage.stageWidth;
                    _backgroundImageHolder.height= _backgroundImageHolder.width * _initBGHeight / _initBGWidth;
                _stageWidth = stage.stageWidth;
                _stageHeight = stage.stageHeight;
            Handle Selected Image
            private function zoomImage():void {
                stageContainer.setChildIndex(_activeImage, stageContainer.numChildren-1);
                Tweener.addTween(_activeImage,{scaleX: 1, scaleY: 1, rotation: 0, x: _stageWidth/2 , y: _stageHeight/2, time: 1});
                _activeImage.nextBtn.visible = true;
                _activeImage.previousBtn.visible = true;
            private function returnImage():void {
                stageContainer.setChildIndex(_previousActiveImage, stageContainer.numChildren-2);
                Tweener.addTween(_previousActiveImage,{scaleX: .3, scaleY: .3, rotation: _previousActiveImage.oldRotation, x: _previousActiveImage.oldX , y: _previousActiveImage.oldY, time: 1});
                _previousActiveImage.nextBtn.visible = false;
                _previousActiveImage.previousBtn.visible = false;
            private function setup_activeImage(e:Event):void {
                if ((_activeImage == null) && (_previousActiveImage == null)) {
                    _activeImage = e.currentTarget.parent;
                    zoomImage();
                } else if (e.currentTarget.parent != _activeImage) {
                    _previousActiveImage = _activeImage;
                    _activeImage = e.currentTarget.parent;
                    zoomImage();
                    returnImage();
                } else {
                    Tweener.addTween(_activeImage,{scaleX: .3, scaleY: .3, rotation: _activeImage.oldRotation, x: _activeImage.oldX , y: _activeImage.oldY, time: 1});
                    _activeImage.nextBtn.visible = false;
                    _activeImage.previousBtn.visible = false;
                    _activeImage = null;
                    _previousActiveImage = null;
            Button Handlers
            private function nextImage(e:MouseEvent):void {
                var imageID = int(e.currentTarget.parent.id);
                if (imageID < _imagesArr.length - 1) {
                    _previousActiveImage = e.currentTarget.parent;
                    _activeImage = _imagesArr[imageID+1];
                    zoomImage();
                    returnImage();
                } else {
                    _previousActiveImage = e.currentTarget.parent;
                    _activeImage = _imagesArr[0];
                    zoomImage();
                    returnImage();
            private function previousImage(e:MouseEvent):void {
                var imageID = int(e.currentTarget.parent.id);
                if (imageID != 0) {
                    _previousActiveImage = e.currentTarget.parent;
                    _activeImage = _imagesArr[imageID-1];
                    zoomImage();
                    returnImage();
                } else {
                    _previousActiveImage = e.currentTarget.parent;
                    _activeImage = _imagesArr[_imagesArr.length-1];
                    zoomImage();
                    returnImage();
    }

    Raymond,
    The error is at line 55....when I debug
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at Polaroids$iinit()[/Volumes/Herman's Passport/Music Rocka/RockaGallery/Polaroids.as:55]
    So i'm looking in the code.....

  • 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.

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

    Hi,
    I'm having a lot of trouble getting a preloader to work on my Flash website. I'm new to actionscript, the site works fine but when I place the preloader in frame 1, I get.
    Error#1009: Cannot access a property or method of a null object reference.
    Then it lists three areas. The buttons on the site don't work anymore.
    I've followed the Lynda com tutorials so don't know what is causing this error.
    Included is the word.doc with the error code, preloader code, the main flash frame 2 code and the debug information.
    Any help would be great.
    Thanks!

    You need to make sure 'cards' is named properly and is present when that line of code executes.  If it is somewhere down a timeline, it is not present.
    As far as your preloader code goes, what is infoLoader.  I have to assume it's some form of component since you don't have any code to instantiate it.

  • TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.controls::AdvancedDataGrid/findHeaderRenderer()

    Can anyone throw any light on this obscure Flex error?...
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at mx.controls::AdvancedDataGrid/findHeaderRenderer()[...path...\projects\datavisualisation\ src\mx\controls\AdvancedDataGrid.as:1350]
    at mx.controls::AdvancedDataGrid/mouseEventToItemRenderer()[...path...\projects\datavisualis ation\src\mx\controls\AdvancedDataGrid.as:1315]
    at mx.controls.listClasses::AdvancedListBase/mouseMoveHandler()[...path...\projects\datavisu alisation\src\mx\controls\listClasses\AdvancedListBase.as:8091]
    I found a related bug reported on Jira: https://bugs.adobe.com/jira/browse/FLEXDMV-1631
    But in our case, we have no zoom effect.  It may be timing related, as there is a lot of computation going on when this page, and the ADG is first initialised.
    Please?... Any suggestions or workarounds?  We don't want this falling over in the hands of our customers.
    <rant> And people wonder why I hate Flex!?  These obscure instabilities never happen when I develop Pure ActionScript.  The Flash platform is wonderfully stable.  But as soon as you bring Flex into play, things take longer to develop, it's a struggle to extend or change the behaviour of the bloated components, and everything falls apart as these bugs begin to surface.</rant>

    facing the same problem... sdk 4.1. no solution for about 2 years ????

  • Module Chart component Error #1009: Cannot access a property or method of a null object reference

    Is there a known bug when displaying a chart component that is defined in a module. When attempting to display a chart component defined in a module it crashes indicating Error #1009: Cannot access a property or method of a null object reference.
    It crashes at the following location in ChartBase.as. Somehow when loading the chart the  styleManager.getStyleDeclaration("mx.charts.chartClasses.ChartBase"); returns null so when using the setStyle methods the exception occurs.
    private function initStyles():Boolean
            HaloDefaults.init(styleManager);
      var chartBaseStyle:CSSStyleDeclaration = styleManager.getStyleDeclaration("mx.charts.chartClasses.ChartBase");
      chartBaseStyle.setStyle("chartSeriesStyles", HaloDefaults.chartBaseChartSeriesStyles);
      chartBaseStyle.setStyle("fill", new SolidColor(0xFFFFFF, 0));
      chartBaseStyle.setStyle("calloutStroke", new SolidColorStroke(0x888888,2));
            return true;
    Added note: There is a chart component in the application that works fine.  The only way I can get  the chart in the module to display is to add the following workaround preinitializer but it severly impacts the loading of the module. Is there a way around this.
    protected function preinitializeHandler(event:FlexEvent):void
       var styleObjects:Array = FlexGlobals.topLevelApplication.styleManager.selectors;
       for each(var styleObj:String in styleObjects)  {
        var style:CSSStyleDeclaration = FlexGlobals.topLevelApplication.styleManager.getStyleDeclaration(styleObj);
        styleManager.setStyleDeclaration(styleObj, style, true);   
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at mx.charts.chartClasses::ChartBase/initStyles()[E:\dev\4.y\frameworks\projects\charts\src\ mx\charts\chartClasses\ChartBase.as:1862]
    at mx.charts.chartClasses::ChartBase/set moduleFactory()[E:\dev\4.y\frameworks\projects\charts\src\mx\charts\chartClasses\ChartBas e.as:1894]
    at mx.charts.chartClasses::PolarChart/set moduleFactory()[E:\dev\4.y\frameworks\projects\charts\src\mx\charts\chartClasses\PolarCha rt.as:223]
    at mx.charts::PieChart/set moduleFactory()[E:\dev\4.y\frameworks\projects\charts\src\mx\charts\PieChart.as:203]
    at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Group.as:1590]
    at spark.components::Group/addElementAt()[E:\dev\4.y\frameworks\projects\spark\src\spark\com ponents\Group.as:1387]
    at spark.components::SkinnableContainer/addElementAt()[E:\dev\4.y\frameworks\projects\spark\ src\spark\components\SkinnableContainer.as:775]
    at mx.states::AddItems/addItemsToContentHolder()[E:\dev\4.y\frameworks\projects\framework\sr c\mx\states\AddItems.as:782]
    at mx.states::AddItems/apply()[E:\dev\4.y\frameworks\projects\framework\src\mx\states\AddIte ms.as:563]
    at mx.core::UIComponent/applyState()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UI Component.as:10741]
    at mx.core::UIComponent/commitCurrentState()[E:\dev\4.y\frameworks\projects\framework\src\mx \core\UIComponent.as:10487]
    at mx.core::UIComponent/setCurrentState()[E:\dev\4.y\frameworks\projects\framework\src\mx\co re\UIComponent.as:10323]
    at mx.core::UIComponent/set currentState()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:6425]
    at BloodPressure/bloodpressureDg_selectionChangeHandler()[C:\Users\Mark\Adobe Flash Builder 4.7\BiometricsFlexProject\src\BloodPressure.mxml:311]
    at BloodPressure/__bloodpressureDg_selectionChange()[C:\Users\Mark\Adobe Flash Builder 4.7\BiometricsFlexProject\src\BloodPressure.mxml:41]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()[E:\dev\4.y\frameworks\projects\framework\src\mx\core \UIComponent.as:13152]
    at spark.components::DataGrid/commitInteractiveSelection()[E:\dev\4.y\frameworks\projects\sp ark\src\spark\components\DataGrid.as:3634]
    at spark.components::DataGrid/setSelectionAnchorCaret()[E:\dev\4.y\frameworks\projects\spark \src\spark\components\DataGrid.as:4210]
    at spark.components::DataGrid/grid_mouseDownHandler()[E:\dev\4.y\frameworks\projects\spark\s rc\spark\components\DataGrid.as:4679]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()[E:\dev\4.y\frameworks\projects\framework\src\mx\core \UIComponent.as:13152]
    at spark.components::Grid/dispatchGridEvent()[E:\dev\4.y\frameworks\projects\spark\src\spark \components\Grid.as:4038]
    at spark.components::Grid/grid_mouseDownDragUpHandler()[E:\dev\4.y\frameworks\projects\spark \src\spark\components\Grid.as:3883]
    at Function/<anonymous>()[E:\dev\4.y\frameworks\projects\spark\src\spark\utils\MouseEventUti l.as:84]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.managers::SystemManager/mouseEventHandler()[E:\dev\4.y\frameworks\projects\framework\s rc\mx\managers\SystemManager.as:2918]

    It appears as though this error has been going on for a while. See the following link http://forums.adobe.com/thread/941849

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

    Hi, I’m doing a game for an assignment for college. Using Flash CS 5. I got this error
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at code::Game1()
    When I tried to go to the next page, I thought I linked correctly. Can anyone help me? Thanks
    you can find the coding here http://pastebin.com/iz8a6w6Z

    click file>publish settings>swf and tick "permit debugging".  retest.
    the problematic line number will be in the error message.  that will tell you which reference you're trying to use that is null.

Maybe you are looking for

  • Satellite C660 fails to boot first time

    I have a Satellite C660 - PSC0AQ-03C019 + 1B194392K For the last year the notebook has been running fine however in the last 2 months it has had a boot issue. The first attempted boot of the day, it will not boot, it powers on gets past the boot scre

  • Payment terms should calculate Payment due date based on working days

    Hi Experts, As we know that standard SAP calculates Payment due date= base line date + number of days maintained in payment terms. In this payment days are considered as calendar days and not the working days. Example: If base line date is Thursday,

  • BEX formula.. How to know the row value in formulas dynamically

    Hi all, I just need to clarify a doubt.. Requirement: COL1      -               COL2 Y1            -               X Y2            -               X + 12 Y3            -               X + 12 + 12 YN           -               X + 12 + 12 + u2026 12(n)

  • How do i pare my iPhone 6 to my car?

    How do I pare my iphone6 to my car?

  • Slide show widget

    Hi I do occassional updating for a rape crisis center. I know a little html and some css and am using CS4. I need to make a three picture slide show quickly and do not do flash. Are there any easy to learn widgets in CS4 or does anyone know a second