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

#1 2008-03-30 07:52:15

GGCO
Scratcher
Registered: 2008-03-30
Posts: 4

Embedding a movie in a C# app

Is there any way that I can put one of my Scratch movies in a Visual Studio C# Windows Form? I know I can do this with Flash, so can someone please help me here?? Thanks!

Offline

 

#2 2008-03-31 03:27:10

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: Embedding a movie in a C# app

If you just want to distribute your project as a standalone exe you might want to try my experimental "Scratch2Exe" fake compiler:

http://www.chirp.scratchr.org/blog/?page_id=8


Jens Mönig

Offline

 

#3 2008-03-31 11:06:35

GGCO
Scratcher
Registered: 2008-03-30
Posts: 4

Re: Embedding a movie in a C# app

So I could open up the exe file, and run it from my C# App? Could you go further in detail? Thanks

Offline

 

#4 2008-03-31 13:19:50

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Embedding a movie in a C# app

How about you use a screen capture program to convert it to MPEG or AVI?  Probably there is a way to view one of those type of files.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#5 2008-03-31 14:01:37

Jens
Scratcher
Registered: 2007-06-04
Posts: 1000+

Re: Embedding a movie in a C# app

Maybe I didn't fully understand your question. Could you please be a little more specific what exactly it is you would like to do ....

Scratch is an interpreted language with a dynamic IDE, i.e. you can change components and scripts while an application (in Scratch it's called 'project') is being executed and see the results right away.

Scratch is not really a dynamic programming language IMO, because you cannot create any new objects in 'presentation mode' or when a project is being run in a web-browser. It's object-based in a way, however without the notion of classes (there are only instances of "Sprite", "Stage" - a Singleton -, and - arguably - "Variable" in Scratch, which can be directly manipulated with command blocks and IDE-controls).

The Scratch "language" itself is the command blocks. This is really something I found interesting when I looked at the Source Code. The Blocks aren't just a UI-model for some other underlying semantics-enginge (as I had imagined), but the language itself. Therefore you cannot "file out" the source code of a Scratch project (except for a pseudo-code like summary which however cannot be filed back into Scratch again).

There is no official way to "translate" a Scratch project into another programming language. I do believe, however, that it wouldn't really be too hard to create a native compiler for Scratch, or even a Scratch-to-something-else-like-C converter. If you want to give it a shot, go ahead! The Squeak Source Code of Scratch isn't all that hard to understand.

My fake compiler, however, is really just producing a kind of self-extracting zip-file containing a slightly altered version of the complete Scratch environment together with an individual Scratch project. Of couse you can call the exe-file like any other windows executable from within other programs, but you can't change the way it works using Visual Studio C#, if that's what you're asking.


Jens Mönig

Offline

 

#6 2008-03-31 15:06:12

GGCO
Scratcher
Registered: 2008-03-30
Posts: 4

Re: Embedding a movie in a C# app

Basically my idea is when the user presses a button one of my scratch videos pops up either in a new window, or in something like a web browser control in my application. I am just wondering how to do this.

Offline

 

#7 2008-03-31 17:39:59

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Embedding a movie in a C# app

GGCO wrote:

Basically my idea is when the user presses a button one of my scratch videos pops up either in a new window, or in something like a web browser control in my application. I am just wondering how to do this.

When you say "video" do you mean that there is no need for the user to do anything; just watch it?  If that is the case, you could use screen capture software to convert it to a video format.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

Board footer