问题
The default resolution of the Stage in MIT Scratch is 480x360 in a 4:3 aspect ratio. I want to change it to a 16:9 aspect ratio, with a 720p resolution. Is there any source file or script that has to be edited in order to do this?
Also, I found this link: https://scratch.mit.edu/discuss/topic/52369/ but I cannot understand how to do so. Here is a source file from that link: https://github.com/LLK/scratch-flash/blob/053d2b2eaf172ed2889211f5f57621731183f5c1/src/scratch/ScratchObj.as (Go to the line #51 to see the width and height of the stage: https://github.com/LLK/scratch-flash/blob/053d2b2eaf172ed2889211f5f57621731183f5c1/src/scratch/ScratchObj.as#L51 ) How to edit that source file, and then how would I compile it? Whenever I open that ActionScript file, It opens in Adobe Animate CC with black text on a black background (which I can't read).
Can anyone give me the step-by-step instructions to do that?
回答1:
Hey!
Compiling scratch from source would be a lot of work, there are better ways for this.
I think there are two efficient ways to solve that problem:
- You can embed the project into a website, using the following snippet:
Change the height and width of the snippet like you want. This only works, when your project is published.
Replace [Project ID]
with the id at the end of the URL when opening the editor in Scratch.
(Example: https://scratch.mit.edu/projects/12345678/#editor
-> Change [Project ID]
to 12345678
)
<div style="overflow-y: hidden; height: 720px; overflow-x: hidden; width: 960px;"
id="applet">
<iframe style="margin-top:-70px; margin-left:-11px;" allowtransparency="false"
width="980" height="820" bgcolor=#220000
src="http://scratch.mit.edu/projects/embed/[Project ID]/?autostart=true"
allowfullscreen>
</iframe>
<br/><br/>
</div>
- You can use the Sulfurous Player
Open your project in the Sulfurous Player, after that you can set a custom width and height. If you use 16:9 make sure elements at the bottom of the stage won't get cut off.
回答2:
Actually there is no way to change scratch resolution without modifying the files.
But you can use this script: script
Actually if you use vector graphics ie the graphics which can be infinitely scaleable maybe fullscreen mode would be enough. Also, using 720p in scratch might not be that appealing in an engine(software) like that.
HOPE THIS HELPS
来源:https://stackoverflow.com/questions/52241482/how-to-change-the-resolution-of-the-stage-in-mit-scratch