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

#1 2010-05-29 05:56:28

anhvns
Scratcher
Registered: 2010-04-28
Posts: 4

member function of class

hey guy ! i have a problem with scratch !that's size of program can be bigger its own  if we don't make  'member function of class' like c++ !
can you give me one advise to repair this problem

Offline

 

#2 2010-05-29 06:32:49

meew0
Scratcher
Registered: 2010-02-22
Posts: 1000+

Re: member function of class

I don't think this is right in project ideas... It should be in All About Scratch.

You could make a sprite with many broadcasts, and the broadcasts are member functions.

An example:
Render3D is a member function. The sprite who wants to have 3D rendered uses that:
[blocks]<broadcast[ Render3D ]and wait c>[/blocks]
And the functions sprite uses that:
[blocks]<when I receive[ Render3D
Do something to render 3D[/blocks]


http://i.imgur.com/mJV3j.pnghttp://i.imgur.com/HwWAX.pnghttp://i.imgur.com/sZ7Ui.pnghttp://i.imgur.com/0y6yh.pnghttp://i.imgur.com/nOC4l.png

Offline

 

#3 2010-05-29 06:36:45

Dazachi
Retired Community Moderator
Registered: 2009-09-12
Posts: 1000+

Re: member function of class

meew0 is right. I'll be moving this to the All About Scratch forum.


Dazachi, Retired Community Moderator
May also know me as OJACheung.

Offline

 

Board footer