Congratulations to all the winners of April 2013, they have won INR 3400 cash and INR 20147 worth prizes !
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 9069 |  Welcome, Guest!   Register  Login
 Home > Forums > WPF > how to create flash file WPF ...
Raj.Net

how to create flash file WPF

Replies: 5 | Posted by: Raj.Net on 7/20/2012 | Category: WPF Forums | Views: 899 | Status: [Member] | Points: 10  


how to create flash file WPF in xaml application


Reply | Reply with attachment | Alert Moderator

 Responses below this adGet hundreds of .NET Tips and Tricks videos

 Replies

Gow.Net
Gow.Net  
Posted on: 7/21/2012 12:47:11 AM
Level: Starter | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Asokmailworld
Asokmailworld  
Posted on: 7/21/2012 1:45:37 AM
Level: Starter | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Asokmailworld
Asokmailworld  
Posted on: 7/21/2012 1:47:23 AM
Level: Starter | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Raj.Net
Raj.Net  
Posted on: 7/21/2012 2:06:14 AM
Level: Starter | Status: [Member] | Points: 25

Resolved

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

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

Asokmailworld
Asokmailworld  
Posted on: 7/21/2012 2:47:52 AM
Level: Starter | Status: [Member] | Points: 25

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. | Reply | Alert Moderator 

Reply - Please login to reply


Click here to login & reply

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/19/2013 4:27:46 PM