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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:27:12+00:00 2026-05-31T09:27:12+00:00

Im having issues getting below code to convert to query and work: The original

  • 0

Im having issues getting below code to convert to query and work:

The original javascript:

<script type="text/javascript">
    function getFlashMovie(movieName) {
        var isIE = navigator.appName.indexOf("Microsoft") != -1;
        return (isIE) ? window[movieName] : document[movieName];
    }
    function stream() {
        var active = document.getElementById("start").value == "stop";
        getFlashMovie("v1stream").setProperty("src", !active ? document.getElementById('url2').value : null);
</script>

Converted and modified jquery version:

    $(document).ready(function() {

  alert ('before');
  swfobject.getObjectById("v1stream").setProperty("src", "rtmp://localhost/mystream");
  alert ('after');

});
  • first snippet works 2nd not
  • getting an error swfobject.getObjectById(“v1stream”) is null
  • It never throws the 2nd alert ‘after’ so it crashes on getting the swfobject…
  • tried all kinds of things for about an hour now, anyone knows how to fix this? thx

UPDATE:

This is the html used

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553534700"
        id="v1stream" width="562" height="547"
        codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
  <param name="movie" value="/assets/im.swf"/>
  <param name="quality" value="high"/>
  <param name="bgcolor" value="#000000"/>
  <param name="allowFullScreen" value="true"/>
  <param name="allowScriptAccess" value="always"/>
  <embed src="/assets/v1stream.swf" quality="high" bgcolor="#000000"
         play="true" loop="false" quality="high"
         allowFullScreen="true"
         allowScriptAccess="always"
         type="application/x-shockwave-flash"
         pluginspage="http://www.adobe.com/go/getflashplayer">
  </embed>
</object>
  • 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-31T09:27:13+00:00Added an answer on May 31, 2026 at 9:27 am

    The jQuery version should be:

    //wait for document.ready to fire
    $(document).ready(function() {
    
        //select an element by ID and then change it's `src` attribute
        $('#v1stream').attr('src', "rtmp://localhost/mystream");
    });
    

    I’m not 100% sure this will work for you as I’m not sure what the swfobject script does when you call .setProperty(), but if you just want to change an attribute on an element, you can do so with the code above.

    Docs:

    • document.ready: http://api.jquery.com/ready/
    • .attr(): http://api.jquery.com/attr
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im having issues getting this to work, maybe its not even possible? I have
I am having issues getting the -e and -d file test operators to work
I know it can be done but am having issues getting it to work.
We are having some issues getting SharePoint to work as we want it to.
I'm having some issues with getting cookies to work when using a ProxyPass to
I'm having an issue getting a LINQ query to work. I have this XML:
I'm working with some OpenGL code for scientific visualization and I'm having issues getting
I am having some issues with my code, and keep getting the same error,
I'm having issues getting a variable declared in an .click function to be updated
I'm following the following blog list below and I'm having issues getting paperclip 2.3.6

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.