[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnash-dev
Subject:    Re: [Gnash-dev] gotoAndPlay() bug (was: Detect if a AS variable is
From:       strk <strk () keybit ! net>
Date:       2007-02-21 16:38:24
Message-ID: 20070221163824.GA68307 () keybit ! net
[Download RAW message or body]

On Tue, Feb 20, 2007 at 10:14:54AM +0100, Udo Giacomozzi wrote:
> 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?

I think we found out that gotoAndPlay(<constant>) is translated
to a GOTOFRAME nd gotoAndPlay(<variable>) is translated to
a GOTOEXPRESSION (or GOTOFRAME2) tag.
This is surely true for Ming, which uses gotoFrame for this "translation"
and leaves gotoAnd{Play,Stop} alone as function calls.
BTW, are you able to produce gotoAnd{Play,Stop} as function calls
with your compiler ? (looking for a better handling of rthis in Ming).

> 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?

The GOTOFRAME and GOTOEXPRESSION swf *tags* are handled in 
server/vm/ASHandlers.cpp.
The gotoAnd{Play,Stop} functions are handled in sprite_instance.cpp.

Boths should fianlly call sprite_instance::goto_frame()

--strk;



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic