# Difficulty with Canvas and Screens

**URL:** <https://community.thunkable.com/t/difficulty-with-canvas-and-screens/1797526>\
**Category:** Feedback\
**Created:** [March 23, 2022, 4:08am UTC](https://community.thunkable.com/t/difficulty-with-canvas-and-screens/1797526 "2022-03-23T04:08:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![phelliottbzfvow](https://avatars.discourse-cdn.com/v4/letter/p/3d9bf3/32.png) [@phelliottbzfvow](https://community.thunkable.com/u/phelliottbzfvow)\
**Post date:** [March 23, 2022, 4:08am UTC](https://community.thunkable.com/t/difficulty-with-canvas-and-screens/1797526/1 "2022-03-23T04:08:10Z")

</div>

Hello,

My daughter is trying to create a more complicated app with many screens and a single screen with a canvas that handles a simple game. I’ve produced a simplified version with [Thunkable](https://x.thunkable.com/projectPage/623a7d750825760182ae640f) that has an intro screen, a directions screen that auto switches, and a screen with a canvas that has a thunkable beaver falling.

In preview mode, if you navigate to the canvas screen and press back, and go through the screens again it almost always crashes or doesn’t start the canvas the second time around. Chrome’s debug tools says it loads Phaser sound the first time, but it’s not defined the second time on this line of the javascript VM:

var mode = ‘SCALE’ === ‘SCALE’ ? Phaser.Scale.FIT : Phaser.Scale.ENVELOP

There seems to be an issue with mixing the two ways of development - screens and canvas with scenes - and it doesn’t properly reload Phaser if you return to a canvas screen. Is there a workaround for this issue or a better way to do this short of using canvas everywhere?

Thanks,  
Paul

 ![Screenshot 2022-03-22 235647](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/9/09fca62f1896bd159e71deb9d8de3383db10188e.png)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 23, 2022, 4:30am UTC](https://community.thunkable.com/t/difficulty-with-canvas-and-screens/1797526/2 "2022-03-23T04:30:44Z")

</div>

Are you designing for the web? If not, I’d test this in Thunkable Live on a mobile device. On my iPhone, it moves the sprite to a random position and then the sprite falls. If I go back and press start again, it does the same thing.

If I preview it in a browser, the results are unpredictable. Sometimes the sprite disappears completely.

---

<div class="post-metadata">

**Author:** ![phelliottbzfvow](https://avatars.discourse-cdn.com/v4/letter/p/3d9bf3/32.png) [@phelliottbzfvow](https://community.thunkable.com/u/phelliottbzfvow)\
**Post date:** [March 23, 2022, 1:16pm UTC](https://community.thunkable.com/t/difficulty-with-canvas-and-screens/1797526/3 "2022-03-23T13:16:57Z")

</div>

She’s doing it as part of a class, so more for education than for the web. It would make the iteration time of testing the app easier if it reliably worked in the web browser preview. It seems like a bug in the underlying virtual machine running the app in the web browser. I’m glad it works on a phone - I might have to set her up with one once she’s pretty sure it works.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [March 23, 2022, 4:07pm UTC](https://community.thunkable.com/t/difficulty-with-canvas-and-screens/1797526/4 "2022-03-23T16:07:49Z")

</div>

You might consider submitting a bug report. I don’t use the Canvas enough to really have a good sense for what’s happening here but I find it unpredictable – which is the reason I don’t use it often. It would be nice to have some of these issues fixed.

> **[Bugs and Feature Requests](https://docs.thunkable.com/bugs-and-feature-requests)**

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:13pm UTC](https://community.thunkable.com/t/difficulty-with-canvas-and-screens/1797526/5 "2024-11-08T13:13:25Z")

</div>


