Ask a Question related to Macromedia Director Lingo, Design and Development.
-
Darrel Hoffman #1
Store a color as a cast member...
I'm trying to decide what's the best way to do this. I've created a game, and I'm now making it
"skinnable", like, say, Winamp. (It's nothing like Winamp, other than that. It's a game,
damnit.) Anyways, I'm basically storing the "skins" as their own seperate external casts. I
would like the entire skin to exist as a single file, for ease of use. Each "skin" contains all
the custom graphics, sound effects, and text elements for the game. What I also want to do is
to have various colors, rgb values, stored as individual cast members. I'd like to able to just
say: 'redSwatch.color = member("redSwatch", gSkin).color'. However, I can't seem to find any
way to store just a color as a cast member. I tried making a colored rectangle, but apparently
that doesn't store any color info except in the icon it shows in the cast. I suppose I could
have a 1-pixel bitmap and use imaging lingo to read the color of the pixel, but that's kind of
an annoying way to do it. (Especially since I want to also create a skin-creator application,
to make it easy for users to create their own skins.) I could use a text/field object with the
text or its background set to the colors in question, again, seems a bit of a round-about way of
doing it. I thought about using a Palette object, but first of all, it creates 256 colors, not
just 1 at a time, (I need 3 total), and secondly, I'm not even sure there's any way of easily
accessing an individual color from a palette like that. (I don't want to have to use the
Palette channel in the score, I think that's pretty much an out-dated feature from the days of
8-bit color anyways.) Finally, I could store the color simply as text in a text/field member,
one line which simply says "rgb(255,255,255)" or something. Or maybe I could store 3 seperate
numbers for R, G, and B values, using an item delimiter between them. All of these techniques
really seem like hack-job ways of doing this, however. Is there any really good way of just
storing a single color value, all by itself in a cast member?
Darrel Hoffman Guest
-
3D cast member access
hi all, i want to exchange 3d model data with a director app and a 3rd party application at runtime. because the data must go both ways and... -
How to let objects in a cast member be a child of agroup(or a model) in another cast member?
I want to add a model to the scene. I try this code: member('world').newgroup('gr2') member('world').group('gr2').addchild(member('r2').model(1)) ... -
Cast member name limit bug
I can assign a long name to a member's name property, but if I try to retrieve it by that name, it fails. For example, the following statement is... -
where to store external cast files
Could someone please tell me where the best place is to store external casts? Are the ".cst" files included in the projector? And can the cast... -
copy cast member
Hi, I need making a copy of member 1 from cast 2 to member 3 from cast 1... how to make? please, in lingo...... no (ctrl +c and ctrl+v) -
Richie Bisset #2
Re: Store a color as a cast member...
storing the colour as a string sounds like the best option to me. ten
it would be fairly easy to use lingo to apply it to sprites. remember
you can use hex colors instead of rgb too.
hth,
richie
On Tue, 23 Sep 2003 21:42:50 -0400, "Darrel Hoffman" <no@spam.com>
wrote:
>oRichie Bisset Guest
-
hairybobby webforumsuser@macromedia.com #3
Re:Store a color as a cast member...
I've heard theres a properties xtra. Thats the ideal solution for games. I don't know anything else about it though.
HAIRYBOBBY - why didn't I choose a really cool name like the vulcanpimp
[url]http://www.geocities.com/hairybobby2000[/url]
new vector shape behaviors here
[url]http://www.geocities.com/hairybobby2000/vertexhome.html[/url]
hairybobby webforumsuser@macromedia.com Guest
-
Gretchen Macdowall #4
Re: Store a color as a cast member...
In article <bkqsfs$pco$1@forums.macromedia.com>, "Darrel Hoffman"
<no@spam.com> wrote:
in a text/field member,> 8-bit color anyways.) Finally, I could store the color simply as textcould store 3 seperate> one line which simply says "rgb(255,255,255)" or something. Or maybe I
This is nowhere near as economical as Robert's pixel idea, but when I had
to do it I stored it as text with a forecolor and used the forecolor of
word 1 of field whatever to retrieve it. That was before there was a color
object but it would still work with that, with the added advantage that
you could see the colors.
Gretchen Macdowall
[url]http://www.updatestage.com/[/url]
Gretchen Macdowall Guest



Reply With Quote

