Highlighted

Is there a way to show objects outside of the stage in HTML5 Canvas

Participant ,
Nov 29, 2019

Copy link to clipboard

Copied

Hello all, 

 

      I am transitioning a Flash Game to HTLM5 Canvas (who isn't right?) and this board has been such a great reference for me. I believe I am about done, and everything is as it should except for the AS3 equivalent of stage.SHOW_ALL. My stage is 1024 x 768 and usually the off stage elements just get revleaved on screens that are larger. Then I just test for the screen size and adjust from there. 

 

Is anything like this possible in HTML5 \ CreateJS?

Thanks

Adobe Community Professional
Correct answer by ClayUUID | Adobe Community Professional

The stage in HTML5 Canvas documents is a single HTML5 canvas element. So no, it's impossible for a canvas element to display anything outside of itself. If you want your display area to be adaptive, you'll have to dynamically change the resolution of the canvas.

TOPICS
How to

Views

76

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Is there a way to show objects outside of the stage in HTML5 Canvas

Participant ,
Nov 29, 2019

Copy link to clipboard

Copied

Hello all, 

 

      I am transitioning a Flash Game to HTLM5 Canvas (who isn't right?) and this board has been such a great reference for me. I believe I am about done, and everything is as it should except for the AS3 equivalent of stage.SHOW_ALL. My stage is 1024 x 768 and usually the off stage elements just get revleaved on screens that are larger. Then I just test for the screen size and adjust from there. 

 

Is anything like this possible in HTML5 \ CreateJS?

Thanks

Adobe Community Professional
Correct answer by ClayUUID | Adobe Community Professional

The stage in HTML5 Canvas documents is a single HTML5 canvas element. So no, it's impossible for a canvas element to display anything outside of itself. If you want your display area to be adaptive, you'll have to dynamically change the resolution of the canvas.

TOPICS
How to

Views

77

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 29, 2019 0
Adobe Community Professional ,
Nov 29, 2019

Copy link to clipboard

Copied

The stage in HTML5 Canvas documents is a single HTML5 canvas element. So no, it's impossible for a canvas element to display anything outside of itself. If you want your display area to be adaptive, you'll have to dynamically change the resolution of the canvas.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 29, 2019 0
Participant ,
Dec 02, 2019

Copy link to clipboard

Copied

Thanks, 

    

     Thats what a figured but I thought I would see if I was missing something or if people had a "trick" to achieve the same results. I unforuntely hardcoded many x and y coordinates. Cheers

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 02, 2019 0