472,974 Members | 1,729 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,974 software developers and data experts.

Embedding flash

Hi there.

I'm trying to embed a flash movie in my .NET 2.0 form. However, all I
see is a white square, no movie is playing. I have done the following:

* added a reference to the ShockwaveFlash COM object
(c:\windows\system32\macromed\flash\swflash.ocx),
* dragged it onto my form
* set the Movie property (the movie plays correctly if a double click it
from explorer)
* called the Play() method

but the movie does not show. It says "Movie not loaded..." if I right
click on the flash area on the running form.

Can anyone help? Code follows:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace TestApp
{
public partial class Form1 : Form
{
AxShockwaveFlashObjects.AxShockwaveFlash axShockwaveFlash1;

private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new
System.ComponentModel.ComponentResourceManager(typ eof(Form1));
this.axShockwaveFlash1 = new AxShockwaveFlashObjects.AxShockwaveFlash();
((System.ComponentModel.ISupportInitialize)
(this.axShockwaveFlash1)).BeginInit();
this.SuspendLayout();
//
// axShockwaveFlash1
//
this.axShockwaveFlash1.Enabled = true;
this.axShockwaveFlash1.Location = new System.Drawing.Point(75, 153);
this.axShockwaveFlash1.Name = "axShockwaveFlash1";
this.axShockwaveFlash1.OcxState =
((System.Windows.Forms.AxHost.State)
(resources.GetObject("axShockwaveFlash1.OcxState") ));
this.axShockwaveFlash1.Size = new System.Drawing.Size(192, 192);
this.axShockwaveFlash1.TabIndex = 0;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(292, 357);
this.Controls.Add(this.axShockwaveFlash1);
this.Name = "Form1";
this.Text = "Form1";
((System.ComponentModel.ISupportInitialize)
(this.axShockwaveFlash1)).EndInit();
this.ResumeLayout(false);

}
public Form1()
{
InitializeComponent();

System.ComponentModel.ComponentResourceManager resources =
new System.ComponentModel.ComponentResourceManager(typ eof(Form1));
this.axShockwaveFlash1.Enabled = true;
this.axShockwaveFlash1.Location = new System.Drawing.Point(37, 126);
this.axShockwaveFlash1.Name = "axShockwaveFlash1";
this.axShockwaveFlash1.OcxState =
((System.Windows.Forms.AxHost.State)
(resources.GetObject("axShockwaveFlash1.OcxState") ));
this.axShockwaveFlash1.Size = new System.Drawing.Size(192, 192);
this.axShockwaveFlash1.TabIndex = 1;
this.axShockwaveFlash1.Movie = "d:\\temp\\mov.swf";
this.axShockwaveFlash1.Play();
}

}
}

Cheers,

Mike
May 30 '06 #1
0 2999

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Darren | last post by:
Hi Groups, Simple Task: Embed flash/shockwave swf into an aspx page. Problem: Visual Studio does not recognize attributes: pluginspage, quality, or type. Generates msg: Could not find any...
3
by: b_naick | last post by:
Is there a way to embed a powerpoint slideshow in a webpage? I have an application which requires a slideshow in one of the frames of the application. One option would be to get the users to...
3
by: Buggyman | last post by:
Hi, I have been given a swf file to embed as a banner on our site... Does anyone have any tips on how I do this?? -- *Many* thanks. :)
3
by: Ollie Riches | last post by:
How do I embed a *.flv file (Flash Video) into an aspx page similar to embedding windows media player active x control? Cheers Ollie Riches
3
by: fnustle | last post by:
I've embedded a flash file into an assembly: But when I try to reference it on a web page: <object codebase="http://download.macromedia.com/pub/shockwave/ cabs/flash/swflash.cab"...
1
by: MissMarie | last post by:
I've been playing around with DIV tables in myspace to better learn how to rewrite my own code for my business site without having to pay someone to design it. I've tried embedding a slideshow into...
3
by: JJ | last post by:
How do I embed a swf (flash) file as a resource in my custom web control? And, if thats possible, how would I access it when I am (presumably) overriding the RenderContents method? Thanks in...
1
by: Chris72205 | last post by:
How would I go about embeding a flash application into an HTML page? Note that I say flash application, it's not just the average .swf file. How do I embed that or is it possible? I am familiar...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.