Discuss Scratch

jokebookservice1
Scratcher
1000+ posts

How to use ActionScript in a Scratch Mod to interact with web?

I am new to ActionScript (and Scratch Modding), and was wondering how to make requests to web pages. I tried Googling and got slightly confused because of lack of example code, but I gathered that I need to do this at the top of the Primitives file
import URLLoader;
Also, if I have made a new category, do my block definitions go into Primitives.as

And one final question, what kind of attribution do I have to put, and what is the easiest way to do this?
DigiTechs
Scratcher
500+ posts

How to use ActionScript in a Scratch Mod to interact with web?

Leopard has a HTTP GET block here which basically works like you want, apparently. Other than using the code, all you have to do is add the blockspec.

It shouldn't be that hard, but if you do use my code, please give credit
jokebookservice1
Scratcher
1000+ posts

How to use ActionScript in a Scratch Mod to interact with web?

DigiTechs wrote:

Leopard has a HTTP GET block here which basically works like you want, apparently. Other than using the code, all you have to do is add the blockspec.

It shouldn't be that hard, but if you do use my code, please give credit
Thanks. One more thing, it says there is a type called “URLLoader”, do I need to import that, or is it automatically there?
DigiTechs
Scratcher
500+ posts

How to use ActionScript in a Scratch Mod to interact with web?

jokebookservice1 wrote:

DigiTechs wrote:

Leopard has a HTTP GET block here which basically works like you want, apparently. Other than using the code, all you have to do is add the blockspec.

It shouldn't be that hard, but if you do use my code, please give credit
Thanks. One more thing, it says there is a type called “URLLoader”, do I need to import that, or is it automatically there?

No, the code I linked you should just “work” if you copy and paste it.
jokebookservice1
Scratcher
1000+ posts

How to use ActionScript in a Scratch Mod to interact with web?

DigiTechs wrote:

jokebookservice1 wrote:

DigiTechs wrote:

Leopard has a HTTP GET block here which basically works like you want, apparently. Other than using the code, all you have to do is add the blockspec.

It shouldn't be that hard, but if you do use my code, please give credit
Thanks. One more thing, it says there is a type called “URLLoader”, do I need to import that, or is it automatically there?

No, the code I linked you should just “work” if you copy and paste it.
I don't like copying and pasting, because you don't learn. But I'll copy some of it up.

Powered by DjangoBB