I am getting the following error message:
"TypeError: Error #1009: Cannot access a property or method of a null object reference.
at fl.containers::ScrollPane/endDrag()"
The problem occurs when I like this:
1. I click a button on the Main Frame which takes me to frame #2
2. I go back to the Main Frame and then come back to the frame #2
3. When I go to Frame #2 I get the error message.
I suspect the problem is occurring because I am not emptying the "scrollPane_1" component on exit. In the code below scrollPane_1 is a scroll pane component. This is occurring on all pages that I have the scroll pane on.
Also the scroll pane component is on stage and has an instance name of "scrollPane_1"
This is an Air for iOS file.
Here's the code:
__________________________________________________
Actionscript Code:
top();
scrollPane_1.source= myText_1;
scrollPane_1.setSize(600,585);
//This is just button code and I suspect does not have any thing to do with the problem.
bnt_home_1.addEventListener(MouseEvent.CLICK, bnt_Goto_home_1);
function bnt_Goto_home_1(event:MouseEvent):void
{
gotoAndPlay("1");
}
bnt_home_schedule1.addEventListener(MouseEvent.CLICK,gotoSchedule_home 1);
function gotoSchedule_home1(event:MouseEvent):void
{
gotoAndPlay("1","Main");
}
bnt_gotoThurs.addEventListener(MouseEvent.CLICK, gotoSchedule_thursday);
function gotoSchedule_thursday(event:MouseEvent):void
{
gotoAndPlay("Thursday");
}
bnt_gotoFri.addEventListener(MouseEvent.CLICK, gotoSchedule_friday);
function gotoSchedule_friday(event:MouseEvent):void
{
gotoAndPlay("Friday");
}
________________
Also, when I use "scrollPane_1.source= myText_1;" do I need to reset or clear the source when the user exits the page? Does this operate like a variable? If so, how do I do this?
Any thoughts would be helpful.
______________________________