Results 1 to 10 of 10

Thread: Java Script.... Another language I DON'T know

  1. #1
    Завсегдатай rockzmom's Avatar
    Join Date
    Nov 2008
    Location
    East Coast, United States
    Posts
    2,184
    Rep Power
    18

    Java Script.... Another language I DON'T know

    So, does anyone on this forum know Java and care to help me solve a problem I am having with a very short script I found on another forum?

    (I did actually PM the person who wrote the script and he very nicely told me that as I had never posted before on their forum and as he was too busy, that he would not help me solve my problem that I was having. So... I figured I would come back "home" and see if anyone here might be able to help me. I don't recall us EVER saying no to someone because they had never posted on our site before.)
    I only speak two languages, English and bad English.
    Check out the MasterRussian Music Playlist
    Click here for list of Russian films with English subtitles and links to watch them.

  2. #2
    Почтенный гражданин bitpicker's Avatar
    Join Date
    May 2009
    Location
    Germany
    Posts
    653
    Rep Power
    15
    Java and JavaScript are two entirely different things. JavaScript is a scripting language for the internet, Java is a full-fledged interpreted programming language for all kinds of programs. JavaScript is an unfortunate misnomer.

    Why don't you post the source code of the script here and tell us what the problem is?
    Спасибо за исправления!

    Вам нравится этот форум, и вы изучаете немецкий язык? Вот похожий форум о немецком языке.

  3. #3
    Завсегдатай rockzmom's Avatar
    Join Date
    Nov 2008
    Location
    East Coast, United States
    Posts
    2,184
    Rep Power
    18
    Quote Originally Posted by bitpicker View Post
    Java and JavaScript are two entirely different things. JavaScript is a scripting language for the internet, Java is a full-fledged interpreted programming language for all kinds of programs. JavaScript is an unfortunate misnomer.

    Why don't you post the source code of the script here and tell us what the problem is?
    Once again, you teach me something!

    Okay so here is the backstory:

    1. I uploaded a video to Photobucket and want to embed it onto a Webpage. I have done this before as they provide the code.

    2. This time however, the "thumbnail" or "Static" photo they provided was not the full frame. It is off center, blown up and really blurry. So it looks "bad" on the Website.

    3. So, I did some searching and found a thread from 2008 that showed how to make a photo "clickable" on a Website that will then start the video. A "click to play video" sort of thing.

    4. The Java Script was written for YouTube though and not PhotoBucket. I got it to work using their original script and test video that is still up in YouTube; however, when I replaced the YouTube video with my Photobucket Video, all I get is a white screen. Which was talked about in the thread, however, the person who fixed the code didn't say why that happened, just fixed the code.

    5. Photobucket converts the video that I am using into .mp4

    6. I have tried Chrome and IE, neither worked.

    7. My photo works fine and will click on either their video or mine, just when I do mine, I get the white screen.

    8. for testing, here is a video in Photobucket
    If you click on this video, you will see a box on the right with all the links Photobucket provides for embedding. When I tried to paste them here, they got all messed up :



    HOWEVER... I also tried using this link:
    'http://s444.photobucket.com/albums/qq167/rockzmom/MasterRussian/364b632a.mp4'

    9. Here is the original code: I had to add an extra space between the : and the P so as not to get a smiley face on the line ... style="cursorointer"

    So, I replaced my photo in the "image.png" and my video in BOTH places where it has YouTube leaving the &hl=en&fs=1&autoplay=1 part of the code. So I only took out this part 'http://youtube.com/v/jxXukpxNSx4' and put my video link in its place.




    <div onclick="this.nextSibling.style.display='block'; this.style.display='none'"><img src="image.png" style="cursor: pointer" /></div><div style="display:none">
    <!-- Embed code here -->

    <object width="425" height="344"><param name="movie" value="http://youtube.com/v/jxXukpxNSx4&hl=en&fs=1&autoplay=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://youtube.com/v/jxXukpxNSx4&hl=en&fs=1&autoplay=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object>

    <!-- End Embed code -->

    </div>

    10. If you want for testing, you can use this photo
    'http://i444.photobucket.com/albums/qq167/rockzmom/6fdda28f.jpg'

    11.......... Any ideas oh wise ones???
    I only speak two languages, English and bad English.
    Check out the MasterRussian Music Playlist
    Click here for list of Russian films with English subtitles and links to watch them.

  4. #4
    Старший оракул CoffeeCup's Avatar
    Join Date
    Feb 2009
    Location
    Snowbearia
    Posts
    902
    Rep Power
    14
    The "nextSibling" can be a tricky thing. So try to make it simpler by replacing it with a direct reference:
    1. replace [this.nextSibling] with [myvideoid]
    2. insert [ id="myvideoid"] into the second <div> tag as below

    If you need to use the photobucket's video you should replace all the code within the <object> ... </object> with the code which is suitable for the photobucket (you can find it at the photobucket's page as "HTML code" in the "Share this video" box). The bold part is what should be added to the code line from the photobucket. Though I'm not sure if my replacement for the <object> code would work correctly.

    Code:
    <div onclick="myvideoid.style.display='block';  this.style.display='none'">
       <img src="image.png" style="cursor:pointer" />
    </div>
    <div id="myvideoid" style="display:none">
    <!-- Embed code here -->
    <object width="600" height="361">
       <embed width="600" height="361" 
              type="application/x-shockwave-flash" allowFullscreen="true" allowNetworking="all" wmode="transparent"
              src="http://static.photobucket.com/player.swf" 
              flashvars="file=http://vid444.photobucket.com/albums/qq167/rockzmom/MasterRussian/364b632a.mp4">
        </embed>
    </object>
    <!-- End Embed code -->
    </div>
    So Long, and Thanks for All the Fish

  5. #5
    Завсегдатай rockzmom's Avatar
    Join Date
    Nov 2008
    Location
    East Coast, United States
    Posts
    2,184
    Rep Power
    18
    Quote Originally Posted by CoffeeCup View Post
    The "nextSibling" can be a tricky thing. So try to make it simpler by replacing it with a direct reference:
    1. replace [this.nextSibling] with [myvideoid]
    2. insert [ id="myvideoid"] into the second <div> tag as below

    If you need to use the photobucket's video you should replace all the code within the <object> ... </object> with the code which is suitable for the photobucket (you can find it at the photobucket's page as "HTML code" in the "Share this video" box). The bold part is what should be added to the code line from the photobucket. Though I'm not sure if my replacement for the <object> code would work correctly.

    Code:
    <div onclick="myvideoid.style.display='block';  this.style.display='none'">
       <img src="image.png" style="cursor:pointer" />
    </div>
    <div id="myvideoid" style="display:none">
    <!-- Embed code here -->
    <object width="600" height="361">
       <embed width="600" height="361" 
              type="application/x-shockwave-flash" allowFullscreen="true" allowNetworking="all" wmode="transparent"
              src="http://static.photobucket.com/player.swf" 
              flashvars="file=http://vid444.photobucket.com/albums/qq167/rockzmom/MasterRussian/364b632a.mp4">
        </embed>
    </object>
    <!-- End Embed code -->
    </div>
    CoffeeCup,

    We are half way there!! Thank you!

    I got the photo to click and once I click on it the video comes up.... however... it does not automatically play. It just comes up with the old nasty looking screen that I had before and you have to click on that to make the video begin to play. So I need something in the code to make it automatically start playing once you click on the photo.


    Any ideas?
    I only speak two languages, English and bad English.
    Check out the MasterRussian Music Playlist
    Click here for list of Russian films with English subtitles and links to watch them.

  6. #6
    Старший оракул CoffeeCup's Avatar
    Join Date
    Feb 2009
    Location
    Snowbearia
    Posts
    902
    Rep Power
    14
    Quote Originally Posted by rockzmom View Post
    CoffeeCup,

    We are half way there!! Thank you!

    I got the photo to click and once I click on it the video comes up.... however... it does not automatically play. It just comes up with the old nasty looking screen that I had before and you have to click on that to make the video begin to play. So I need something in the code to make it automatically start playing once you click on the photo.

    Any ideas?
    Unfortunately, I've no enough experience with flash embedding. I've tried to add "autoplay/autostart=1" option but it does not work. Maybe somebody else have an idea or you can try the photobucket support.
    So Long, and Thanks for All the Fish

  7. #7
    Завсегдатай rockzmom's Avatar
    Join Date
    Nov 2008
    Location
    East Coast, United States
    Posts
    2,184
    Rep Power
    18
    Quote Originally Posted by CoffeeCup View Post
    Unfortunately, I've no enough experience with flash embedding. I've tried to add "autoplay/autostart=1" option but it does not work. Maybe somebody else have an idea or you can try the photobucket support.
    Correct, if I add in the &autoplay=1 command it comes up to a very nice black screen (that has the Photobucket logo on the top right hand of the screen) that you then have to hit play for; however, when I hit the play button I get the error message "There was a problem playing your video. File has invalid structure - Unable to load."

    The same thing happens if I add the full code that was in the original code of &hl=en&fs=1&autoplay=1 (which I don't know what it all stands for and I tried searching for what it meant and couldn't find).
    I only speak two languages, English and bad English.
    Check out the MasterRussian Music Playlist
    Click here for list of Russian films with English subtitles and links to watch them.

  8. #8
    Почётный участник
    Join Date
    Nov 2009
    Location
    туманный альбион
    Posts
    91
    Rep Power
    11
    seems like instead of autoplay=1 you need ap=1

    in coffecup's code try replacing
    flashvars="file=http://vid444.photobucket.com/albums/qq167/rockzmom/MasterRussian/364b632a.mp4"
    with

    flashvars="file=http://vid444.photobucket.com/albums/qq167/rockzmom/MasterRussian/364b632a.mp4&ap=1"

  9. #9
    Завсегдатай rockzmom's Avatar
    Join Date
    Nov 2008
    Location
    East Coast, United States
    Posts
    2,184
    Rep Power
    18
    Quote Originally Posted by Paperplane View Post
    seems like instead of autoplay=1 you need ap=1

    in coffecup's code try replacing
    flashvars="file=http://vid444.photobucket.com/albums/qq167/rockzmom/MasterRussian/364b632a.mp4"
    with

    flashvars="file=http://vid444.photobucket.com/albums/qq167/rockzmom/MasterRussian/364b632a.mp4&ap=1"
    Paperplane!!! That worked.

    HOWEVER... (don't ya just hate HOWEVER) in the mean time I had switched over to YouTube and found that they had codes to:

    turn off the titles (&showinfo=0)
    turn off the recommended videos once you finish watching the video (&rel=0)
    to hide the video controls like play and pause after it starts playing unless you mouse over them (&autohide=1)

    When I used these for the Photobucket... of course they didn't work. I searched on Photobucket and Google and could not locate their corresponding codes. As you found or knew the ap=1 ... do you by any chance know these corresponding codes?

    Thanks!!!
    I only speak two languages, English and bad English.
    Check out the MasterRussian Music Playlist
    Click here for list of Russian films with English subtitles and links to watch them.

  10. #10
    Почётный участник
    Join Date
    Nov 2009
    Location
    туманный альбион
    Posts
    91
    Rep Power
    11
    Rockzmom. Sorry, no luck so far. i might try and have another look tomorrow.
    I found the ap=1 by clicking on a photobucket video with autoplay and then looking at the source code. So if you happen to have come across another photob video with those settings then we should be able to get the code from there.

    Getting rid of the related videos may be a lost cause however.Allow pro users to remove the related videos feature on video player.


    EDIT: I tried googling it again but still no luckt. Shame cos this is useful stuff to know.
    Last edited by Paperplane; May 29th, 2011 at 12:38 PM.

Similar Threads

  1. is и connected in script
    By sperk in forum Grammar and Vocabulary
    Replies: 16
    Last Post: April 15th, 2011, 10:21 AM
  2. anyone want to look over my script assignment?
    By sefbarisovich in forum Getting Started with Russian
    Replies: 5
    Last Post: February 4th, 2008, 11:04 AM
  3. Help me with the script
    By Yazeed in forum Videos
    Replies: 3
    Last Post: November 22nd, 2007, 06:50 AM
  4. Look for audio with script
    By yiming12000 in forum Grammar and Vocabulary
    Replies: 10
    Last Post: August 15th, 2006, 05:59 PM
  5. anyone want to look over my script assignment?
    By sefbarisovich in forum General Discussion
    Replies: 5
    Last Post: January 1st, 1970, 12:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Russian Lessons                           

Russian Tests and Quizzes            

Russian Vocabulary