| Computing desk | ||
|---|---|---|
| < March 6 | << Feb | March | Apr >> | March 8 > |
| Welcome to the Wikipedia Computing Reference Desk Archives |
|---|
| The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
I bought some CD/DVD packs that have a regular CD and a DVD with high-resolution VOB files. About the first of February, I converted a few of the VOB files to FLAC files. This worked then. Now I'm trying to hi-res FLAC files. Then I was able to copy the files from DVD to my computer. Now I can't do that, and I get "Error Code 0x80030309 Copy Protection Error Error". The conversion program says that it can't convert them because they are protected. (It wasn't this way about 5 weeks ago.) I googled for the error and there were matches, but I don't know if they are trustworthy. Is there a trust-worthy way to convert the copy-protected VOB files from the DVD to high-res FLAC files? Bubba73 You talkin' to me? 02:31, 7 March 2015 (UTC)
lists code for IE and Netscape. Does this mean there's no standard code to do this in all browsers ? StuRat (talk) 05:08, 7 March 2015 (UTC)
The following code is supposed to make a rainbow slowly fade in, by displaying the files rainbow_0.png - rainbow_100.png, which each have a different level of transparency:
var opacity = 0;
var rainbowTimerFunc = function() {
document.getElementById('rainbowDiv').innerHTML = 'rainbow_'+ opacity +'.png';
document.getElementById("rainbowDiv").style.backgroundImage = "url('rainbow_' + opacity + '.png')";
opacity = opacity + 10;
if (opacity > 100) {opacity = 0}
};
It's called once a second, and the "innerHTML" line I added for debugging purposes does print out the correct file names. However, no images appear. I am able to display an image manually, by coding in one file name, such as:
document.getElementById("rainbowDiv").style.backgroundImage = "url('rainbow_50.png')";
So, what did I do wrong ? StuRat (talk) 06:53, 7 March 2015 (UTC)
backgroundImage of rainbowDiv, the browser will try to display the image immediately. If the image is already in the cache, it will - but if it isn't (if it hasn't been referred to already) the browser can't display it, and will instead display blank. It will then tell the cache system to load the image (which it does in a background thread). Only once the image is loaded will the browser display it. Even loading an image from the local disk will likely leave a big enough delay for the blank to flash - loading from a slower medium like the network will naturally leave a much longer delay. When people are writing pages that animate through several images, they typically want to make sure the images are loaded before they try to display them. This is done either with offscreen images on the HTML or by adding new image elements to the page in JavaScript. It can then verify an image is loaded with the complete property and binding a callback on its onload property if it isn't. -- Finlay McWalterᚠTalk 10:17, 7 March 2015 (UTC)Is there a way to say "load all these images into the cache, don't do anything else until that's done, then keep them loaded" ? StuRat (talk) 18:26, 7 March 2015 (UTC)
display:hidden) DIV. When the onload callback on each has fired, then you know they're all cached, and you can safely use the same url on your "live" image with confidence that it's in cache. I'll try to work up an example later, but I'm busy now. -- Finlay McWalterᚠTalk 20:08, 7 March 2015 (UTC)UPDATE: Following your suggestions, I wrote some code that does the following:
1) Loads all the pics I want in the animation, positioned on top of each other, but initially in hidden mode.
2) Once they are all loaded, I start a loop timer. At each step, I:
2a) Make one pic visible.
2b) Make the previous pic hidden.
This seems to work great, with no blanking between pics, fairly consistent timing between frames, and I only load each pic once. Are there any down sides to this approach ? StuRat (talk) 06:18, 10 March 2015 (UTC)
-- [[User:Edokter]] {{talk}} 09:29, 10 March 2015 (UTC)content nor background-image are animatable, which means they can't be animated with CSS3 transitions (although I'm sure there are any number of tricksy schemes people can come up with). My JS animation looks a little choppy because it's only updating at 10Hz (because the code reads window.setInterval(fade_func, 100), where 100 is 100ms); lower that number to say 20 (and concomitantly divide the per-frame increment) and it should look smoother. As far as I know, the browser will do CSS animations at the display's native framerate. The CSS will also look a bit better at either end because I set it to use easing (which I was too lazy to do in JS). -- Finlay McWalterᚠTalk 17:25, 10 March 2015 (UTC)More ram = longer battery running time? — Preceding unsigned comment added by Llaanngg (talk • contribs) 16:44, 7 March 2015 (UTC)