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

#276 2012-07-20 00:35:50

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Scratch API 2.0

Apparently, the server API2 is on, is under a DDOS attack. Joy.

Also, ID in the database isn't autoincrementing...

Last edited by fg123 (2012-07-20 00:37:12)


Hai.

Offline

 

#277 2012-07-20 04:07:43

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Scratch API 2.0

fg123 wrote:

Apparently, the server API2 is on, is under a DDOS attack. Joy.

Also, ID in the database isn't autoincrementing...

I noticed. Weird, because the images one is!
Possibly because one is primary and one is unique.

Offline

 

#278 2012-07-20 10:16:01

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Scratch API 2.0

LS97 wrote:

fg123 wrote:

Apparently, the server API2 is on, is under a DDOS attack. Joy.

Also, ID in the database isn't autoincrementing...

I noticed. Weird, because the images one is!
Possibly because one is primary and one is unique.

Of course! Let me try and fix that right now.

EDIT: I can't seem to change the ID from primary to unique. Can you do that please?

Last edited by fg123 (2012-07-20 10:19:09)


Hai.

Offline

 

#279 2012-07-21 10:17:14

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Scratch API 2.0

fg123 wrote:

LS97 wrote:

fg123 wrote:

Apparently, the server API2 is on, is under a DDOS attack. Joy.

Also, ID in the database isn't autoincrementing...

I noticed. Weird, because the images one is!
Possibly because one is primary and one is unique.

Of course! Let me try and fix that right now.

EDIT: I can't seem to change the ID from primary to unique. Can you do that please?

Sure, working on
Done  smile

Last edited by LS97 (2012-07-21 10:20:23)

Offline

 

#280 2012-07-22 12:30:03

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Scratch API 2.0

I"m back! Time to work on stuff!


Hai.

Offline

 

#281 2012-07-23 05:54:25

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Scratch API 2.0

fg123 wrote:

I"m back! Time to work on stuff!

Cool! Yay! Big favour if you start the GUI!
My turn to go on holiday now  smile

Offline

 

#282 2012-07-23 23:07:29

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Scratch API 2.0

Are there some sort of mockups I could follow?  tongue


Hai.

Offline

 

#283 2012-07-24 05:17:11

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Scratch API 2.0

fg123 wrote:

Are there some sort of mockups I could follow?  tongue

Definitely! See 2nd post on this whole thread for an index of them, but the UI has changed a bit:

