Suits999
Suits999

Reputation: 369

Including a .SWF file in a C# Webform

I'm currently working on a project where i need to include a application page for users. I need the users to access few .SWF flash games through this page. I created a folder named applications in the Application and imported the .SWF files into that. After that I tried directly linking them using a hyperlink on my page, but they don't seem to open :/ am i missing something? or is there something else i need to do before that?

Would really appreciate it if you can help

Thank you

Upvotes: 0

Views: 839

Answers (2)

Michiel
Michiel

Reputation: 4260

Normally, you should be able to open .swf files directly in your browser, although embedding the swf into your html is often a good idea, you don't have to. If the url in your address bar shows an adress ending with '.swf' you can test if a swf has loaded by right clicking in your browser window, if you see the flash context menu (zoom in, zoom out, etc) Your swf has loaded.

If your swf has loaded, but nothing else happens, there can be many other reasons for this.

Where did you get the swf game files? If you copied them from another site it's very likely that the swf is supposed to load other files (game assets (images), settings (xml) etc) before the game can be played.

Sometimes the execution of (actionscript) code in a swf is triggered by script in the html page it is embedded in.

It's not entirely clear what you are trying to do....

Upvotes: 1

Jsterman
Jsterman

Reputation: 333

I don't think you can just hyperlink to your .swf file. According to this site, and your using Dreamweaver or FrontPage, you can just insert it from the Insert menu (or something of the kind). If you aren't using either of those two, you can edit you .swf file in Flash and choose "Export as HTML" from the file menu (or where ever it is) and then just copy the source code of the resulting file to your webpage.

Upvotes: 1

Related Questions