This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#126 2011-12-07 08:50:45

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: JsScratch viewer development thread

MoreGamesNow wrote:

MathWizz wrote:

Are you asking if it is possible to read images (such as costumes) from a Scratch file in JavaScript? That's what I am trying to figure out right now.  tongue

Darn it!  And yes, that was what i was asking  big_smile   How are you getting the Scratch code with Java (my experience with Java is pretty much zero, so if it isn't possible to give me a simple answer, just say so  smile  )?

A Java decompiler.  big_smile


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#127 2011-12-07 13:47:10

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Re: JsScratch viewer development thread

Cocolover, you apparently are not a member of the team. Not that I am against you being part of the team, but you can't just walk in and join. Especially not in this project.


http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

#128 2011-12-07 14:16:17

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: JsScratch viewer development thread

Wow, sorry. I was somewhat busy and I forgot. ;_;

Sooo sorry.

Offline

 

#129 2011-12-09 14:08:48

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: JsScratch viewer development thread

Okay, I've been studying javascript in this 1000 page book. xD
So I may be of better use now, because I think I have gained a way better knowledge of it.

Offline

 

#130 2011-12-09 18:33:12

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: JsScratch viewer development thread

ProgrammingFreak wrote:

Okay, I've been studying javascript in this 1000 page book. xD
So I may be of better use now, because I think I have gained a way better knowledge of it.

It always astounds me that there is so much JavaScript out there.


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#131 2011-12-10 08:56:02

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: JsScratch viewer development thread

MoreGamesNow wrote:

ProgrammingFreak wrote:

Okay, I've been studying javascript in this 1000 page book. xD
So I may be of better use now, because I think I have gained a way better knowledge of it.

It always astounds me that there is so much JavaScript out there.

Yeah, there is. Probably more than that.

Offline

 

#132 2011-12-11 21:23:14

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: JsScratch viewer development thread

I've been taking a little brake from this (as you can see) and have been playing with C++.  big_smile


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#133 2011-12-11 22:35:29

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: JsScratch viewer development thread

MathWizz wrote:

I've been taking a little brake from this (as you can see) and have been playing with C++.  big_smile

I have too!

Could I join? I know javascript like the back of my hand. html too. I really want to see this when it's done.


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#134 2011-12-12 15:46:11

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: JsScratch viewer development thread

MathWizz wrote:

I've been taking a little brake from this (as you can see) and have been playing with C++.  big_smile

Interesting.

Anything I can do with this?

Offline

 

#135 2011-12-12 16:44:36

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: JsScratch viewer development thread

ProgrammingFreak wrote:

Anything I can do with this?

With what? This project (JsScratch)?


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#136 2011-12-12 18:34:28

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Re: JsScratch viewer development thread

MathWizz wrote:

I've been taking a little brake from this (as you can see) and have been playing with C++.  big_smile

haha that's exactly what I have been doing!


http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

#137 2011-12-12 18:35:46

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: JsScratch viewer development thread

MathWizz wrote:

ProgrammingFreak wrote:

Anything I can do with this?

With what? This project (JsScratch)?

Yes.

Offline

 

#138 2011-12-13 17:06:09

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Re: JsScratch viewer development thread

JP1 wrote:

Could I join? I know javascript like the back of my hand. html too. I really want to see this when it's done.

Hey JP1, I like a guy with a really short username. When I was young, I lied about programming knowledge to have my name on project staff lists.
Pop Quiz:
How do you define and create an instance of an object in javascript? Provide a code example. No google.


http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

#139 2011-12-13 18:37:50

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: JsScratch viewer development thread

midnightleopard wrote:

Pop Quiz:
How do you define and create an instance of an object in javascript? Provide a code example. No google.

Did you mean for that to be a trick question?


nXIII

Offline

 

#140 2011-12-14 14:11:42

midnightleopard
Scratcher
Registered: 2007-09-13
Posts: 1000+

Re: JsScratch viewer development thread

nXIII wrote:

midnightleopard wrote:

Pop Quiz:
How do you define and create an instance of an object in javascript? Provide a code example. No google.

Did you mean for that to be a trick question?

no. I am testing whats-his-name's expertise. Not a trick question, but I would accept

Code:

class = null;
if (!class){
alert('flafadsk');
}
else{
alert('alkdsjhsdklr');
}

http://pwp.wizards.com/5103673563/Scorecards/Landscape.png

Offline

 

#141 2011-12-14 14:22:46

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: JsScratch viewer development thread

What should I do?  smile

Offline

 

#142 2011-12-14 14:30:16

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: JsScratch viewer development thread

ProgrammingFreak wrote:

What should I do?  smile

Would you like to try making morphs rotatable in morphic.js?

EDIT: Thismay help.

Last edited by MathWizz (2011-12-14 14:31:40)


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#143 2011-12-14 14:30:53

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: JsScratch viewer development thread

MathWizz wrote:

ProgrammingFreak wrote:

What should I do?  smile

Would you like to try making morphs rotatable in morphic.js?

Sure. You mean Jen's morphic.js, right?

Offline

 

#144 2011-12-14 14:32:30

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: JsScratch viewer development thread

ProgrammingFreak wrote:

MathWizz wrote:

ProgrammingFreak wrote:

What should I do?  smile

Would you like to try making morphs rotatable in morphic.js?

EDIT: Thismay help.
Sure. You mean Jen's morphic.js, right?

Yes.  smile

BTW... Images are coming along!  big_smile


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#145 2011-12-14 14:33:59

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: JsScratch viewer development thread

MathWizz wrote:

ProgrammingFreak wrote:

MathWizz wrote:


Would you like to try making morphs rotatable in morphic.js?

EDIT: Thismay help.
Sure. You mean Jen's morphic.js, right?

Yes.  smile

BTW... Images are coming along!  big_smile

Awesome.  big_smile

Offline

 

#146 2011-12-14 14:41:26

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: JsScratch viewer development thread

My internet connection is being iffy right now so I might now be on for a while.  hmm


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

#147 2011-12-14 16:15:10

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: JsScratch viewer development thread

midnightleopard wrote:

nXIII wrote:

midnightleopard wrote:

Pop Quiz:
How do you define and create an instance of an object in javascript? Provide a code example. No google.

Did you mean for that to be a trick question?

no. I am testing whats-his-name's expertise. Not a trick question, but I would accept

Code:

class = null;
if (!class){
alert('flafadsk');
}
else{
alert('alkdsjhsdklr');
}

That's an if..else statement. I though you asked for object creation? e.g. (shortest example possible)

Code:

{}

The reason it's a "trick question" is because JavaScript doesn't really have instances, it just has objects and their "clones" (objects which inherit from other objects). Instances are a classical-inheritance thing.


nXIII

Offline

 

#148 2011-12-14 16:21:56

ProgrammingFreak
Scratcher
Registered: 2010-09-04
Posts: 1000+

Re: JsScratch viewer development thread

Okay, so I've done the code, but I can't get it to work with morphic. :l

Offline

 

#149 2011-12-14 22:34:39

GP1
Scratcher
Registered: 2009-07-06
Posts: 1000+

Re: JsScratch viewer development thread

midnightleopard wrote:

JP1 wrote:

Could I join? I know javascript like the back of my hand. html too. I really want to see this when it's done.

Hey JP1, I like a guy with a really short username. When I was young, I lied about programming knowledge to have my name on project staff lists.
Pop Quiz:
How do you define and create an instance of an object in javascript? Provide a code example. No google.

BTW, it's [color=red]GP1[color].

So, isn't it like this:

Code:

function Vector2(x, y){
if(x==undefined){
this.x=0;
}elseif(y==undefined){
this.y=0;
}else{
this.y=y;
this.x=x;
}
}

and then you define it like:

Code:

position = new Vector2();

I didn't pay attention to that part very much, I never had a use for it, but I did make a plugin once, which did something simaler to this:

Code:

var stuff = {
alertMe = function(e){
window.alert(e);
}
}

Last edited by GP1 (2011-12-14 22:44:08)


I am currently http://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=imagehttp://blocks.scratchr.org/API.php?user=GP1&action=onlineStatus&type=text and I finally got over 1000 posts.

Offline

 

#150 2011-12-14 23:28:31

MathWizz
Scratcher
Registered: 2009-08-31
Posts: 1000+

Re: JsScratch viewer development thread

GP1 wrote:

Code:

function Vector2(x, y){
if(x==undefined){
this.x=0;
}elseif(y==undefined){
this.y=0;
}else{
this.y=y;
this.x=x;
}
}

Code:

function Vector2(x, y)
{
    this.x = x || 0;
    this.y = y || 0;
}

Okeeeeeyy... Enough ranting.  tongue


http://block.site90.net/scratch.mit/text.php?size=30&text=%20A%20signature!&color=333333

Offline

 

Board footer