Click here to Skip to main content
15,944,835 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
hi all,,

i want to play swf file stored in c# Resources

i try to play swf stored in path like this

C#
string path = "C:\\Users\\Eng_Ran\\Documents\\Visual Studio 2008\\Projects\\Test Application\\Resources\\file.swf";
            

            axShockwaveFlash1.LoadMovie(0,path);
            axShockwaveFlash1.Play();


but after set up my application the path not found and swf file not played

i want to get path from Resources

thanx
Posted

1 solution

You want to read the swf file path from resource. Pls check the below code.

C#
string path = GetGlobalResourceObject("MyResource", "GlobalResourceString1");
axShockwaveFlash1.LoadMovie(0,path);
axShockwaveFlash1.Play();
 
Share this answer
 
Comments
shms_rony 16-Aug-11 5:23am    
i don't understand this line

GetGlobalResourceObject("MyResource", "GlobalResourceString1");
senthil sennu 16-Aug-11 5:34am    
The GetGlobalResourceObject method takes the name of a resource class and the resource ID. The class name is based on the .resx file name. For example, the file WebResources.resx, and all associated localized files, are referenced by the class name WebResources
shms_rony 16-Aug-11 6:12am    
sorry this answer didn't solve my problem :(

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900