Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > HTML > BOOK: Beginning HTML, XHTML, CSS, and JavaScript
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning HTML, XHTML, CSS, and JavaScript
This is the forum to discuss the Wrox book Beginning HTML, XHTML, CSS, and JavaScript by Jon Duckett; ISBN: 978-0-470-54070-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning HTML, XHTML, CSS, and JavaScript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 11th, 2011, 05:55 PM
Posts: n/a
Red face flash video player using swfobject.js

i was trying to make a flash video playback using swfobject java script. i am using the same swfobject script found in the downloaded codes of the book.
this is the html page coding. there is a folder called flash in the root folder (site) and there is the video called flash_sample.swf in there. i dont know why doesn't it work. it's just a blank page with the text that i enter in the body section: This element can contain.....

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">


    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Adding a flash video playback</title>
    <script type="text/javascript" src="swfobject.js"></script>
    <script type="text/javascript">
        swfobject.embedSWF("flash/flash_sample.swf", "flash_movie", "300", "200", "8.0.0");


    <div id="flash_movie">This element can contain content that search engines can index, and which is helpful to those who do not have Flash installed.</div>



Last edited by justinneng; December 11th, 2011 at 06:01 PM..
Reply With Quote
  #2 (permalink)  
Old December 12th, 2011, 09:07 AM
Authorized User
Points: 105, Level: 2
Points: 105, Level: 2 Points: 105, Level: 2 Points: 105, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Sep 2010
Posts: 19
Thanks: 0
Thanked 4 Times in 4 Posts

If you are seeing the text inside the <div> that starts "This element can contain...", then it means that the SWF Object script is not replacing the <div> with the Flash movie.

First thing I would check is whether your swfobject.js file is in the same folder as the HTML page - is this where it is (if it is not in the same folder it won't work)?

Second, are you running it from your desktop? If so, which browser / OS are you using?

Third, just to check, are you able to see Flash movies on other web sites ok? (Some new machines come without Flash installed.)
Reply With Quote
  #3 (permalink)  
Old December 12th, 2011, 09:35 AM
Posts: n/a
Wink Thanks @bitnap

Hey thank once again...

the problem was with the location of the script file. it was in a different location. i could solve that. thanks anyway for replying...
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
flash player in windows ce maanikmca Visual Studio 2005 0 November 22nd, 2010 03:46 AM
Play SWF without flash player installed Mentos Flash (all versions) 1 December 7th, 2009 02:46 PM
Creating a Flash audio player Dan7 Flash (all versions) 3 December 16th, 2006 01:37 PM
How create a flash music player method Flash (all versions) 1 July 25th, 2005 12:01 PM
flash mp3 player scorpion_king Flash (all versions) 1 March 23rd, 2004 01:53 PM

All times are GMT -4. The time now is 05:40 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.