Link to a flash file in my asp.net page

Posted on 2010-01-12
Medium Priority
Last Modified: 2012-05-08

I want to link to a flash file (not a local file, but a remote url), and have it display in my webpage.  Is this possible?  How do I do it?
Question by:BobBarker_99
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 37

Accepted Solution

CyanBlue earned 1000 total points
ID: 26295025
Use SWFObject to embed the SWF file and provide the proper URL to the SWF...  

For example...
   swfobject.embedSWF("http://www.domain.com/flash.swf", "test", "400", "300", "10.0.0");


Author Comment

ID: 26295843
I added this:
<script type="text/javascript" srcScripts/swfobject.js"></script>
to my masterpage in the head tag

And this:
<script type="text/javascript">
            var so = new SWFObject("images/flash.swf", "banner", "580", "145", "6", "#FFFFFF");so.write("leftContent");so.addParam("WMode", "Transparent")

In the "leftContent" div.  

But when I run the page, I get this error:
Microsoft JScript runtime error: 'SWFObject' is undefined

Do you see what I am doing wrong?
LVL 37

Expert Comment

ID: 26295955
The only reason I can think of is when your HTML page is not able to find the swfobject.js file...  That might be abit different if you are using template file in .NET...  Try creating a simple HTML page to test if that works so that you can isolate the issue...

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 26298311
I tried that and get the same error.  This is my first time using scripts... is there something basic I may be missing?

LVL 37

Expert Comment

ID: 26298417
Can you post the HTML code you were using???

LVL 14

Assisted Solution

robasta earned 1000 total points
ID: 26301376
1. You need to add the SWFObject.js file (download it here: http://swfobject.googlecode.com/files/swfobject_2_2.zip) [>>>>you can also reference it from google, without downloading it<<<<<<]

2.Extract the file: "swfobject.js" to your "Scripts" directory

3. In the head of the master page : <script type="text/javascript" src="Scripts/swfobject.js"></script> [>>>Typo in the code you posted it read: "srcScripts/swfobject..."]

4.In the body:

<div id="leftContent">
  This text is replaced by the Flash movie.

<script type="text/javascript">
            var so = new SWFObject("images/flash.swf", "banner", "580", "145", "6", "#FFFFFF");
            so.addParam("WMode", "Transparent");

Good tutorial here for more options: http://blog.deconcept.com/swfobject/

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question