[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnash-dev] invalidated bounds interfaces
From: |
strk |
Subject: |
Re: [Gnash-dev] invalidated bounds interfaces |
Date: |
Tue, 31 Oct 2006 11:41:44 +0100 |
On Tue, Oct 31, 2006 at 11:28:44AM +0100, Udo Giacomozzi wrote:
> Hello strk,
>
> Tuesday, October 31, 2006, 11:18:31 AM, you wrote:
> s> Can we add gravity-embed.swf to movies.all/ too ?
>
> Yes, of course.
Ok, added, with description in README.
> s> BTW, did you write gravity.swf ? (it seems to have a problem with
> s> local variables interpretation)
>
> Can you explain further? It's very simple ActionScript:
>
> === frame 1 ===
>
> dir_x = +2;
> dir_y = +2;
> gravity = 0;
> rot = 0;
>
> function tick() {
> var ball=this;
NOTE: this produces a call to ActionDefineLocal (0x3c) which
is told to create a 'local' variable.
>
> gravity++;
> ball._x += dir_x;
> ball._y += dir_y + gravity;
> ball._rotation += rot;
>
> if (ball._x < 40) bounce(+1, 0);
> if (ball._y < 40) bounce(0, +1);
> if (ball._x > 600) bounce(-1, 0);
> if (ball._y > 440) bounce(0, -1);
> }
>
> function bounce(bounce_x, bounce_y) {
> if (bounce_x != 0)
> dir_x = Math.random()*30*bounce_x;
> if (bounce_y != 0)
> dir_y = Math.random()*30*bounce_y;
> gravity=0;
> rot = Math.random()*20-10;
> ball.bounced();
NOTE: last statement references a variable which is "local" to
another function.
> Maybe because I'm nasty and do not declare dix_x and friends as
> variables?
Try having ball.bounced() trace something, and see if it is printed
on bounce.
--strk;
- Re: [Gnash-dev] invalidated bounds interfaces, (continued)
- Re: [Gnash-dev] invalidated bounds interfaces, strk, 2006/10/27
- Re[2]: [Gnash-dev] invalidated bounds interfaces, Udo Giacomozzi, 2006/10/27
- Re: [Gnash-dev] invalidated bounds interfaces, strk, 2006/10/30
- Re[2]: [Gnash-dev] invalidated bounds interfaces - loading external movies, Udo Giacomozzi, 2006/10/31
- Re: [Gnash-dev] invalidated bounds interfaces - loading external movies, strk, 2006/10/31
- [Gnash-dev] Verbosity level always high in head, strk, 2006/10/31
- [Gnash-dev] Re: Verbosity level always high in head, strk, 2006/10/31
- Re[2]: [Gnash-dev] invalidated bounds interfaces, Udo Giacomozzi, 2006/10/31
- Re: [Gnash-dev] invalidated bounds interfaces, strk, 2006/10/31
- Re[2]: [Gnash-dev] invalidated bounds interfaces, Udo Giacomozzi, 2006/10/31
- Re: [Gnash-dev] invalidated bounds interfaces,
strk <=
- Re[2]: [Gnash-dev] invalidated bounds interfaces, Udo Giacomozzi, 2006/10/31
- Re: [Gnash-dev] invalidated bounds interfaces, strk, 2006/10/31
- Re[2]: [Gnash-dev] invalidated bounds interfaces, Udo Giacomozzi, 2006/10/31
- Message not available
- Message not available
- Message not available
- [Gnash-dev] Re[2]: embed-gravity.swf, Udo Giacomozzi, 2006/10/31
- [Gnash-dev] Re: embed-gravity.swf, strk, 2006/10/31
- Re: [Gnash-dev] Re: embed-gravity.swf, strk, 2006/10/31
- [Gnash-dev] self-contained SWF testcases (was: Re: embed-gravity.swf), strk, 2006/10/31