actionscript 3 - How to change null values? -


the code works returns following error -

typeerror: error # 1009: can not access property or method of null object reference.at lost_fla ::maintimeline / check () [lost_fla.maintimeline :: frame1: 44]

trace (smb_btn) = null

trace (check) = function () {}

trace (txt_inpt) = null

what can done change null values​​?

import fl.controls.button import fl.controls.textinput import flash.utils.timer import flash.events.mouseevent          smb_btn.addeventlistener (mouseevent.click, check);     function check (e:mouseevent):void{         if (txt_inpt.text == "12345"){             hotel++             gotoandplay (952, "cena 2");             trace(smb_btn)             trace(txt_inpt)             }             if (txt_inpt.text == "131313"){             gotoandplay (735, "cena 3");             }             if (txt_inpt.text == "t"){             gotoandplay (693, "cena 3");             }             if (txt_inpt.text == "141414"){             gotoandplay (727, "cena 4");             }         if (txt_inpt.text == "maze"){             soundmixer.stopall();             gotoandplay (483,"cena 7");             }            if (txt_inpt.text == "54321"){             gotoandplay (239,"cena 4");             }         if (txt_inpt.text == "12123"){             gotoandplay (358,"cena 3");             }         if (txt_inpt.text == "191918"){             stone++             stone++             stone++             soundmixer.stopall();             gotoandplay (950,"cena 8");             }         } 

you should verify names of text field , button of yours, should named spelled in code, , name should assigned while designing mc located at.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -