Search Results

Search found 188 results on 8 pages for 'preload'.

Page 1/8 | 1 2 3 4 5 6 7 8  | Next Page >

  • (Phaser) Preload Future States in Create?

    - by Brian
    I'm a first time user of Phaser, been trying to make a simple point and click type game. I'm trying to keep things very modular, so I'm defining a list of levels (states) in a JSON, and then every level has its own JSON containing the objects within that level. However, I'm encountering an issue in that, when changing states, I get a black flash while the assets for the next state load (this happens whether I iterate through the JSON list or define everything manually). From what I've read, all sprites should be loaded in the preload stage, however, by doing this I'm causing that tiny but noticeable black pause. I know one way would be to simply load every asset at the start of the game, but that seems incredibly inefficient (wouldn't that fill up the memory immensely?). I would rather load a state's assets from the "parent" state. However, in my quick test (which maybe I did wrong) it seems that game.load doesn't work properly if done within the create stage? What is the best approach to doing this?

    Read the article

  • how to preload more than one but not all images of a slideshow with jquery

    - by wtip
    I'd like to create a web based stop motion video player. Basically a slideshow that shows 2-4 images per second. Each image might be a maximum of 20KB. I don't want to preload all images in the slideshow as there might be thousands, however I need to preload more than just the next image in the show as this will not playback fast enough (because of the playback speed the browser needs to be loading more than one image at a time). I've been looking at using the jQuery Cycle Plugin (http://malsup.com/jquery/cycle/) with a addSlide type function but don't know how to make it work. Would something like this might work? -Slideshow starts -image is played back -preloader will attempt to load up to the next 60 images -playback will wait for the next image in line to completely load, but will not wait for all 59 others. The playback / preloading order is important for this application.

    Read the article

  • How to preload images using jquery for carousel?

    - by Pandiya Chendur
    I used jquery stepcarousel plugin and it works fine... But how to preload images that is used by the plugin... I am using this, <div id="mygallery" class="stepcarousel"> <div class="belt"> <div class="panel"> <img src="Images/img1.jpg" /> </div> <div class="panel"> <img src="Images/img2.jpg" /> </div> </div> </div> <script type="text/javascript"> stepcarousel.setup({ galleryid: 'mygallery', //id of carousel DIV beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs panelclass: 'panel', //class of panel DIVs each holding content autostep: { enable: true, moveby: 1, pause: 3000 }, panelbehavior: { speed: 500, wraparound: false, persist: true }, defaultbuttons: { enable: true, moveby: 1, leftnav: ['Images/lft_arrow.jpg', -5, 220], rightnav: ['Images/rit_arrow.jpg', -5, 220] }, statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels contenttype: ['inline'] //content setting ['inline'] or ['ajax', 'path_to_external_file'] }) </script> How to preload images used by mygallery div such that i can avoid flickering.....

    Read the article

  • simplify a preload image function in jQuery

    - by robertdd
    after i spent 2 day searching a preload function in jQueryi with no succes, i manage to do this: after i upload the image on server, in a list i get this: <li id="upimagesDYGONI"> <div class="percentage">100%</div> <div class="uploadifyProgress"> <div align=" center" class="uploadifyProgressBar" id="upimagesDYGONIProgressBar" style="width: 100%;"> <!--Progress Bar--> </div> </div> </li> with this function, i preload the image: $.getlastimage = function(id) { $.getJSON('operations.php', {'operation':'getli', 'id':id,}, function(lastimg){ $("#upimages" + id + " .percentage").text('processing'); $("#upimages" + id).append('<a href=""><img id="' + id + '" src="" alt="" /></a>') .parent().attr({"href":"uploads/"+ lastimg +'?'+ (new Date()).getTime()}); $("#"+id).hide().attr({"src":"uploads/"+ lastimg +'?'+ (new Date()).getTime(), "alt":lastimg}) .load(function() { $(this).show(); $("#upimages" + id + " .percentage").remove(); $("#upimages" + id + " .uploadifyProgress").remove(); }); }); } })(jQuery) and i get this: <li id="upimagesLRBHYN" style="" class=""> <a href="uploads/0002.jpg?1271901177027"> <img alt="0002.jpg" src="uploads/0002.jpg?1271901177028" id="LRBHYN" style="display: block;"> </a> </li> how i can simplify the function? i want to use the full power of jQuery!! any idea?

    Read the article

  • jQuery: How do you preload sound?

    - by aximili
    I have a website that plays sound when you click a button. This is how I do it function PlaySound(soundfile) { $('#soundContainer').html("<embed src='/uploads/sounds/" + soundfile + "' hidden=true autostart=true loop=false>"); } How do you preload the sound file beforehand? Thank you.

    Read the article

  • Flash: How to preload upcoming SWF while current one plays

    - by pthesis
    I have a Flash slideshow that plays SWFs listed in an XML file. I would like to have the upcoming SWF load while the current one displays. I've tried all sorts of combinations of LoadMovie and LoadMovieNum, including creating an empty movie clip, but there's something I'm just not getting. Right now, after making the first round through all the files, it transitions smoothly from slide to slide, but I'd like for it to preload so that it transitions without the "Loading..." screen the first time around. It can be viewed here: slideshow Where should I put the LoadMovie line to load the next file (image[p+1]), and how should it look? function loadXML(loaded) { if (loaded) { xmlNode = this.firstChild; image = []; description = []; total = xmlNode.childNodes.length; for (i=0; i<total; i++) { image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue; description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue; } firstImage(); } else { content = "file not loaded!"; } } xmlData = new XML(); xmlData.ignoreWhite = true; xmlData.onLoad = loadXML; xmlData.load("xmlfile.xml"); ///////////////////////////////////// back_btn.onRelease = function () { backImage(); }; next_btn.onRelease = function () { nextImage(); }; p = 0; function nextImage() { if (p<(total-1)) { p++; trace(this); _root.mc_loadfile.loadMovie (image[p]); _root.movie_name.text = image[p]; next_btn._visible = true; back_btn._visible = true; if (getBytesLoaded() == getBytesTotal()) slideshow(); } else if (p == (total-1)) { p = 0; firstImage(); } } function backImage() { clearInterval(myInterval); if (p>0) { --p; _root.mc_loadfile.loadMovie (image[p]); _root.movie_name.text = image[p]; next_btn._visible = true; if (p != 0) { back_btn._visible = true; } else { back_btn._visible = false; } slideshow(); } } I'd appreciate any help.

    Read the article

  • Preload a lot of tiny pics

    - by clorz
    I'm thinking about how to approach the problem at hand. There's a flash movie that requires a lot of relativly small images and I'm trying to optimize the time it takes for them to be preloaded. One thing I've considered it turning on KeepAlive in Apache on the server side. That works. But my mind still wonders if there's anything else ;-) So, what other approaches I may try? Is there a way to compress all those images and then unpack on client side? I have full control on both server and client side. Can even try installing something other than Apache. Cache is not an option because it already works and it's first time loading that bothers me here.

    Read the article

  • Can I preload multiple video resources to load in the same HTML5 <video> element?

    - by Sergio1132
    I'm working out details on a web application which involves the sequential loading of a long series of (very short) video clips, one after the other, with occasional input from the user establishing new directions for which video clips to load. I would like to be able to have the browser preload the video clips five at a time. However, the way that we currently have the site working is by means of a single video element which is having its src attribute continually updated through JavaScript. So, my question is, is there a straightforward way I can get the browser to preload multiple video clips even though I am ultimately loading them all (one at a time) into the same video element? This is my first question here, so let me know if I could have phrased that better...

    Read the article

  • How to do pre-loading

    - by Dave
    I have a question that is confusing me with making a game. For my game launch i pre load everything for the main menu then i loop the game to display it. But lets argue player wants to launch a new game or a specific level, then you preload the relevant sounds/graphics for that level right? How ever, the player must already be running the game loop if they are at the main menu, so you can't load in the game loop or you will load every frame...but im pretty sure most big games don't preload every level when you first run the game from desktop because it would take a long time on some of these games.... How is it done :S

    Read the article

  • Jquery: Preload an image on request with a callback function?

    - by tarnfeld
    Hey, I'm helping out a friend with a website he's developing and we are having trouble with preloading images on request. Basically, when the user clicks on a thumbnail of the product a <div> slides down that includes a scrolling carrousel of large images. In total there are about 20MB of images that could be loaded in (if you did them all) so preloading them on the page load would not be an option. Is there a way that we could call a javascript function that begins to preload about 4 images and then when it's done it has a callback function? Thanks! P.S. We are using jQuery on the page...

    Read the article

  • jQuery image preload/cache halting browser

    - by Nathan Loding
    In short, I have a very large photo gallery and I'm trying to cache as many of the thumbnail images as I can when the first page loads. There could be 1000+ thumbnails. First question -- is it stupid to try to preload/cache that many? Second question -- when the preload() function fires, the entire browser stops responding for a minute to two. At which time the callback fires, so the preload is complete. Is there a way to accomplish "smart preloading" that doesn't impede on the user experience/speed when attempting to load this many objects? The $.preLoadImages function is take from here: http://binarykitten.me.uk/dev/jq-plugins/107-jquery-image-preloader-plus-callbacks.html Here's how I'm implementing it: $(document).ready(function() { setTimeout("preload()", 5000); }); function preload() { var images = ['image1.jpg', ... 'image1000.jpg']; $.preLoadImages(images, function() { alert('done'); }); } 1000 images is a lot. Am I asking too much?

    Read the article

  • jQuery Cycle Plugin: How to preload first images with a loading background gif then fade in Cycle Sl

    - by Theo Ribeiro
    Hello all, I'm struggling with this, maybe some of you can help... I have a home page slideshow with large images at www.theoribeiro.com using jQuery Cycle plugin Images are large and sometimes with slow connections (but even in fast ones) the behavior of the slideshow start is pretty ugly, showing the image all of a sudden or half-loaded. I want to make sure that at least the 2 or 3 first images are loaded before the slideshow starts and meanwhile I want to run a loading animated gif, then I want to fade in the first image. I searched a lot on the internet and on the forums and tried loads of stuff with my limited knowledge of javascript and jQuery but could't come up with a solution. Any help would be greatly appreciated!!!

    Read the article

  • Default Keyboard for new users in Windows 7

    - by xited
    I just installed Windows 7 and I want all users signing in to the computer to see the Language Bar customized with the following three languages: "English (American)" "French (Standard)" "Chinese (Simplified PRC)" I am running the following four lines of code at log on in order to change the registry such that each user will see the language bar, and then have access to the three keyboard layouts mentioned above. reg add "HKCU\Software\Microsoft\CTF\LangBar" /v ShowStatus /t REG_DWORD /d 4 /f reg add "HKCU\Keyboard Layout\Preload" /v 2 /d 0000040c reg add "HKCU\Keyboard Layout\Preload" /v 3 /d 00000c0a reg add "HKCU\Keyboard Layout\Preload" /v 4 /d 00000804 The above works fine, but with one small/major inconvenience: the user has to log off and then log back on in order for these changes to take effect and see the language bar, as described above. The question becomes: How can I force these changes to take effect so that users don't have to log off and then log back in to see the language bar. This has to be done automatically when users log in.

    Read the article

  • background image preload

    - by Bharanikumar
    Shall i use below snippet for preload background images, or else is there any snippet there , function preload(images) { if (document.images) { var i = 0; var imageArray = new Array(); imageArray = images.split(','); var imageObj = new Image(); for(i=0; i<=imageArray.length-1; i++) { //document.write('<img src="' + imageArray[i] + '" />');// Write to page (uncomment to check images) imageObj.src=images[i]; } } }

    Read the article

  • When should a bullet texture be loaded in XNA?

    - by Bill
    I'm making a SpaceWar!-esque game using XNA. I want to limit my ships to 5 active bullets at any time. I have a Bullet DrawableGameComponent and a Ship DrawableGameComponent. My Ship has an array of 5 Bullet. What is the best way to manage the Bullet textures? Specifically, when should I be calling LoadTexture? Right now, my solution is to populate the Bullet array in the Ship's constructor, with LoadTexture being called in the Bullet constructor. The Bullet objects will be disabled/not visible except when they are active. Does the texture really need to be loaded once for each individual instance of the bullet object? This seems like a very processor-intensive operation. Note: This is a small-scale project, so I'm OK with not implementing a huge texture-management framework since there won't be more than half a dozen or so in the entire game. I'd still like to hear about scalable solutions for future applications, though.

    Read the article

  • Android Loading Screen: How do I use a stack to load elements?

    - by tom_mai78101
    I have some problems with figuring out what value I should put in the function: int value_needed_to_figure_out = X; ProgressBar.incrementProgressBy(value_needed_to_figure_out); I've been researching about loading screens and how to use them. Some examples I've seen have implemented Thread.sleep() in a Handler.post(new Runnable()) function. To me, I got most of that concept of using the Handler to update the ProgressBar, while pretending to do some heavy crunching work. So, I kept looking. I have read this thread here: How do I load chunks of data from an assest manager during a loading screen? It said that I can try using a stack it needs to load, and adding a size counter as I add elements to the stack. What does it mean? This is the part where I'm totally stumped. If anyone would provide some hints, I'll gladly appreciate it. Thanks in advance.

    Read the article

  • Android Loading Screen: How do I go about using a stack to load elements, and the option of incrementing the size counter?

    - by tom_mai78101
    I have some problems with figuring out what value I should put in the function: int value_needed_to_figure_out = X; ProgressBar.incrementProgressBy(value_needed_to_figure_out); I've been researching about loading screens and how to use them. Some examples I've seen have implemented Thread.sleep() in a Handler.post(new Runnable()) function. To me, I got most of that concept of using the Handler to update the ProgressBar, while pretending to do some heavy crunching work. So, I kept looking. I have read this thread here: How do I load chunks of data from an assest manager during a loading screen? It said that I can try using a stack it needs to load, and adding a size counter as I add elements to the stack. What does it mean? This is the part where I'm totally stumped. If anyone would provide some hints, I'll gladly appreciate it. Thanks in advance.

    Read the article

  • Preload images using jquery

    - by OddOneOut
    In my web page some images are taking a lot of time to load in IE.So I used this for preloading images in my page.But still the problem persists.Any suggestions? function preload(arrayOfImages) { $(arrayOfImages).each(function(){ $('<img/>')[0].src = this; }); alert("Done Preloading..."); } // Usage: preload([ '/images/UI_1.gif', '/images/UI_2.gif', '/images/UI_3.gif', '/images/UI_4.gif', '/images/UI_5gif', '/images/UI_6.gif', '/images/UI_7.gif', '/images/UI_8.gif', '/images/UI_9.gif' ]); < div

    Read the article

  • Load ModernUI but also preload desktop on background

    - by l0l0l0l0l
    Login Windows load modern UI Only when I click on the "Desktop" tile shortcut that my desktop is really loaded, it take a few seconds to open everything (like rainmeter and other things) How can I make windows load both modern UI and my desktop on the background? I don't want to skip the modern UI just autoload the desktop. Similar to add something.exe to the startup, but what executable should I use? I've tried explorer.exe but didn't work.

    Read the article

  • Can you preload images in a dojo animation.

    - by asynchronous-challenged
    I have a dojo animation object of about 15 images. I'm also using dojo.fx.chain to link them all together. Right before I create all my dojo.fadeIn's and dojo.fadeOut's I added in some basic javascript to preload each image. My question is: Am I doing this the hard way or is there some function/attr I can set in the animation object to do this?

    Read the article

  • Preload/predisplay tiles in a CATiledLayer?

    - by jemmons
    On the iPhone (though I imagine it's an equally valid question in Cocoa) I have a UIScrollView around a UIView backed by a CATiledLayer. The way it works by default is to load any uncached/unfetched tiles when my viewport scrolls over a blank section of the CATiledLayer. What I would like to know is if there's a way to trigger CATiledLayer to load a tile that's not actively being displayed? I would like to, for example, preload all tiles contiguous to the currently displayed tile while they are still offscreen, thus avoiding flashing a blank screen that fades in to the image once it's loaded asynchronously. Any ideas?

    Read the article

1 2 3 4 5 6 7 8  | Next Page >