How to run an embedded swf file?

Simcoder

Centurion
Joined
Apr 18, 2003
Messages
125
Location
South Carolina
Does anyone know how to properly reference an embedded swf file and play it? Currently, I copy the embedded swf file to the hard drive and then access it using the following code
Visual Basic:
FlashMovie.Movie = Application.StartupPath & "\MyFlash.swf"
FlashMovie.Play()
While this method does work, I'd rather skip the step of copying the file to the harddrive and instead just use it straight from assembly. The problem is that FlashMovie.Movie part of the code requires a path (string) to the location of the file. Any suggestions for accomplishing this or should I just stick with what I have?

Thanks in advance.

-=Simcoder=-
 
Are there any overloads (not sure what type of library we are looking at) or other similar methods like .FromBinary or .FromMemory or anything like that? Something that accepts an array of bytes or a stream? If the only option is a file then you are stuck with a file, which is most simply handled by copying the embedded resources to a file.
 
marble_eater said:
Are there any overloads (not sure what type of library we are looking at) or other similar methods like .FromBinary or .FromMemory or anything like that? Something that accepts an array of bytes or a stream? If the only option is a file then you are stuck with a file, which is most simply handled by copying the embedded resources to a file.

I didn't notice any methods that could read from a stream or from memory. I figured I'd just have to stick with what I have. I guess I'll just have to delete the swf file after I'm done using it which is not a big deal. Anyways, thanks for the reply Marble. =)

-=Simcoder=-
 
Back
Top