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

#126 2011-06-06 11:15:15

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Go Everywhere Beta

comp500 wrote:

ssss wrote:

HTML5 won't work on 3DS  sad

We'll have to use divs...

Yes it will, at least canvas will.


You can now reach me on Twitter @johnnydean1_

Offline

 

#127 2011-06-06 11:20:36

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Go Everywhere Beta

johnnydean1 wrote:

rdococ wrote:

How do we return the "row" of a textarea (it's contents)?

What are you talking about?

A row (or is it column?) is a line of contents. This is a row.
This is another row/column.

Offline

 

#128 2011-06-06 11:55:22

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Go Everywhere Beta

So what a user input box, and you want to get a select row?


You can now reach me on Twitter @johnnydean1_

Offline

 

#129 2011-06-06 11:58:53

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Go Everywhere Beta

No of rows:

oArea = document.getElementById('myTextField');
var aNewlines = oArea.value.split("\n");
var iNewlineCount = aNewlines.length();

To get a row make a function that spots the "/n" and cuts out text between them.


You can now reach me on Twitter @johnnydean1_

Offline

 

#130 2011-06-06 12:36:46

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Go Everywhere Beta

BTW Guys...
Massive improvement to Pokemon, now super-fast by using off-screen canvas'.
Here

Look at function 'prepTiles()' to see how its done...


You can now reach me on Twitter @johnnydean1_

Offline

 

#131 2011-06-06 12:58:13

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Go Everywhere Beta

johnnydean1 wrote:

So what a user input box, and you want to get a select row?

No, I want to report a line of the textarea value. For example:

Text area
Some text

...would appear as if to report line 1: Text area
...would appear as if to report line 2: Some text

Offline

 

#132 2011-06-06 13:10:42

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Go Everywhere Beta

rdococ wrote:

johnnydean1 wrote:

So what a user input box, and you want to get a select row?

No, I want to report a line of the textarea value. For example:

Text area
Some text

...would appear as if to report line 1: Text area
...would appear as if to report line 2: Some text

Do a search for the enter key ASCII code and cut out the text.


You can now reach me on Twitter @johnnydean1_

Offline

 

#133 2011-06-06 13:21:55

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Go Everywhere Beta

johnnydean1 wrote:

rdococ wrote:

johnnydean1 wrote:

So what a user input box, and you want to get a select row?

No, I want to report a line of the textarea value. For example:

Text area
Some text

...would appear as if to report line 1: Text area
...would appear as if to report line 2: Some text

Do a search for the enter key ASCII code and cut out the text.

How?

Offline

 

#134 2011-06-06 13:27:18

TheSuccessor
Scratcher
Registered: 2010-04-23
Posts: 1000+

Re: Go Everywhere Beta

Try this:

function getLine(text, line){
var lines = text.split("\n");
return lines[line - 1];
}

Untested, but worth a try.


/* No comment */

Offline

 

#135 2011-06-07 03:04:15

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Go Everywhere Beta

TheSuccessor wrote:

Try this:

function getLine(text, line){
var lines = text.split("\n");
return lines[line - 1];
}

Untested, but worth a try.

What does the (text, line) do?

Offline

 

#136 2011-06-07 03:36:14

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

johnnydean1 wrote:

BTW Guys...
Massive improvement to Pokemon, now super-fast by using off-screen canvas'.
Here

Look at function 'prepTiles()' to see how its done...

hmm i liked the thing where u could use arrow keys to move. it seeems slower and doesn't always respond


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#137 2011-06-07 11:11:04

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Go Everywhere Beta

rdococ wrote:

TheSuccessor wrote:

Try this:

function getLine(text, line){
var lines = text.split("\n");
return lines[line - 1];
}

Untested, but worth a try.

What does the (text, line) do?

Offline

 

#138 2011-06-07 12:24:15

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

rdococ wrote:

rdococ wrote:

TheSuccessor wrote:

Try this:

function getLine(text, line){
var lines = text.split("\n");
return lines[line - 1];
}

Untested, but worth a try.

What does the (text, line) do?

It's the parameters.

for example when you call it i think u use this:

Code:

alert(getLine(text, 5));

if text is the text in the textarea, it will say line five of the text in an alert box.


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#139 2011-06-07 12:39:51

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Go Everywhere Beta

comp500 wrote:

rdococ wrote:

rdococ wrote:


What does the (text, line) do?

It's the parameters.

for example when you call it i think u use this:

Code:

alert(getLine(text, 5));

if text is the text in the textarea, it will say line five of the text in an alert box.

So you can create things like reporters in Javascript?

Offline

 

#140 2011-06-07 12:43:23

RUMCHEERYPOOPOO
Scratcher
Registered: 2008-12-23
Posts: 100+

Re: Go Everywhere Beta

you have to use the variable

Code:

document.form.textarea.value

for the text param

where form is the name of the form ( <form name="whatever"> )

and text area is the name of the text area (same as above except with textarea tag).

Last edited by RUMCHEERYPOOPOO (2011-06-07 12:44:33)


I AM ROOKWOOD101 NOW! (just so you know)

Offline

 

#141 2011-06-07 12:52:51

RUMCHEERYPOOPOO
Scratcher
Registered: 2008-12-23
Posts: 100+

Re: Go Everywhere Beta

oh and also guys I'm pretty good at php & js (even if I do say so myself).

So I can help you guys a bit if you want.


I AM ROOKWOOD101 NOW! (just so you know)

Offline

 

#142 2011-06-07 13:24:48

whizzer
Scratcher
Registered: 2008-05-27
Posts: 500+

Re: Go Everywhere Beta

Ok guys, I'm ready...

...sent from 3DS...

...will try DSi v.


http://i46.tinypic.com/33df6me.png I'm whizzer0 for all things Minecraft.

Offline

 

#143 2011-06-07 15:07:56

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

rdococ wrote:

comp500 wrote:

rdococ wrote:


It's the parameters.

for example when you call it i think u use this:

Code:

alert(getLine(text, 5));

if text is the text in the textarea, it will say line five of the text in an alert box.

So you can create things like reporters in Javascript?

Yup. use

Code:

return

800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#144 2011-06-07 15:09:19

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

RUMCHEERYPOOPOO wrote:

you have to use the variable

Code:

document.form.textarea.value

for the text param

where form is the name of the form ( <form name="whatever"> )

and text area is the name of the text area (same as above except with textarea tag).

you don't. you can use id... or classs...


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#145 2011-06-07 15:10:43

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

RUMCHEERYPOOPOO wrote:

oh and also guys I'm pretty good at php & js (even if I do say so myself).

So I can help you guys a bit if you want.

yay! can u help with php soon...


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#146 2011-06-07 15:11:59

comp500
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Go Everywhere Beta

whizzer wrote:

Ok guys, I'm ready...

...sent from 3DS...

...will try DSi v.

yay!


800 posts! W00T! Oh sorry im not on a lot but at least i have 1000+ posts

Offline

 

#147 2011-06-07 15:22:48

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Go Everywhere Beta

Do you know what PHP is for?


You can now reach me on Twitter @johnnydean1_

Offline

 

#148 2011-06-07 15:26:15

jslomba
Scratcher
Registered: 2009-09-25
Posts: 1000+

Re: Go Everywhere Beta

can I be a tester/advertizer?

Last edited by jslomba (2011-06-07 15:26:35)


the the the the the

Offline

 

#149 2011-06-07 16:29:54

Necromaster
Scratcher
Registered: 2010-04-07
Posts: 1000+

Re: Go Everywhere Beta

So is this going to be an online project or what? Playing scratch projects with portable devices, or making projects with portable devices?

Offline

 

#150 2011-06-07 16:54:48

3DSfan12345
Scratcher
Registered: 2011-04-02
Posts: 500+

Re: Go Everywhere Beta

I could advertise.


R.I.P Scratch 1.4
July 7,2009-May 5,2013

Offline

 

Board footer