Basically 3 parts.
right sidebar: elements
top half: canvas (max size corresponds to max sig size)
bottom half: properties of selected element on canvas (or canvas if that's selected)

we were debating whether to include a small list of elements for selection on the left of the bottom half too.

Offline

 

#284 2012-07-25 12:57:40

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Scratch API 2.0

I'll get workin then!

sparks wrote:

Oh I see.

Mockup time!

http://img254.imageshack.us/img254/1783/costume.gif

A little "T" icon by text, with the first few letters of the text as a name, a small icon of the image and an image icon by dynamic ones.

Possibly the icons should be a little larger than 10x10

Could someone perhaps make those little icons?  tongue  I think 16x16 should do fine. But maybe make them 32x32 then convert, so we have more to work with.


Hai.

Offline

 

#285 2012-07-25 14:32:43

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Scratch API 2.0

http://img201.imageshack.us/img201/9609/costume.png

Howzat? I was thinking we could try making small versions of any non-dynamic images as their thumb....


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#286 2012-07-25 16:50:32

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Scratch API 2.0

sparks wrote:

http://img201.imageshack.us/img201/9609/costume.png

Howzat? I was thinking we could try making small versions of any non-dynamic images as their thumb....

Maybe the thumbnail idea isn't exactly speed-friendly...

Offline

 

#287 2012-07-25 20:53:29

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Scratch API 2.0

Yea, also, it's better to have universal thumbnails...


Hai.

Offline

 

#288 2012-07-27 05:18:02

sparks
Community Moderator
Registered: 2008-11-05
Posts: 1000+

Re: Scratch API 2.0

That's true.

Well I'm off for a week. I'm going to sunny Croatia where I hope not to burn too terribly. We've had barely any sun in England so far so the change is going to be a shock! I'll be back on Sunday 5th!


http://img541.imageshack.us/img541/7563/scratchbetabanner.png

Offline

 

#289 2012-07-27 07:28:18

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Scratch API 2.0

sparks wrote:

That's true.

Well I'm off for a week. I'm going to sunny Croatia where I hope not to burn too terribly. We've had barely any sun in England so far so the change is going to be a shock! I'll be back on Sunday 5th!

Nice! I am also coming back from the beach around that date, have fun!

Offline

 

#290 2012-07-27 13:50:21

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Scratch API 2.0

Alrighty, see ya guys when you get back. I've been trying with the drag 'n drop, but no good results so far, but I'll keep you posted.


Hai.

Offline

 

#291 2012-07-27 15:01:17

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Scratch API 2.0

I'm updating stuff, so no one edit anything. And is the SRV Root thing really nessasary? It's messing up my localhost. I can do a workaround, just wondering.

EDIT: Got my workaround, no worries. BTW, please use <?php?>, instead of just <??>, it's bad practice.

EDITEDIT: Darn, so I know how to do draggable stuff, but I can't figure out how to detect when an element is touching the canvas...

EDITEDIT: I've uploaded what I got as my sort of working attempt, it drags now, but I need a way of finding the position of the dropping element in relative to the canvas...
/app/main.php

Last edited by fg123 (2012-07-27 17:32:39)


Hai.

Offline

 

#292 2012-07-28 03:49:59

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Scratch API 2.0

Awesome fg, better than anything I was hoping for!
If you're using mousemove and mouseup events, you can get the X and Y from the event arguments (as you probably know anyway  tongue )

AFAIK, <?php and <? are exactly the same thing, work on (usually*) all servers, and perform the same function. The only convention I use as to decide which one to use is to use the former when starting long scripts and the latter for shorter things like echoing a variable in an HTML context.

*if php.ini allows

Last edited by LS97 (2012-07-28 03:52:05)

Offline

 

#293 2012-07-28 13:35:31

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Scratch API 2.0

LS97 wrote:

Awesome fg, better than anything I was hoping for!
If you're using mousemove and mouseup events, you can get the X and Y from the event arguments (as you probably know anyway  tongue )

AFAIK, <?php and <? are exactly the same thing, work on (usually*) all servers, and perform the same function. The only convention I use as to decide which one to use is to use the former when starting long scripts and the latter for shorter things like echoing a variable in an HTML context.

*if php.ini allows

Yea, but it's better to keep it consistent.  tongue 

My problem right now is that the position of the element from mousemove is relative to the 0, 0 of the browserpage, but I need it relative to the canvas' 0, 0. I suppose I'll have to calculate width and height, but that might be unreliable once it gets too small or too large, and it won't allow for too much change...


Hai.

Offline

 

#294 2012-07-28 14:25:39

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Scratch API 2.0

Well, we will have two textboxes for fine tuning X and Y, so if the software gets it wrong the user can always change it manually!  wink

Offline

 

#295 2012-07-31 20:14:00

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Scratch API 2.0

Bumpity. I can't figure it out.  sad  Sorry...


Hai.

Offline

 

#296 2012-07-31 21:00:55

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: Scratch API 2.0

Just to let you guys know, I used your button styling on a website I'm designing. Is that okay?


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

#297 2012-08-01 03:55:06

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Scratch API 2.0

technoboy10 wrote:

Just to let you guys know, I used your button styling on a website I'm designing. Is that okay?

Sure! It's not like we own the shading and colours  tongue
We kinda already copied it from Scratch 2.0 in the first place, anyway!

Offline

 

#298 2012-08-01 09:38:28

technoboy10
Scratcher
Registered: 2007-08-25
Posts: 1000+

Re: Scratch API 2.0

LS97 wrote:

technoboy10 wrote:

Just to let you guys know, I used your button styling on a website I'm designing. Is that okay?

Sure! It's not like we own the shading and colours  tongue
We kinda already copied it from Scratch 2.0 in the first place, anyway!

Cool, thanks.  smile


So long, 1.4.
http://goo.gl/3JEV9

Offline

 

#299 2012-08-02 14:14:41

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Scratch API 2.0

fg123 wrote:

Bumpity. I can't figure it out.  sad  Sorry...

Aww... maybe sparks will have some ideas when he comes back in a few days?

Offline

 

#300 2012-08-03 13:13:10

fg123
Scratcher
Registered: 2008-11-13
Posts: 1000+

Re: Scratch API 2.0

Hopefully. It's mostly complex math that's not at my level.  tongue


Hai.

Offline

 

Board footer