load resource file

i want to insert a avi file for the mediaplayer as a resource file. I already managed to make the resource file, but i don´t know, how to load it in the mediaplayer.
Help wanted!
brausyAsked:
Who is Participating?
 
rwilson032697Connect With a Mentor Commented:
You have to write it to a file then give it to the mediaplayer, like this:

var
  TheStream : TResourceStream;

begin
  TheStream := TResourceStream.Create(Application.Handle, 'THEAVIRESNAME', RT_RCDATA);
  TheStream.SaveToFile('MyAvi.AVI)
  TheStream.Free

  MediaPlayer1.FileName := 'MyAvi.AVI';

etc...

Cheers,

Raymond.
0
 
brausyAuthor Commented:
Actually I want to burn the program on Cd so I can´t create a file. And the program can´t fin the resource file - the resource is in ANIMATION and called Animation_1. Help

0
 
rwilson032697Commented:
Well, you could write it to the windows temp directory. Alernatively, since you're burning a CD why not just put the AVI down as a separate file?

Raymond.
0
 
brausyAuthor Commented:
is there no way to start the file from the ram, instead of writing it to disk
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.