realbasic-games
[Top] [All Lists]

Re: Updating Sprite Images

To: "REALbasic Games" <REALbasic-Games at lists dot realsoftware dot com>
Subject: Re: Updating Sprite Images
From: "Joseph J. Strout" <joe at realsoftware dot com>
Date: Fri, 14 Nov 2003 11:35:42 -0600
References: <4A7517E0-16C7-11D8-B964-000A27D8B464 at earthlink dot net>
At 12:23 PM -0500 11/14/03, Mark Lawrimore wrote:

I am trying to update a sprite image in a part of code that's not in the SpriteSurface NextFrame or Collision.

That's fine.

 Will SpriteSurface1.update work in a different section of code?

Well, yes, but that has nothing to do with updating a sprite image. That updates the entire SpriteSurface! You use this when you're not using SpriteSurface.Run, to instead drive your sprite surface from a loop or Timer.

if Lives=0 then
ark.image=ark4 // the game ends here, but I want to display the ark4 image on the sprite.
SpriteSurface1.update ???

Yep, that'll be fine, since the SpriteSurface is not running at this point but you want to update its display. (Just keep in mind that the NextFrame event is going to fire during this call to Update.)

Thanks Joe for all your help so far!

Don't just thank me, thank all the other REALbasic-games members who are as eager to help the new folks as they are to have more experienced folks help them. :) (This is a not-so-subtle hint to other readers -- it's always good to consider your karma!)

Cheers,
- Joe

--
,------------------------------------------------------------------.
|    Joseph J. Strout           REAL Software, Inc.                |
|    joe at realsoftware dot com       http://www.realsoftware.com        |
`------------------------------------------------------------------'

- - -
Unsubscribe or switch delivery mode:
<http://support.realsoftware.com/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>