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 8199295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:08:28+00:00 2026-06-07T06:08:28+00:00

So my question is how do I start a movie with a call to

  • 0

So my question is how do I start a movie with a call to a javascript / jquery function?

Background:

I have an object in my html that embeds is a .mov file like so:

<object CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="100%" height="100%" class="movie1" id="movie1ie">
                <param name="src" value="movies/test.mov">
                <param name="autoplay" value="false">
                <param name="loop" value="false">
                <param name="controller" value="false">
                <!--[if !IE]>-->
                <object type="video/quicktime" data="movies/test.mov" width="100%" height="100%" class="movie1" id="movie1">
                    <param name="autoplay" value="false">
                    <param name="loop" value="false">
                    <param name="controller" value="false">
                </object>
                <!--<![endif]-->
            </object>

And it seems to be okay, until I want to play the movie with a call to javascript. I am using jQuery so I tried this from within a function:

function startMovie(whom){
    var playIt = 'movie'+ whom;
    $('#' + playIt).get(0).play();
}
//and call the function
startMovie(1);

But then I get this error:

Uncaught TypeError: Object #<HTMLObjectElement> has no method 'play' 

Weird, but I’m no jQuery ninja so I tried to call it using good ole javascript:

function startMovie(1){
    var playIt = 'movie'+ whom;
    document.getElementById(playIt).Play();
}

But now I get the following error in my console:

Uncaught Error: Error calling method on NPObject. 

Which is very wierd, since if I put the following into my console the movie will start playing without errors:

document.getElementById('movie1').Play()

FWIW I am using Chrome on a Mac and the files are running on the local machine (no server).

  • 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-06-07T06:08:28+00:00Added an answer on June 7, 2026 at 6:08 am
    function startMovie(whom){
        var playIt = 'movie'+ whom;
        document.getElementById(playIt).Play();
    }
    startMovie('1');
    

    Try that.

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

Sidebar

Related Questions

I have a short version of the question: I start a thread like that:
Start to learning Cocos2d and have a question. With moving of the sprite I
before I start I want to point out that I tagged this question as
Initial Question Yesterday i read about ECMAScript 5 Object.create() And I wanted to start
(Before I start, yes I have asked a similar question before; unfortunately due to
Let me start by saying that this question can possibly be answered by AI
I have code in an svn repository, call it repository A. Now say that
I have a function, binary_range_search , that is called like so: my $brs_iterator =
Just documenting this as a question an answer so that somebody else doesn't have
I want to close out my old question start a new one with a

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.