[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re[2]: [Gnash-dev] gotoAndPlay() bug (was: Detect if a AS variable is vi
From: |
Udo Giacomozzi |
Subject: |
Re[2]: [Gnash-dev] gotoAndPlay() bug (was: Detect if a AS variable is visible in any variable?) |
Date: |
Tue, 20 Feb 2007 10:14:54 +0100 |
Hello strk,
Monday, February 19, 2007, 10:07:14 PM, you wrote:
s> See sprite_instance::_text_variables and
s> sprite_instance::set_textfield_variable.
Thanks. Just noticed what I said about in the original posting is not
true anymore.
However, I just noticed a weird behaviour of gotoAndPlay(): When it's
argument is a constant, then it works fine. However, when I pass a
variable to it, then it jumps to the frame after the desired one.
Maybe gotoAndPlay(<constant>) is translated to a static SWF tag?
Anyway, I tried to find the reason for this and noticed
sprite_instance::sprite_goto_and_play() gets never called in either
cases. Where is gotoAndPlay() handled?
Simple testcase:
-----------8<-------------------------------------------------------------
// assuming this code to be in frame 3 !
var temp = _currentframe;
if (temp==3)
trace("PASS: _currentframe reports frame "+temp);
else
trace("FAIL: _currentframe reports frame "+temp);
gotoAndPlay(temp);
//gotoAndPlay(3); // <-- works
if (_currentframe == temp)
trace("PASS: _currentframe="+_currentframe);
else
trace("FAIL: _currentframe="+_currentframe+" instead of being "+temp);
-----------8<-------------------------------------------------------------
Gnash reports:
10:10:41: PASS: _currentframe reports frame 3
10:10:41: FAIL: _currentframe=4 instead of being 3
Udo