Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3751108
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:01:39+00:00 2026-05-19T09:01:39+00:00

Am only looking to play some flash content on my page. found this code

  • 0

Am only looking to play some flash content on my page.
found this code on the web and just copied it into my codes and changed the file name. However the intellisense underlines part of the code in green and says “File ‘swfobject.js’ was not found” this is the code I copied below.

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
<script type='text/javascript' src='swfobject.js'></script>
<script type='text/javascript'>
    var s1 = new SWFObject('cmsflash.swf','player', '400', '300', '9');
    s1.addParam('allowfullscreen', 'false');
    s1.addParam('allowscriptaccess', 'always');
    s1.addParam('flashvars', 'file=video.flv');
    s1.write('preview');
    </script>
<style type="text/css">

and it underlines only (swfobject.js) saying file not found. the file i wish to display is named cmsflash and is in the root directory probably ~/cmsflash.swf

where and what could be going wrong?

the block where the flash should display is declared as follows

 <table class="style2" style="height: 309px; width: 76%">
    <tr>
        <td>
            <p id='preview'>The player will show in this paragraph</p>
            </td>
    </tr>
</table>
<span class="style6">
<br />

Please Help

THIS IS THE NEW CODE AFTER I IMPORTED THE SWFOBJECT FOLDER.

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
<script type="text/javascript" src="swfobject/swfobject.js"></script>
<script type='text/javascript'>
    var s1 = new swfobject('~/cmsflash.swf','player', '400', '300', '9');
    s1.addParam('allowfullscreen', 'false');
    s1.addParam('allowscriptaccess', 'always');
    s1.addParam('flashvars', 'file=video.flv');
    s1.write('preview');
    </script>

I dont get any errors but the flash does not display at page load.

After several editing and flash still does not want to appear so i some more editing by adding a declaration in the master page(site.master) as shown below

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="Prototype5.SiteMaster" %>

<script type="text/javascript">
    var s1 = new SWFObject('cmsflash.swf', 'player', '400', '300', '9');
    s1.addParam('allowfullscreen', 'false');
    s1.addParam('allowscriptaccess', 'always');
    s1.addParam('flashvars', 'file=video.flv');        
    s1.write('preview');
    s1.write('preview1');
</script>

I also made a similar declaration in the child page just in case it was not supposed to be in the master page. so below is the code in the child page(default.aspx)

<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeBehind="Default.aspx.cs" Inherits="Prototype5._Default" %>

var s1 = new SWFObject(‘cmsflash.swf’, ‘player’, ‘400’, ‘300’, ‘9’);
s1.addParam(‘allowfullscreen’, ‘false’);
s1.addParam(‘allowscriptaccess’, ‘always’);
s1.addParam(‘flashvars’, ‘file=video.flv’);
s1.write(‘preview’);
s1.write(‘preview1’);

This is the location where i asked for the flash to appear.

The player will show in this paragraph

I even suspected the flash file was probably not able to display in tables so i went further to declare a “div” as follows

<div id="preview1">The player will show in this paragraph
</div>

But flash still would not show…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T09:01:40+00:00Added an answer on May 19, 2026 at 9:01 am

    Should you get swfobject.js from the same place you get this code which displaying your flash content? Also you may find swfobject.js here http://blog.deconcept.com/2007/02/28/swfobject-1-5-released/

    Than put it in to your solution and check if path src='swfobject.js' in <script type='text/javascript' src='swfobject.js'></script> is correct.

    Also you may drag and drop your 'swfobject.js' file from solution to aspx and designer will add new <script> section with correct path.

    UPDATE:

    1) you need to say var s1 = new SWFObject(...) not var s1 = new swfobject(...)

    2) s1.write('preview'); it’s mean “Place flash content to element with Id = 'preview'“. So you need to place f.e.g div with id='preview' on your form.
    In your case if you don’t have element Id = 'preview' there is nowhere to place your flash content.

    <div id="preview"> 
      <strong>You need to upgrade your Flash Player</strong>   
    </div>
    

    Than it should work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking into using only a ddl to run my query, not a
I'm looking to setup a lightweight, developer only web stack on Windows (and possible
I have been looking at using TDD and implementing proper testing (only just started
How do I tell the 2 versions apart by looking only at their installations?
I am looking for a Regular expression to match only if a date is
I'm looking for a way to match only fully composed characters in a Unicode
i am looking for svn admin a desktop application like VisualSVN Server only for
I'm looking to create favicon.ico files programatically from Python, but PIL only has support
I am looking for a reporting service/tool for visual Studio. My only restraint is
Video podcast ??? Audio only mp3 player I'm looking for somewhere which will extract

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.