Discuss Scratch

Jonathan50
Scratcher
1000+ posts

Scratch 2.0 Modding for Newbs

L0LW0T wrote:

when green flag clicked
NOPE
Did you successfully change the directory? Each time you open Command Prompt, the working directory is reset, so you need to do this each time.
1a3c5e7g9i
Scratcher
100+ posts

Scratch 2.0 Modding for Newbs

1a3c5e7g9i wrote:

What does this mean:
Could not determine java version from '9.0.4'.
(happens after doing ./gradlew build)
_D52
Scratcher
16 posts

Scratch 2.0 Modding for Newbs

Attempted to make a block like this:

if <> then [] else [] :: control reporter // Reports first value if true, else reports second value.

In Specs.as, I inserted @“if %b then %s else %s”, “r”, 6, “if:then:else:”@,
In Interpreter.as, I inserted primTable@“if:then:else:”@ = function(b:*):* { if (arg(b, 0)) return (b, 1); else return (b, 2); };
(Note that I replaced square brackets with @ because otherwise it thinks it's formatting)

And once I recompiled it, I got a white screen attempting to open the file. What went wrong?

EDIT: I added spacings between the if then blocks and that's what screwed it up.

Last edited by _D52 (July 19, 2019 08:59:51)

_D52
Scratcher
16 posts

Scratch 2.0 Modding for Newbs

./gradlew build suddenly won't work. I didn't make any changes to the source code after it worked fine.
1a3c5e7g9i
Scratcher
100+ posts

Scratch 2.0 Modding for Newbs

1a3c5e7g9i wrote:

What does this mean:
Could not determine java version from '9.0.4'.
(happens after doing ./gradlew build)
SpaceChuck
Scratcher
2 posts

Scratch 2.0 Modding for Newbs

How to edit the sprite/sound library? (add sprites,change the default sprite)

My browser / operating system: Windows 7, Chromium 78.0.3895.0, No Flash version detected
irvinborder
New Scratcher
2 posts

Scratch 2.0 Modding for Newbs

It is because of Java version mismatch. Unsupported major.minor version error happens when you compile your projects on higher version of java(e.g. jdk 1.8) and then run it on a lower version (e.g. jdk 1.7). Depending on your situation, you have two ways to resolve this error: compile your code for an earlier version of Java, or run your code on a newer Java version. Sometimes you may have more than one version of Java SDK installed in your machine. Make sure the application you are running is pointing to the right or highest version available . It is better you need to install both JRE/JDK with the same version.

http://net-informations.com/java/cjava/unsupport.htm
D-07N2
Scratcher
92 posts

Scratch 2.0 Modding for Newbs

2.0 is outdated, what is the point of this anymore?
Sheep_maker
Scratcher
1000+ posts

Scratch 2.0 Modding for Newbs

D-07N2 wrote:

2.0 is outdated, what is the point of this anymore?
Some people prefer the 2.0 editor, so let's not discourage them from continuing to work with it
iransound
New Scratcher
1 post

Scratch 2.0 Modding for Newbs

I need Help Now

https://guitarmusics.com/madahi/

Last edited by iransound (April 10, 2020 08:31:52)

R4356th
Scratcher
1000+ posts

Scratch 2.0 Modding for Newbs

iransound wrote:

I need Help Now

https://guitarmusics.com/madahi/
What kind of?
DragoCuven
Scratcher
61 posts

Scratch 2.0 Modding for Newbs

djdolphin wrote:


2.0 Modding for Newbs


Here's a tutorial for making Scratch 2.0 mods, as they are somewhat harder to make than Scratch 1.4 mods. The purpose of this topic is to prevent a wave of people asking how to do this in the future. Please correct me if any of this information is wrong.

First off, Scratch 2.0 is programmed in a language called ActionScript. You'll need basic knowledge of it (or some other ECMAScript dialect) in order to follow most of this tutorial.

The New Way

Getting the Source Code

  1. If you don't already have it, install git.
  2. Run the command
    git clone https://github.com/LLK/scratch-flash
Compiling Scratch

You'll need to compile Scratch every time you make changes.
  1. Open a terminal.
  2. Change the directory to the one containing the Scratch source code (the one containing the src directory, not the src directory itself) by running
    cd <path to source code>
  3. If you're using a Unix-like OS, run
    ./gradlew build
    If you're using Windows, run
    gradlew.bat build
  4. If all goes well, Scratch can be found at build/11.6/Scratch.swf. If you get an error, and you've made changes to the code, then it's likely a problem with your code.

    If you get an error saying
    Redirection detected from https to http. Protocol switch unsafe, not allowed.
    then manually download OSMF_1.0.zip and put it in <your home directory>/.gradle/gradleFx/sdks/<some number>/in. (Thanks Jonathan50)





if i were to actually do all of this would my project still be shareable? and if so would the screen resolution stay that way? or would it go back to normal?
Ascold
Scratcher
23 posts

Scratch 2.0 Modding for Newbs

djdolphin wrote:


2.0 Modding for Newbs


Here's a tutorial for making Scratch 2.0 mods, as they are somewhat harder to make than Scratch 1.4 mods. The purpose of this topic is to prevent a wave of people asking how to do this in the future. Please correct me if any of this information is wrong.

First off, Scratch 2.0 is programmed in a language called ActionScript. You'll need basic knowledge of it (or some other ECMAScript dialect) in order to follow most of this tutorial.

The New Way

Getting the Source Code

  1. If you don't already have it, install git.
  2. Run the command
    git clone https://github.com/LLK/scratch-flash
Compiling Scratch

You'll need to compile Scratch every time you make changes.
  1. Open a terminal.
  2. Change the directory to the one containing the Scratch source code (the one containing the src directory, not the src directory itself) by running
    cd <path to source code>
  3. If you're using a Unix-like OS, run
    ./gradlew build
    If you're using Windows, run
    gradlew.bat build
  4. If all goes well, Scratch can be found at build/11.6/Scratch.swf. If you get an error, and you've made changes to the code, then it's likely a problem with your code.

    If you get an error saying
    Redirection detected from https to http. Protocol switch unsafe, not allowed.
    then manually download OSMF_1.0.zip and put it in <your home directory>/.gradle/gradleFx/sdks/<some number>/in. (Thanks Jonathan50)

Execution failed for task ‘:compileFlex’.
> Could not resolve all dependencies for configuration ‘:external’.
> Could not resolve macromedia.com:playerglobal:11_6.
Required by:
:scratch-flash:1.0-SNAPSHOT
> Could not resolve macromedia.com:playerglobal:11_6.
> Could not get resource 'http://fpdownload.macromedia.com/get/flashplayer/installers/archive/playerglobal/playerglobal11_6.xml'.
> Could not GET 'http://fpdownload.macromedia.com/get/flashplayer/installers/archive/playerglobal/playerglobal11_6.xml'. Received status code 403 from server: Forbidden

I go to the site from the error says that I do not have the necessary rights

My browser / operating system: Windows NT 10.0, Chrome 100.0.4896.75, Flash 32.0 (release 0)

roforb
Scratcher
14 posts

Scratch 2.0 Modding for Newbs

Ascold wrote:

djdolphin wrote:

I go to the site from the error says that I do not have the necessary rights

My browser / operating system: Windows NT 10.0, Chrome 100.0.4896.75, Flash 32.0 (release 0)

Scratch 2.0 is old. The download link might be down now, try to find a mirror download. Or it might be because flash died 2 years ago.
SysDataSoft
Scratcher
5 posts

Scratch 2.0 Modding for Newbs

Hello,after starting compiling i see this:
gradlew.bat build
Downloading https://services.gradle.org/distributions/gradle-2.5-bin.zip
…………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………….
Unzipping C:\Users\Егор\.gradle\wrapper\dists\gradle-2.5-bin\7mk8vyobxfh3eazpg3pi2y9mv\gradle-2.5-bin.zip to C:\Users\Егор\.gradle\wrapper\dists\gradle-2.5-bin\7mk8vyobxfh3eazpg3pi2y9mv

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine java version from ‘19.0.1’.

* Try:
Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output.
I know,this error is invail Java version,but how wersion is correct?????

Powered by DjangoBB