-
1. Re: Flash variables will not pass on enterFrame
Ladnarth Apr 5, 2014 9:26 AM (in response to carl_si)This problem is probably related to the issue of Flash sprites not being fully instantiated on beginSprite. Delaying running your code should fix the problem. Something like the following untested code may work.
on beginSprite me
tmp = timeout().new("DelaySetupDoc", 1, #DelaySetupDoc, me)
end beginSprite
on DelaySetupDoc me, timeob
flashSprite = sprite("videoplayer")
rootRef = flashSprite.getVariable("root1", false)
rootRef.setUpDoc(the moviePath&"xml"&dirPath¤tMovie&"_nav.xml", the moviePath&"xml"&dirPath¤tMovie&".xml", the moviePath&"Src"&dirPath¤tMovie&".f4v")
end DelaySetupDoc
-
2. Re: Flash variables will not pass on enterFrame
SeanWilson Apr 6, 2014 1:28 PM (in response to Ladnarth)Remember to forget the timeout object, or the handler will be repeatedly called at 1ms intervals
on DelaySetupDoc me, timeob
timeob.forget()
flashSprite = sprite("videoplayer")
rootRef = flashSprite.getVariable("root1", false)
rootRef.setUpDoc(the moviePath&"xml"&dirPath¤tMovie&"_nav.xml", the moviePath&"xml"&dirPath¤tMovie&".xml", the moviePath&"Src"&dirPath¤tMovie&".f4v")
end DelaySetupDoc

