Error 1009 when compile to Air 2.6
I have three movieclips, imported as part of a FLA file from inDesign.
There are 3 frames in the movie labeled, page_one, page_two, and page_three
There is one movieclip on each frame labeled as follows:
page_one had movieclip spread_one
page_two had movieclip spread_two
page_three had movieclip spread_three
there is actionscript on each frame:
on frame 1, (label page_one):
stop();
spread_one.addEventListener(MouseEvent.CLICK, moveme1);
function moveme1(e:MouseEvent):void{
gotoAndStop("page_two");
}
on frame 2 (label page_two):
stop();
spread_two.addEventListener(MouseEvent.CLICK, moveme2);
function moveme2(e:MouseEvent):void{
gotoAndStop("page_three");
}
on frame 3 (label page_three):
stop();
spread_three.addEventListener(MouseEvent.CLICK, moveme3);
function moveme3(e:MouseEvent):void{
gotoAndStop("page_one");
}
when I compile in flash, it works.
when I compile in air 2.6 I get this error after I click on frame 3 (page_three), in spread_three:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at objecthood_fla::MainTimeline/frame1()[objecthood_fla.MainTimeline::frame1:5]
at flash.display::MovieClip/gotoAndStop()
at objecthood_fla::MainTimeline/moveme3()[objecthood_fla.MainTimeline::frame3:8]
frame1:5 is the line, which works the first time it is clicked on frame 1:
spread_one.addEventListener(MouseEvent.CLICK, moveme1);
frame3:8 is the line:
spread_three.addEventListener(MouseEvent.CLICK, moveme3);
I created another 3 page test spread in inDesign, with only a rectangle on each page and exported as FLA.
I used the same code as above and it compiled fine in both air and flash.
Does anyone have any clues?
thanks
e