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

#1 2010-06-30 13:33:25

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

Hey a little help

Is there any way to tell the costumes sizes

Eg.

Costume Size X
Costume Size Y

Can anyone make these blocks!!!!!


You can now reach me on Twitter @johnnydean1_

Offline

 

#2 2010-06-30 13:47:34

The-Whiz
Scratcher
Registered: 2007-07-09
Posts: 1000+

Re: Hey a little help

Well, there's the stretch effect block...

Offline

 

#3 2010-06-30 14:03:44

juststickman
Scratcher
Registered: 2009-05-31
Posts: 1000+

Re: Hey a little help

use _height and _width.

EDIT: nvm, that ish in flash.
You could use a sprite to do it, or find some way to hack and find the variables that are displayed by the costume thumbnail in the costumes tab.

Last edited by juststickman (2010-06-30 14:04:34)


http://is.gd/iBQi2 Add grob to your sig and help with world dominiation!http://is.gd/iBQ9Q                                                             Hey guys, we're seriously naming our team bob?

Offline

 

#4 2010-07-03 21:24:21

rubiks_cube_guy238
Scratcher
Registered: 2009-07-02
Posts: 100+

Re: Hey a little help

To get a costume's height, use this code:

Code:

^ self costume form extent y

and for the costume's width, use this:

Code:

^ self costume form extent x

in any method you want, and turn it into a block.


The glass is never half full nor half empty; it is twice as large as it needs to be.

Offline

 

#5 2010-07-03 22:31:37

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

Re: Hey a little help

rubiks_cube_guy238 wrote:

To get a costume's height, use this code:

Code:

^ self costume form extent y

and for the costume's width, use this:

Code:

^ self costume form extent x

in any method you want, and turn it into a block.

or use filteredForm if you want rotation and filters to apply to tthe costume before taking the dimensions.


nXIII

Offline

 

#6 2010-07-04 06:44:19

rubiks_cube_guy238
Scratcher
Registered: 2009-07-02
Posts: 100+

Re: Hey a little help

nXIII wrote:

rubiks_cube_guy238 wrote:

To get a costume's height, use this code:

Code:

^ self costume form extent y

and for the costume's width, use this:

Code:

^ self costume form extent x

in any method you want, and turn it into a block.

or use filteredForm if you want rotation and filters to apply to tthe costume before taking the dimensions.

Yeah, good point.

rubiks_cube_guy238 correctly wrote:

To get a costume's height, use this code:

Code:

^ self filteredForm extent y

and for the costume's width, use this:

Code:

^ self filteredForm extent x

in any method you want, and turn it into a block.
These blocks, unlike the other ones, apply the graphic effects before returning an answer.


The glass is never half full nor half empty; it is twice as large as it needs to be.

Offline

 

#7 2010-07-04 10:55:13

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

Re: Hey a little help

Thank you I am using these in a game on Panther....

I had figured it out myself (took me a while)


You can now reach me on Twitter @johnnydean1_

Offline

 

Board footer