Re: [Flashcoders] Best way to control game character animations

2007-05-30 Thread Frederico Ferro Schuh

Well I figured out the problem, it once more was caused by modifications in
the display list during an input event... calling updateAfterEvent() solved
all the blinking issues. I'm still getting used to that...  seems like it's
easy to mess things up if you forget to call it.

But I'm glad I can still get to control the animations adding and removing
MovieClips as needed.

I took a look at the scrollRect stuff, but that's for optimizing... I'm not
that far yet :)
Just have to get the animations to work first.

Thanks for the feedback!

On 5/29/07, Jim Berkey [EMAIL PROTECTED] wrote:


If I'm understanding the question, I just read a blog about this . . .
possibly Sprite sheets + scrollrect is what you are looking for??
http://mikegrundvig.blogspot.com/2007/05/as3-is-fast.html

*** REPLY SEPARATOR  ***

On 5/29/2007 at 11:54 AM Bob Wohl wrote:

can you set their visability? (AS3 noob i am)



B.

On 5/28/07, Frederico Ferro Schuh [EMAIL PROTECTED] wrote:

 Hello list,

 I've been fiddling around with character animations for use in AS3
flash
 games. What's not clear to me is the animation control.

 What's the best way to switch the current animation of the character? I
 tried having each animation in its own MovieClip, and add/remove and
 play/stop them as necessary, but this causes blinking problems in
slower
 machines (you can sometimes see the character disappearing and
appearing
 when the animation switches), which's not a good thing. I believe this
is
 related to the asyncronous nature of the flash player.

 What I'm doing now is have a master MovieClip that contains one
character
 animation in each frame, and switch between them as needed. This looks
a
 little clumsy to me, as objects get created/destroyed unnecessarily,
and
 it's hard to manage them.

 Is this the only way to go, or is there a better solution? Any hints on
 this
 would be really appreciated.
 Thanks.

 --
 Frederico Ferro Schuh
 MSN [EMAIL PROTECTED]
 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

h

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com





--
Frederico Ferro Schuh
MSN [EMAIL PROTECTED]
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Best way to control game character animations

2007-05-28 Thread Frederico Ferro Schuh

Hello list,

I've been fiddling around with character animations for use in AS3 flash
games. What's not clear to me is the animation control.

What's the best way to switch the current animation of the character? I
tried having each animation in its own MovieClip, and add/remove and
play/stop them as necessary, but this causes blinking problems in slower
machines (you can sometimes see the character disappearing and appearing
when the animation switches), which's not a good thing. I believe this is
related to the asyncronous nature of the flash player.

What I'm doing now is have a master MovieClip that contains one character
animation in each frame, and switch between them as needed. This looks a
little clumsy to me, as objects get created/destroyed unnecessarily, and
it's hard to manage them.

Is this the only way to go, or is there a better solution? Any hints on this
would be really appreciated.
Thanks.

--
Frederico Ferro Schuh
MSN [EMAIL PROTECTED]
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Custom cursor leaves artifacts on the screen

2007-05-24 Thread Frederico Ferro Schuh

Hello coders,

I've been having a problem with custom cursors in AS3, where it sometimes
leaves dirt on the screen, as if it hadn't been repainted on the region
where the cursor just passed. It's also noticeable that the cursor's shape
gets cut off while it moves, like some kind of tearing.

The cursor is a simple MovieClip added to the stage, and the mouse cursor is
hidden, though this doesn't seem to have anything to do with the problem
itself.
Has anyone come by a similar problem?

Thanks.

--
Frederico Ferro Schuh
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Custom cursor leaves artifacts on the screen

2007-05-24 Thread Frederico Ferro Schuh

Oh cool, I didn't know about that method.
Yeah, that did it. Thank goodness there was a trivial solution to this
problem :)

But it's strange that these sorts of problems happen... I was sure flash
would only update the screen during the next frame redraw step... it seems
like moving stuff on a MouseEvent and not on an EnterFrame event would mess
things up somehow and the player wouldn't know which dirty regions to
repaint.

Thank you very much for the help.

On 5/24/07, Muzak [EMAIL PROTECTED] wrote:


Have you tried updateAfterEvent() ?
http://livedocs.adobe.com/flash/9.0/main/1233.html

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/events/MouseEvent.html#updateAfterEvent()

regards,
Muzak

- Original Message -
From: Frederico Ferro Schuh [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Thursday, May 24, 2007 5:30 PM
Subject: [Flashcoders] Custom cursor leaves artifacts on the screen


 Hello coders,

 I've been having a problem with custom cursors in AS3, where it
sometimes
 leaves dirt on the screen, as if it hadn't been repainted on the region
 where the cursor just passed. It's also noticeable that the cursor's
shape
 gets cut off while it moves, like some kind of tearing.

 The cursor is a simple MovieClip added to the stage, and the mouse
cursor is
 hidden, though this doesn't seem to have anything to do with the problem
 itself.
 Has anyone come by a similar problem?

 Thanks.

 --
 Frederico Ferro Schuh


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com





--
Frederico Ferro Schuh
ICQ 20486081
MSN [EMAIL PROTECTED]
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] (AS3) getChildAt() returns null children

2007-05-12 Thread Frederico Ferro Schuh

Hi all,

