how to create flash file WPF [Resolved]

Posted by Raj.Net under WPF on 7/20/2012 | Points: 10 | Views : 4898 | Status : [Member] | Replies : 5
how to create flash file WPF in xaml application

If it helps/directs you towards the solution,Mark This Response as Answer link
--
Rajesh



Responses

Posted by: Raj.Net on: 7/21/2012 [Member] Starter | Points: 25

Up
0
Down

Resolved
ok sir i have used 4.0 version this same requiremet did u possible plz help


If it helps/directs you towards the solution,Mark This Response as Answer link
--
Rajesh

Raj.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Gow.Net on: 7/21/2012 [Member] Starter | Points: 25

Up
0
Down
sir i think not possible for this using adop flash software create flash video and attach in wpf

gowthaman8870226416

Raj.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Asokmailworld on: 7/21/2012 [Member] Starter | Points: 25

Up
0
Down
hello frnd,,

u can see some sample code to play .swf files in .NET.
you follow that way , if u successfully doing it means , u can get the output.
In Visual Studio, File -> New -> Project -> Windows Forms Control

Set Platform target to x86

In Visual Studio, right click on Toolbox window, then "Choose Items"

Navigate to COM components tab and choose Shockwave Flash Object. Press OK.

then next step

Drag "Schockwave Flash Object" from Toolbox to our UserControl and change its name to axShockwaveFlash. Rename our UserControl to FlashAxControl and add following code to it.
/* dnt forget to remove the comments...
public partial class FlashAxControl : UserControl
{
public FlashAxControl()
{
InitializeComponent();
}
public new int Width
{
get { return axShockwaveFlash.Width; }
set { axShockwaveFlash.Width = value; }
}
public new int Height
{
get { return axShockwaveFlash.Height; }
set { axShockwaveFlash.Height = value; }
}
public void LoadMovie(string strPath)
{
axShockwaveFlash.LoadMovie(0, strPath);
}
public void Play()
{
axShockwaveFlash.Play();
}
public void Stop()
{
axShockwaveFlash.Stop();
}
}

*/

then

Build our UserControl. Start new WPF Application and reference to our UserControl, System.Windows.Forms and WindowsFormsIntegration as following

Set Platform Target to x86

Add following code to play SWF in our application
/* remove comments..
string strFilePath = @"e:\temp.swf";
SWFFileHeader swfFile = new SWFFileHeader(strFilePath);
this.Width = swfFile.FrameSize.WidthInPixels;
this.Height = swfFile.FrameSize.HeightInPixels;
WindowsFormsHost host = new WindowsFormsHost();
FormFlashLibrary.FlashAxControl player = new FormFlashLibrary.FlashAxControl();
//the Windows Forms Host hosts the Flash Player
host.Child = player;
//the WPF Grid hosts the Windows Forms Host
grdMain.Children.Add(host);
//set size
player.Width = (int) this.Width;
player.Height = (int) this.Height;
//load & play the movie
player.LoadMovie(strFilePath);
player.Play();

*/

it works well,.,.try it...

Raj.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Asokmailworld on: 7/21/2012 [Member] Starter | Points: 25

Up
0
Down
sir,

try it to create from a third party software like adobe as my frnd gautham said. then import into ur project with the prevoius code which given.

K i hope it works....

have a nice day

Raj.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Asokmailworld on: 7/21/2012 [Member] Starter | Points: 25

Up
0
Down
sir nan sonna padi panunga sir, kandippa athu work akum.


but one think keep in ur mind.
add reference Shockwave Flash Object to your project from COM tab.

Raj.Net, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response