Hi Brian

As a general rule of thumb, I never use the visible property to toggle a
sprite's visibility on and off. I prefer to either move the sprite offstage
to an invisible area or most likely set the member of a sprite to be another
member and using a zero pixel placeholder as the initial graphic. It
certainly beats going through a huge list of visibilities to get the job
done.

Example:

Lets say that you have to show an image at screen coordinate point(200,200)
when the enduser clicks a button at some other coordinate. Then I would
create a placeholder called "Blank" or whatever you want to call it, this is
done by creating a new paintwindow bitmap by opening the paint window (and
hitting the + sign if necessary) and just typing in the name "Blank" for the
member's name and then closing that window. Next I drag it onto the score
and move it to the correct coordinate point(200,200) on the stage. Then I
basically just script my button handler to a hardcoded or a GPDL value for
that sprite number and assign it to a property pAliasSprite. Then

on mouseUp me
        sprite(pAliasSprite).member = member("someMember",someCastLibNum)
end mouseUp

Hope that might help you a bit.

Sincerely

Mark

--------------------------------------------
Mark R. Jonkman
Mark R. Jonkman Consulting
ADDRESS: 20 Windermere Crt., Guelph, ON, CANADA N1E 3L4
PHONE: 519-837-8509
EMAIL: [EMAIL PROTECTED]
--------------------------------------------

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Brian Farmer
> Sent: Thursday, December 28, 2000 11:20 AM
> To: [EMAIL PROTECTED]
> Subject: <lingo-l> Help with changing castmember
>
>
> Hello list!
>
> I am working on a project that the end user can choose several
> options. (Doors) I was wondering how I can swap the current
> castmember for the one they choose. Also, what if they want to
> change that castmember for another one. I am confused!
>
> On a slightly different problem....I have small alias images for
> several buttons within my interface. What I am doing at this
> point is turning the alias's on and off based on the button that
> is clicked. Great so far. But I am wondering if there is a
> simpler way of doing it. Here is the code I am using:
> sprite(1).visible = false
>   sprite(2).visible = false
>   sprite(3).visible = false
>   sprite(4).visible = false
>   sprite(5).visible = false
>   sprite(6).visible = false
>   sprite(7).visible = false
>   sprite(8).visible = false
>   sprite(9).visible = false
>   sprite(10).visible = false
>   sprite(11).visible = false
>   sprite(12).visible = false
>   sprite(13).visible = false
>   sprite(14).visible = false
>   sprite(15).visible = false
>   sprite(16).visible = false
>   sprite(17).visible = false
>   sprite(18).visible = false
>   sprite(19).visible = false
>   sprite(20).visible = false
>
> Then I turn them on if the end user clicks on the button for that
> catagory. If I do this: sprite(2,3,4,5,6,7,8,9,10).visible =
> false it will not work. What am I doing wrong? Thanks everyone
> for all your help!
>
> p.s. I am developing on a mac. This will be a shockwave piece.
>
>
>
> [To remove yourself from this list, or to change to digest mode, go to
> http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
> email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
> Lingo-L is for learning and helping with programming Lingo.  Thanks!]
>
>


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to