Put a image over other image?

31 views
Skip to first unread message

Emilio Raul

unread,
Jun 4, 2015, 11:42:26 PM6/4/15
to mitappinv...@googlegroups.com
This is a basic question.
I have these two images, a bird nest and an egg. I want to put the egg over the bird nest but when i try it the egg go up and the bird nest go down of the screen. How can i do this? Thanks

SteveJG

unread,
Jun 5, 2015, 7:48:53 AM6/5/15
to mitappinv...@googlegroups.com
To use two images on the screen you cannot put one on top of another... images must be over and under one another or next to (left and right).  You can use several image sprites on a canvas and achieve an overlap of the images; however to do so is complex.   If you put two images at the same location on a Canvas, one of them is on top and one on the bottom...   this phenomenon is called sprite cannibalization.    There is a way to overcome sprite cannibalization.




and this link too might help   

https://docs.google.com/document/d/1vMOewOPYmN4gzbDiXJgLeCQ1W5MzuT7ogXQqV96R0P8/edit?usp=sharing

Regards,
Steve

Greg Jensen

unread,
Jun 5, 2015, 12:52:26 PM6/5/15
to mitappinv...@googlegroups.com
The only way to do this is to put a background image on your canvas.  Use image sprites with clear sections and they will appear to be objects against the background.  You only get two layers tho:  Background and sprites.

Abraham Getzler

unread,
Jun 5, 2015, 1:05:52 PM6/5/15
to mitappinv...@googlegroups.com
Don't sprites have Z axes that control their visibility order when they overlap?

Or you could avoid the question entirely by drawing a new sprite of an egg peeping out of a nest,
and use an underlying model of your eggs and nests to decide which sprite to show where.

ABG










Peep Prants

unread,
Jun 5, 2015, 1:54:31 PM6/5/15
to mitappinv...@googlegroups.com
In this app I have.
1. screen backround image
2. canvas with play/pause function (canvas backround image)
3. image spirit with moving song time duration point.

https://play.google.com/store/apps/details?id=appinventor.ai_peep_prants.Netiraadio
Reply all
Reply to author
Forward
0 new messages