has anyone experienced this problem with getChildAt() returning null for
some of its children?

I have some movieclips which are rather complex animations with some nested
stuff in them. My problem is that I have to make sure the nested movieclips
(which have 2 frames each) stay stopped in either the first or second frame,
at any one time.
I know you can't mess around with a movieclip's animation before it's even
appeared on the screen, so everything I'm doing happens AFTER it was added
to the stage.

What I try to do is simple: at each frame of the animation (I have an
enterFrame listener on it), I run through every single of its children and
call either gotoAndStop(1) or gotoAndStop(2) as needed.
This was supposed to work, if I hadn't run into this strange issue with null
children... Below is a sample code I used to check the current frame of each
of the animation's children. Surprisingly, some of them are listed as being
null, even though they are counted as valid children (from the numChildren
property):

for(var j:int = 0; j  mc.numChildren; j++) {
  if(mc.getChildAt(j) is Shape) {
 // ignoring Shapes, as they have no frames
 continue;
  }

  var current:MovieClip = MovieClip(mc.getChildAt(j));
  if(current != null) {
  trace( --  + current + :  + current.currentFrame + [ +
current.totalFrames + ]);
  }
  else {
  trace( --  + mc.getChildAt(j)); // always prints null
  }
}


I'm really confused here. Is this some kind of optimization Flash does with
its animations? I have the same behavior either with Flash 9 Alpha or Flash
CS3.

--
Frederico Ferro Schuh
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] Flash 9 Public Alpha stability issues

2007-01-30 Thread Frederico Ferro Schuh

That's odd, but good to hear that not everyone is having problems. Maybe
with some tweaking I may be able to avoid these crashes.

Do you have any huge images in your project?
I have a 1600x1200 jpeg image that represents the track. Maybe that has
something to do with the crashes, since I don't remember having any problems
when I was just prototyping the car's physics with no assets at all.

I'm also using references to assets in other Fla files, but I don't thing
those should be causing any problems, since Flash just copies them over into
the main Fla file.

On 1/29/07, James Marsden [EMAIL PROTECTED] wrote:


Hey Frederico,

I'm using 9 Alpha for a large game project, and the only problems I've
had have been with my code. It seems just as stable as the Flash 8 IDE.

There are a couple of things I'm not keen on though, and that's the
inability to assign more than one MC to any one Class (which has been
addressed in the Flash 9 IDE) and a 'cannot write to read only property'
error when adding and manipulating display objects whose classes are
loaded from child swfs...

J

Frederico Ferro Schuh wrote:

 Is anyone else developing with Flash 9 Alpha? Maybe you're also having
 such
 crash problems, but were able to find workarounds or know of any common
 pitfalls that can cause these problems? I'd appreciate any help, as I'd
 really like to know if it's too risky to go for developing a full
 product in
 this version of flash, or if it's better to just stay in the
experimental
 phase and wait a little more. But we need the Flash IDE to develop our
 games, it's just not possible to do it with Flex alone. If Flash 9
 alpha is
 really that unstable, we'll just have to keep developing in AS2 for a
 little
 longer.

 Thanks.



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com





--
Frederico Ferro Schuh
ICQ 20486081
MSN [EMAIL PROTECTED]
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] Flash 9 Public Alpha stability issues

2007-01-29 Thread Frederico Ferro Schuh

Hi all,

This is my first post in the list. I've been experimenting in some AS3
development with Flash 9 Public Alpha in our company, coding a racing game
prototype.
So far the experience has been great, at least from a coding perspective, as
I'm using Flex 2 to write the code and Flash 9 to compile and run it. It's
much cleaner to code in AS3, I found it very satisfying and much less ugly
then AS2, not to mention the increased performance.

Not everything went smoothly though. It's rather common to see Flash 9 crash
while running the game, taking down the whole IDE with it. At first I
thought it was a problem in the IDE itself, but then I started testing the
game directly in Flash Player and Internet Explorer. Again, I get random
crashes.

It's funny, because being such a high level tool, I'm not supposed to be
able to generate such violent crashes just by running Actionscript code, so
it must certainly be a bug somewhere in the VM, or in the code generated by
the Flash 9 Alpha compiler. I tested it in several different computers, all
with the same results.

It's not happening 100% of the times I test the game, but I can say it
happens often enough to be considered alarming. The Fla file has a little
over 10 megs, with the SWF being around 3 megs. I'm not using any sound so
far, it's basically a lot of sprites and animations. The crashes can happen
in just about any part of the game, but usually when the user clicks a
button to change the current screen, though the screen itself is pretty much
random. I also have noticed the crashes to have increased as I added more
assets to the main Fla file, though this might not be true.

Is anyone else developing with Flash 9 Alpha? Maybe you're also having such
crash problems, but were able to find workarounds or know of any common
pitfalls that can cause these problems? I'd appreciate any help, as I'd
really like to know if it's too risky to go for developing a full product in
this version of flash, or if it's better to just stay in the experimental
phase and wait a little more. But we need the Flash IDE to develop our
games, it's just not possible to do it with Flex alone. If Flash 9 alpha is
really that unstable, we'll just have to keep developing in AS2 for a little
longer.

Thanks.



--
Frederico Ferro Schuh
ICQ 20486081
MSN [EMAIL PROTECTED]
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com