Avatar of Madkhali
Madkhali
Flag for United States of America asked on

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

i have animation tween on the main timeline.

- on the first frame, objects appear on the satge:
var midframe:Number = 20;

- on the midframe:
stop();

- on the last frame, objects disappear from the stage:
(root.loaderInfo.loader.root as Object).loadSection();

it plays Ok, but

TypeError: Error #1009: Cannot access a property or method of a null object reference.
      at section6_fla::MainTimeline/frame130()

the error appears when the play head reaches the last frame (130)

Thanks for your time
Adobe Flash

Avatar of undefined
Last Comment
Madkhali

8/22/2022 - Mon
blue-genie

does this
(root.loaderInfo.loader.root as Object).loadSection();
refer to the object that no longer appears on the stage.
Madkhali

ASKER
i did not get your point :), sorry

this error appears when i test the swf alone or when i load it inside anither swf
the whole code in the same time line (inside the loaded swf)
Thanks
blue-genie

you said >- on the last frame, objects disappear from the stage:
and then you said > (root.loaderInfo.loader.root as Object).loadSection();

so i'm asking does that loadInfo.loader.root blah blah refer to the objects that have dissapeared.
reason being when you get a null error you're trying to reference something that doesn't exist anymore.

>>the whole code in the same time line (inside the loaded swf)
you're loading one swf file into another?

best bet would be to upload your files, add .txt extension to the end.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Madkhali

ASKER
good day :)
i uploaded the file
please check it

Thanks in advance

errors.txt
blue-genie

what version of flash you using CS4?
i can't open it - need CS3 and backward.
Madkhali

ASKER
i use CS3
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Madkhali

ASKER
please inform me if you have any problem, thanks
ASKER CERTIFIED SOLUTION
blue-genie

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Madkhali

ASKER
okey, same problem included in this tread:

https://www.experts-exchange.com/questions/24196260/problem-loading-external-swf-and-errors-urgent-please.html

if you download it, please inform me if there is problem opening it

Thanks again :)
Madkhali

ASKER
Thanks again for your help
i hope you enjoy your life :)
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck