Click here to Skip to main content
15,903,203 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends,

C#
WindowsFormsHost host1 = new WindowsFormsHost();
FormFlashLibrary.FlashAxControl player1 = new FormFlashLibrary.FlashAxControl();

host1.Child = player1;

stkpan1.Children.Add(host1);
                    
player1.Width = 1010;
player1.Height = 302;

player1.LoadMovie(@"E:\sub files\flashes\main_animation.swf");
player1.Play();

Now, I am using WPF for project. This C# code is perfectly working, but the flash file is taken from the system like E:\flash\flash.swf. But, I want the swf file to be in project. So, I modified the code like
C#
player1.LoadMovie("main_animation.swf"); 

Now the swf is not working, how can I run this swf in project it self?

help me!
Posted
Updated 11-Feb-11 18:02pm
v3

1 solution

Looks like a path issue. Make sure that the relative path of the swf file is correctly formed and supplied to in your LoadMovie method.
 
Share this answer
 
Comments
Sagotharan Jagadeeswaran 12-Feb-11 4:49am    
not path problem friend,.

first the path is set like E:\foldername\filename.swf

now iam include the swf file in solution explorer,. (add exiting file-->),. then i change the code,..

how can I run this swf in project it self?
Sandeep Mewara 12-Feb-11 5:02am    
Yes, I got that you added but then is the file accessble at the defined path you are trying to use?

It would depend on your solution and folders hierarchy.
Sagotharan Jagadeeswaran 12-Feb-11 6:44am    
ya friend,. i try in three way,. but not get correct solution,. if i put E:\foldername\filename.swf in pgm, i copy the file in every system,.

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