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

#1 2012-04-22 17:37:09

comix6
Scratcher
Registered: 2011-12-20
Posts: 10

Actionscript???

Hi,

I noticed the wiki post "Communicating to Scratch via ActionScript." I have got actionscript (flash CS4).

What does this wiki mean by communicating with scratch?

I tried putting the file PlayerOnly.swf on the 'stage' in Flash CS4, and it gave an error number 1009.

The difficulty is that before the COMPLETE or INIT events fire, the swf starts running, it finds the stage is null (because it runs before it is put on the stage) and hence the error 1009.

It would be wonderful to be able to incorporate PlayerOnly.swf into actionscript projects, setting the flashvar  project=myproject.sb

I'm sure it would work if not for the null stage error...but if no one has done this, what is the detailed wiki about communicating with scratch via actionscript actually about???

It is very confusing, the wiki seems to jump in the middle. How about one very simple example that starts at the beginning????

Offline

 

#2 2012-04-23 17:08:05

Nathanator1416J
Scratcher
Registered: 2012-02-21
Posts: 100+

Re: Actionscript???

I don't know much about cs4, but couldn't you make it define itself as something, then turn it back to null?


http://wiki.scratch.mit.edu/images/Ptp.gif PEPPERTREE  Productions (PtP)
Tourmaline Scientific Research Programs

Offline

 

#3 2012-04-24 19:53:28

comix6
Scratcher
Registered: 2011-12-20
Posts: 10

Re: Actionscript???

Hi, thx  for your comment.  I actually wondered about that, whether it is possible to define a 'stage' variable in advance which is not the real stage.

I actually think that something like that is possible using 'contexts' but I too don't know enough actionscript/flash to do that.

Thx again!

Offline

 

Board footer