Thanks for the reply Lucio your post has given me the clue to finding
out what was wrong.
What you did also worked for me but curious to know why it doesn't
work when I set the opacity from the __init__ method. I looked a lot
closer and see that my code uses sets the alpha value of the
ColoredLayer to the same value as my Sprite. But behind the
ColoredLayer is nothing but black.
I added the explanation for any other newbies, like myself, who came
across this thread. Nothing worse than seeing a post with a problem
close to yours that concludes with "Great worked it out now." and no
explaination.
Love the cocos package as it has made getting my app together a breeze
in much less time than I'd thought.
Thanks again Lucio.
john
PS The website doesn't make it clear how a book can be bought for you
guys. I make no promises ;-)
On Aug 27, 10:13 am, "Lucio Torre" <[EMAIL PROTECTED]> wrote:
> On Mon, Aug 25, 2008 at 6:46 AM, xyloidhead <[EMAIL PROTECTED]> wrote:
>
> > If anyone could clear something up it would be much appreciated.
>
> > I have a full screen sprite, made from a file over the top of a
> > Coloured layer, white. I thought if I reduced the opacity of the
> > sprite it would tend to white, or whatever colour I set the coloured
> > layer to.
>
> > Instead it tends to black?
>
> > If I have no sprite the layer is whatever colour I set it to.
>
> > Probably me but I thought I'd ask.
>
> > I'm using cocos2d-0.3.0rc0 and my test code is below.
>
> sorry for the delay. i just did this in trunk:
>
> slide1 = Slide()
> slide1.setBackground("grossini.png", 128)
>
> scene1 = Scene( slide1 )
> director.run( scene1 )
>
> and it works as expected. white background, half transparent grossini.
>
> maybe it its not too late and you are still having issues i could give
> you a hand.
>
> Lucio.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"cocos2d discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cocos-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---