Skip to main content
Known Participant
October 28, 2015
Answered

run time error when go to home button after loading external swf

  • October 28, 2015
  • 1 reply
  • 1406 views

I work on develop Android App for learning Arabic, it is very simple.

to explain the alphabet, I create and I load external swfs files, first and the second loaders are working good (loading and when click any buttons there are no any issue)

but the third loader is loading good also, but the problem when I test the project, I get run time error when press home button.

(it does not happen when loading the other loaders)

here is the sours files Android Project.rar - Google Drive

Thanks

This topic has been closed for replies.
Correct answer nezarov

there is no error when I remove the last loader from the frame

and I need the home button to go back from other frames. it works well without the third loader


the problem is in the way you're using to add the event listeners to the buttons, you're adding a different click event listener for them every key frame, so you have to remove the listeners before you leave to another frame.

1 reply

Inspiring
October 28, 2015

Can you copy and paste the error here? or the code that you think it's causing the error.. maybe someone can help you, thanks.

Known Participant
October 28, 2015

to make it easier I enclosed a link to the source files of my project ( it contains 10 frames only)

No compiler error, it is run-time error

by the way there are no error when I remove the loader from the frame

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

  at LearnArabic_fla::MainTimeline/frame1()[LearnArabic_fla.MainTimeline::frame1:74]

  at flash.display::MovieClip/gotoAndStop()

  at LearnArabic_fla::MainTimeline/home_ClickToGoToAndStopAtFrame_3()[LearnArabic_fla.MainTimeline::frame1:120]

link to the files

Android Project.rar - Google Drive

Thanks for your advice

Known Participant
October 29, 2015

بالتوفيق أخي


الشكر لك أنت

هل أنت عربي؟