Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 11th, 2011, 05:55 PM
justinneng
Guest
 
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.....


Code:
<?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">

<head>

    <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");
    </script>
        
</head>

<body>

    <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>

</body>

</html>

Last edited by justinneng; December 11th, 2011 at 06:01 PM..
 
Old December 12th, 2011, 09:07 AM
Authorized User
 
Join Date: Sep 2010
Posts: 19
Thanks: 0
Thanked 4 Times in 4 Posts
Default

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.)
 
Old December 12th, 2011, 09:35 AM
justinneng
Guest
 
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...





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





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