Hey! I was expierementing with the source code today, and I tried to make some blocks:
[start hosting mesh]
[join mesh at I.P ( )]
I can't figure out how to make them though. I tried a code for the first one:
('start hosting mesh' #- #startHostingScratchSession)but it didn't work.
Anybody know how I could make it work?
(and I have no idea how to make the second one.)
Offline
Is the command startHostingScratchSession defined anywhere in the source code. You have to actually define it.
Offline
Offline
I have it I can post my image if you want
Offline
johnnydean1 wrote:
I have it I can post my image if you want
How Did You Make Them? I'd Really Like To Know How So I Can Add It To My Mod.
Offline
Ok, since panther is open source im allowed to this:
Code for host mesh block
hostMesh
"Start running the Scratch server, allowing Scratch and other applications to interact with this Scratch remotely."
| sFrame server |
(sFrame _ self ownerThatIsA: ScratchFrameMorph) ifNil: [^ self].
sFrame workPane scratchServer ifNil: [
server _ ScratchServer new.
server stage: (sFrame workPane).
sFrame workPane scratchServer: server].
sFrame workPane scratchServer startHosting.Code for stop hosting mesh
leaveMesh
| sFrame |
(sFrame _ self ownerThatIsA: ScratchFrameMorph) ifNotNil: [sFrame exitScratchSession].And Join IP
leaveMesh
| sFrame |
(sFrame _ self ownerThatIsA: ScratchFrameMorph) ifNotNil: [sFrame exitScratchSession].Thanks to NxIII for all this.
Hope this helps.
Last edited by markyparky56 (2010-04-15 07:25:59)
Offline
TheGameMaster1231 wrote:
johnnydean1 wrote:
I have it I can post my image if you want
How Did You Make Them? I'd Really Like To Know How So I Can Add It To My Mod.
There is a topic about programming with mesh look here:
http://scratch.mit.edu/forums/viewtopic.php?id=32046

Offline
johnnydean1 wrote:
I have it I can post my image if you want
Are you talking about MY image, perchance?
Anyway, the blocks markyparky gave you won't work in pres mode. Only I (And Jens, and the Scratch Team, and probably billyedward) know the secret of making ScratchFrameMorph blocks work in pres mode! MUHUHAHAHAHAHA!
Last edited by nXIII (2010-04-15 09:10:14)
Offline
nXIII wrote:
johnnydean1 wrote:
I have it I can post my image if you want
Are you talking about MY image, perchance?
Anyway, the blocks markyparky gave you won't work in pres mode. Only I (And Jens, and the Scratch Team, and probably billyedward) know the secret of making ScratchFrameMorph blocks work in pres mode! MUHUHAHAHAHAHA!
Really? Those are jut the ones I took straight out of the current Panther mod, I think its the latest version...
Offline
markyparky56 wrote:
nXIII wrote:
johnnydean1 wrote:
I have it I can post my image if you want
Are you talking about MY image, perchance?
Anyway, the blocks markyparky gave you won't work in pres mode. Only I (And Jens, and the Scratch Team, and probably billyedward) know the secret of making ScratchFrameMorph blocks work in pres mode! MUHUHAHAHAHAHA!Really? Those are jut the ones I took straight out of the current Panther mod, I think its the latest version...
It's not....
It's the most recently UPLOADED version.
Last edited by nXIII (2010-04-15 09:34:37)
Offline
nXIII wrote:
markyparky56 wrote:
nXIII wrote:
Are you talking about MY image, perchance?
Anyway, the blocks markyparky gave you won't work in pres mode. Only I (And Jens, and the Scratch Team, and probably billyedward) know the secret of making ScratchFrameMorph blocks work in pres mode! MUHUHAHAHAHAHA!Really? Those are jut the ones I took straight out of the current Panther mod, I think its the latest version...
It's not....
It's the most recently UPLOADED version.
So your keeping things back from the rest of the team... -_-
Offline
nXIII wrote:
johnnydean1 wrote:
I have it I can post my image if you want
Are you talking about MY image, perchance?
Anyway, the blocks markyparky gave you won't work in pres mode. Only I (And Jens, and the Scratch Team, and probably billyedward) know the secret of making ScratchFrameMorph blocks work in pres mode! MUHUHAHAHAHAHA!
I KNOW HOW TO DO IT TOO!!!!!!!
Offline
MathWizz wrote:
nXIII wrote:
johnnydean1 wrote:
I have it I can post my image if you want
Are you talking about MY image, perchance?
Anyway, the blocks markyparky gave you won't work in pres mode. Only I (And Jens, and the Scratch Team, and probably billyedward) know the secret of making ScratchFrameMorph blocks work in pres mode! MUHUHAHAHAHAHA!I KNOW HOW TO DO IT TOO!!!!!!!
You do?
OK. Isn't it annoying? Try middle-clicking on a sprite in pres mode: it has a nonexistent owner!
I'm tying to get sprite exporting with custom blocks to work. I just finished fixing the tuples and adding a new option to show the code.
Offline
markyparky56 wrote:
Ok, since panther is open source im allowed to this:
Code for host mesh blockCode:
hostMesh "Start running the Scratch server, allowing Scratch and other applications to interact with this Scratch remotely." | sFrame server | (sFrame _ self ownerThatIsA: ScratchFrameMorph) ifNil: [^ self]. sFrame workPane scratchServer ifNil: [ server _ ScratchServer new. server stage: (sFrame workPane). sFrame workPane scratchServer: server]. sFrame workPane scratchServer startHosting.Code for stop hosting mesh
Code:
leaveMesh | sFrame | (sFrame _ self ownerThatIsA: ScratchFrameMorph) ifNotNil: [sFrame exitScratchSession].your join IP is the same as your leave mesh
And Join IPCode:
leaveMesh | sFrame | (sFrame _ self ownerThatIsA: ScratchFrameMorph) ifNotNil: [sFrame exitScratchSession].Thanks to NxIII for all this.
Hope this helps.![]()
Your join IP is the same as your leave mesh. Could you post the real code?
Last edited by midnightleopard (2010-04-16 21:27:35)
Offline
midnightleopard wrote:
markyparky56 wrote:
Ok, since panther is open source im allowed to this:
Code for host mesh blockCode:
hostMesh "Start running the Scratch server, allowing Scratch and other applications to interact with this Scratch remotely." | sFrame server | (sFrame _ self ownerThatIsA: ScratchFrameMorph) ifNil: [^ self]. sFrame workPane scratchServer ifNil: [ server _ ScratchServer new. server stage: (sFrame workPane). sFrame workPane scratchServer: server]. sFrame workPane scratchServer startHosting.Code for stop hosting mesh
Code:
leaveMesh | sFrame | (sFrame _ self ownerThatIsA: ScratchFrameMorph) ifNotNil: [sFrame exitScratchSession].your join IP is the same as your leave mesh
And Join IPCode:
leaveMesh | sFrame | (sFrame _ self ownerThatIsA: ScratchFrameMorph) ifNotNil: [sFrame exitScratchSession].Thanks to NxIII for all this.
Hope this helps.![]()
Your join IP is the same as your leave mesh. Could you post the real code?
Oh, must have not copied properly. sorry, ill fix that.
joinMesh: addrString
"Join another Scratch user or a Scratch-compatible remote application."
| server ok sFrame |
(sFrame _ self ownerThatIsA: ScratchFrameMorph) ifNil: [^ ''].
server _ ScratchServer new.
server stage: (sFrame workPane).
sFrame workPane scratchServer: server.
addrString size = 0 ifTrue: [^ ''].
ok _ sFrame workPane scratchServer joinSessionAt: addrString.
"ok ifFalse: [DialogBoxMorph warn: 'Could not connect to ', addrString]."Thats it.
Offline