imagesprite (partially) outside canvas

53 views
Skip to first unread message
Assigned to scottfr...@gmail.com by me

Mario Witdoek

unread,
Feb 16, 2014, 2:31:37 PM2/16/14
to mitappinv...@googlegroups.com
Hello

I'm a coach for coderdojo belgium and we use App Inventor to teach how to program for dutch speaking kids (12+).
Tx 4 the sw guys!

I have a question regarding canvas and imagesprites: can I put an imagesprite outside the canvas?

I have following situation (width and height):

a canvas of 200x200
an imagesprite of 50x100

I want to put the imagesprite at Y position between 100 and 190, and simulate with the same sprite different walls (during a game).

The sprite however refuses tho go below the bottom of the canvas.


Is it possible or do I need to find another algoritme?

Tx 

It's me ... Mario ;)

Taifun

unread,
Feb 17, 2014, 11:44:35 AM2/17/14
to mitappinv...@googlegroups.com
probably Scott's example can help https://groups.google.com/forum/#!category-topic/app-inventor-developers-library/BVETLCTSQtc
Taifun

Trying to push the limits of App Inventor! Snippets and Tutorials from Pura Vida Apps by Taifun.         

Scott Ferguson

unread,
Feb 27, 2014, 8:53:33 AM2/27/14
to
revised 2014-02-27

...along those lines you could:
Make your canvas 240x290px.
create an image mask that is picture frame image that is also 240x290px.
It would have a 40px border of any color on the left and right and a 90px border on the top and bottom.
The center should be transparent.
place it inside an imagesprite that is also 240x290px and has a higher z level than the one you are moving.
Now your imagesprite can left and right up and down to within 10px of any border but is really hiding behind the picture frame mask.
---
Scott
Reply all
Reply to author
Forward
0 new messages