Skip to main content
Participant
July 23, 2011
Answered

TypeError: Error #1009 on FLVPlayback

  • July 23, 2011
  • 1 reply
  • 1597 views

I've been struggling with this error for a few days now, I can't seem to figure out what is actually going wrong.

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

     at fl.video::UIManager/http://www.adobe.com/2007/flash/flvplayback/internal::hookUpCustomComponents()

     at fl.video::FLVPlayback/http://www.adobe.com/2007/flash/flvplayback/internal::handleVideoEvent()

     at flash.events::EventDispatcher/dispatchEventFunction()

     at flash.events::EventDispatcher/dispatchEvent()

     at fl.video::VideoPlayer/http://www.adobe.com/2007/flash/flvplayback/internal::setState()

     at fl.video::VideoPlayer/http://www.adobe.com/2007/flash/flvplayback/internal::finishAutoResize()

     at flash.utils::Timer/_timerDispatch()

     at flash.utils::Timer/tick()

The app is one for a tourist centre, with an intro video that can be skipped by being clicked, which leads to a four options menu, of which two options lead you to frames with intro videos which can also be bypassed by a simple click. All three intro videos use the FLVPlayback 2.5 component. The app runs without any issues, even playing the videos with no problem, until, seemingly at random intervals, this error will occur. It does, however, only occur at the start or end of a video. I have had trouble tracing the error. It causes the program to become unresponsive at seemingly random intervals while the program is being used, or even if it's just running looping video. If I dismiss the error, the program will continue to run without any further issues, except for this error, which can be in turn dismissed, etc... However, when it is installed on the system it simply becomes unresponsive since dismissing it is not an option. I have not been able to catch or trace this error or its source. Any ideas? I'll attatch the code from one of my frames with the FLVPlayback, since that seems to be where the error is.

import flash.display.MovieClip;

import flash.events.MouseEvent;

import flash.events.Event;

import fl.video.FLVPlayback;

import fl.video.*;

var heritageVideo:FLVPlayback = heritage_sequence;

stage.addEventListener(MouseEvent.CLICK, gotoHeritageHistory);

stop();

heritageVideo.addEventListener(VideoEvent.COMPLETE, gotoHeritageTwo);

function gotoHeritageHistory(evt:MouseEvent):void

{

     gotoAndStop(6);

     stage.removeEventListener(MouseEvent.CLICK, gotoHeritageHistory);

     heritageVideo.removeEventListener(VideoEvent.COMPLETE, gotoHeritageTwo);

     heritageVideo.stop();

     heritageVideo.visible = false;

}

function gotoHeritageTwo(evt:VideoEvent):void

{

     gotoAndStop(6);

     stage.removeEventListener(MouseEvent.CLICK, gotoHeritageHistory);

     heritageVideo.removeEventListener(VideoEvent.COMPLETE, gotoHeritageTwo);

     heritageVideo.visible = false;

}

This is my first real as3 work, so I wouldn't be surprised if I'm missing something obvious, and I do hope that's the case. Let me know if you have any ideas!

This topic has been closed for replies.
Correct answer chris.campbell

Hi,

From the error, it looks like you're trying to manipulate something that isn't initialized yet.  I'm not very familiar with Flash professional (I do my work using Flash Builder), would you mind posting this over on the Flash forums?  You'll probably get a much better response over there.

Thanks,

Chris

1 reply

chris.campbell
chris.campbellCorrect answer
Legend
July 26, 2011

Hi,

From the error, it looks like you're trying to manipulate something that isn't initialized yet.  I'm not very familiar with Flash professional (I do my work using Flash Builder), would you mind posting this over on the Flash forums?  You'll probably get a much better response over there.

Thanks,

Chris