Search Results

Search found 56 results on 3 pages for 'preloader'.

Page 1/3 | 1 2 3  | Next Page >

  • Why would bytesTotal increase in a AS3 preloader?

    - by justkevin
    I'm creating a custom preloader for a Flex app and have noticed the following behavior: when loading, the progress bar goes to 100%, then down then back up, and so on until the app is finished loading. When I put a trace in the dowloadprogress listener, I see that while the app is loading, both bytesLoaded and bytesTotal increase, but not necessarily at the same time. Code: private function onDownloadProgress(event:ProgressEvent):void { var loaded:int = event.bytesLoaded; var total:int = event.bytesTotal; trace(event.target,loaded,total); _starfield.progress = loaded/total; } Output: [object Preloader] 134276 134276 [object Preloader] 265348 285007 [object Preloader] 285007 285007 [object Preloader] 678223 1322116 [object Preloader] 809295 1322116 [object Preloader] 1322116 1322116 [object Preloader] 1322116 1322116 [object Preloader] 1387652 1584342 [object Preloader] 1791882 1791882 [object Preloader] 2293133 2293133 [object Preloader] 2362938 2362938 [object Preloader] 2362938 2362938 [object Preloader] 2362938 2362938 Why does bytesTotal change during load?

    Read the article

  • Making a game preloader (Flash) [closed]

    - by Artemix
    Possible Duplicate: How do you create a single/internal pre-loader for a Flash game written using Flex? Hi guys, Im trying to make a preloader in a Flash game. Thing is, I need some advices on this since I never made one, I have the game almost complete, but when, i.e, I upload the game to a website I get a white screen for a few seconds, and then I see the game. Is there a simple way, maybe using an a API or something like that, to make a preloader screen? Im using Flash Builder fyi. Thx!

    Read the article

  • Custom Preloader in Flex 4?

    - by davr
    Has anyone successfully implemented a custom preloader in Flex 4? In my experience, when I specify a custom preloader using the preloader="com.foo.MyPreloader" in the Application tag, the preloader does not display until the SWF is completely downloaded, defeating the purpose of the preloader! Perhaps this is a bug in the still-beta Flex 4 framework?

    Read the article

  • Flex DownloadProgressBar preloader override

    - by Shawn Simon
    I'm watching this video, which is pretty good http://www.gotoandlearn.com/play?id=108 It shows how to inherit from DownloadProgressBar to create a customer preloader for your flex app. The DownloadProgressBar class has an overridable getter for the property 'preloader.' Isn't this poor design? What does a property called preloader have anything to do with a class for a DownloadProgressBar?

    Read the article

  • call flex initComplete at a specific time

    - by dubbeat
    Hi, Below is the overriden on complete function for a preloader in Flex. private function initComplete(e:Event):void { //dispatchEvent(new Event(Event.COMPLETE)); cp.status.text="Configuring... Please Wait"; } What I want to do is when the app has finsihed loading I want to change the preloaders text to "configuring". Then I want to go and do a bunch of setup stuff in my code. Once I've done all the setup I wanted how can I get the Preloader to dispatch its Event.complete from else where in my code? I tried Application.application.preloader but it comes up null. So I guess my question really is how to access a preloader from anywhere in my application. Would a better approach be to have all setup classes as members of my preloader class?

    Read the article

  • Preloader stalling flash movie in IE

    - by rogersoli
    This is only a problem in IE. the following actionscript is for a simple preloader for a movie i'm working on. It works fine in Firefox but the movie stops on the first frame when opened with Internet Explorer. Has anyone had this problem before? stop(); addEventListener(Event.ENTER_FRAME,checkLoad); function checkLoad(e:Event):void { var pcent:Number=this.loaderInfo.bytesLoaded /this.loaderInfo.bytesTotal*100; bar_mc.scaleX=pcent/100; loader_txt.text=int(pcent)+"%"; if (pcent==100) { removeEventListener(Event.ENTER_FRAME,checkLoad); this.gotoAndPlay(2); } }

    Read the article

  • How to stop a preloader stalling a flash movie in IE

    - by rogersoli
    This is only a problem in IE. the following actionscript is for a simple preloader for a movie i'm working on. It works fine in Firefox but the movie stops on the first frame when opened with Internet Explorer. Has anyone had this problem before? stop(); addEventListener(Event.ENTER_FRAME,checkLoad); function checkLoad(e:Event):void { var pcent:Number=this.loaderInfo.bytesLoaded /this.loaderInfo.bytesTotal*100; bar_mc.scaleX=pcent/100; loader_txt.text=int(pcent)+"%"; if (pcent==100) { removeEventListener(Event.ENTER_FRAME,checkLoad); this.gotoAndPlay(2); } }

    Read the article

  • Auto generate SWF in Flex SDK

    - by Nick
    I'm building my first website with AS3, and I'm using Flash Builder 4 to create/edit my AS classes. I have two .fla files (preloader.fla and portfolio.fla) which I both published as .swc and loaded them into my ActionScript project in FB4 (build path). When I hit debug, FB4 automatically generates a .SWF in bin-debug folder called Preloader.swf, but in my Preloader.as I have new URLRequest("Portfolio.swf"); and this Portfolio.swf isn't being generated by itself. Now the real question; how can I tell FB4 to automatically create both .SWF files for me? Or isn't that possible, any workaround then? Thanks.

    Read the article

  • Progress-bar (Video Preloader)

    - by Yan
    I have a spark component VideoDisplay which displays a video. I want to add a ProgressBar to it which will show load progress of the video and when the video is loaded ProgressBar to disappear. How to do that? Thanks,

    Read the article

  • Jquery show preloader for every image?

    - by mathiregister
    Hey guys, I've a website with a lot of images: <img class='thumb' src=thumbs/image1.jpg/> <img class='thumb' src=thumbs/image2.jpg/> <img class='thumb' src=thumbs/image3.jpg/> <img class='thumb' src=thumbs/image4.jpg/> I wonder if I can display a loading-div for every single image and when it's loaded the div hides? I'm using jquery for most of my animations. Can i solve that with jquery. It would be cool if every image shows this loading-div centered in the middle of the image. When the image is loaded the div should hide! Is that possible? Thank you for your help!

    Read the article

  • 1136: Incorrect number of arguments. Expected 0 AS3 Flash CS5.5 [on hold]

    - by Erick
    how do I solve this error? I've been trying to get the answer online but have not been successful. I'm trying to learn As3 for flash so I decided to try making a preloader for a game. Preloader.as package com.game.moran { import flash.display.LoaderInfo; import flash.display.MovieClip; import flash.events.*; public class ThePreloader extends MovieClip { private var fullWidth:Number; public var ldrInfo:LoaderInfo; public function ThePreloader (fullWidth:Number = 0, ldrInfo:LoaderInfo = null) { this.fullWidth = fullWidth; this.ldrInfo = ldrInfo; addEventListener(Event.ENTER_FRAME, checkLoad); } private function checkLoad (e:Event) : void { if (ldrInfo.bytesLoaded == ldrInfo.bytesTotal && ldrInfo.bytesTotal !=0) { dispatchEvent (new Event ("loadComplete")); phaseOut(); } updateLoader (ldfInfo.bytesLoaded / ldrInfo.bytesTotal); } private function updateLoader(num:Number) : void { mcPreloaderBar.Width = num * fullWidth; } private function phaseOut() : void { removeEventListener (Event.ENTER_FRAME, checkLoad); phaseComplete(); } private function phaseComplete() : void { dispatchEvent (new Event ("preloaderFinished")); } } } Engine.as package com.game.moran { import flash.display.MovieClip; import flash.display.Sprite; import flash.events.Event; public class Engine extends MovieClip { private var preloader:ThePreloader; public function Engine() { preloader = new ThePreloader(732, this.loaderInfo); stage.addChild(preloader); preloader.addEventListener("loadComplete", loadAssets); preloader.addEventListener("preloaderFinished", showSponsors); } private function loadAssets (e:Event) : void { this.play(); } private function showSponsors(e:Event) : void { stage.removeChild(preloader); trace("show sponsors") } } } The line being flagged as an error is line 13 in Engine.as.

    Read the article

  • a question about flex preloaders

    - by dubbeat
    Hi, I'm moving to a pure as3 environment into flex and I have a question about preloaders. For one of my apps in particular when the swf loaded I would add a screen with an animated preloader. Then at a particular point in my code when I know all of my xml has been parsed, UI built and all initiliztion done I dispatch a "done" event which removes the preloader. How can I achieve this is flex? I've only ever really seen flex preloaders that are percentage based which I believe represent the actual loading of the swf itself?

    Read the article

  • GetBytes Issue in Loading External Flash

    - by henry
    I'm trying to debug a gallery section within a site of mine. Currently the section display a number of thumbnails which visitor select one to view. Once selected, the main flash loads in an external swf. To make the process smoother, I have a preloader for this process using normal getbytes codes. However for some reasons, the flash works fine in IE but not in Firefox or Chrome. In these browsers, as soon as you click the thumbnail, the preloader animated away to reveal the holder of the external swf. However as it is still loading, the holder is a blank area. Would appreciate if anyone can shed some light on why this is so.

    Read the article

  • Is it possible to show the download progress of a flash file?

    - by Ólafur Waage
    I know how to setup a preloader and I have that working. But when I debug the flash application and simulate a download, it has a blank background until a few seconds have passed. I know it is "downloading" the swf file and I'm wondering if I can show a progress bar for that, or do I need to have the swf file as small as possible and pre load everything needed and have all assets as a separate file I fetch? I found something with ProgressEvent.PROGRESS but this only loads after the flash file is finished downloading.

    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

  • No Silverlight and Preloader Experience(ish) - in 10 seconds...

    here is the basic's...:<body background="Img/ScreenShot.png" ><object id="SilverlightControlObj" name="SilverlightControlObjNm"data="data:application/x-silverlight-2,"type="application/x-silverlight-2" width="100%"height="100%"><param name="source" value="ClientBin/SUGWTK.xap"/><param name="onError" value="onSilverlightError" /><param name="background" value="white" /><param name="minRuntimeVersion" value="3.0.40624.0" /><param name="autoUpgrade" value="true"...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Preload Images with javascript

    - by user271619
    Here is my preload script: <script type="text/javascript"> Image_1 = new Image(1,1); Image_1.src = "images/sprites.png"; </script> And it works fine. I can see in the headers the image loading. Here's my question. Even though I have preloaded sprites.png, I notice that when I go to a page on my site that simply displays that entire image, the headers tell me my browser is requesting the server to send the image again. I'm hoping to not sound too naive. But, why would the browser request the image when I preloaded it earlier? Are there other reasons the browser would need to re-request? Also, I put the dimensions as Image(1,1). Sometimes I don't know the dimensions, as that image gets updated from time to time. Maybe that's a reason?

    Read the article

  • Detect if objects are loaded [Javascript]

    - by Samuel
    I was wondering, is there a way to detect if a certain image / div is loaded? For example when i am loading two heavy images and showing a loading sign at the two places the images will later occupy, is there a way to already display the first image when it's loaded while still loading the second one?

    Read the article

  • Unfailing Javascript Image Preview

    - by Jason
    I have the following code that presents the user with a preview of the image they're trying to upload and works really well in FF: var img = document.createElement('img'); img.src = $('#imageUploader').get(0).files[0].getAsDataURL(); The problem is, getAsDataURL() only works in FF. Is there something similar/a workaround for this kind of functionality in Chrome (specifically)?

    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

  • Why does this attempt at preloading images with jQuery not work?

    - by Eric
    Current I have this code: var imgCount = 36; var container = $('#3D-spin'); var loaded = 0; function onLoad() { alert(loaded); loaded++; if(loaded >= imgCount) { alert('yay'); } } for(var i = imgCount-1; i >= 0; i--) { container.prepend( $('<img>') .one('load', onLoad) .attr('alt', 'View from '+(i*360/imgCount)+'\u00B0') .attr('src', '/images/3d-spin/robot ('+i+').jpg') ); } However, it's behaving VERY strangely. Normally, I get no alert boxes. However, if I open developer tools, and pause script execution, I get a single alert that says 0. There's nothign like a good old heisenbug! A live example can be found here. The script itself is called style.js, and it is clear that images have loaded. Am I doing something stupidly, or is jQuery playing up?

    Read the article

  • sIFR load before rest of page?

    - by hfidgen
    Hiya, Is it possible to have sIFR "preload" or load before the rest of the page content? At present it is the last thing to load (due to the text position) and as it's quite an obvious part of the page I get a huge mash-up of text replacement all in a quick flurry which is not very appealing. It looks like the site is having an epileptic fit. Once loaded, all is fine though :) Any work-arounds to the load-fitting? Cheers Hugh

    Read the article

  • Easyslider content loading sooner than I would like.

    - by Jason
    I am using a jquery easyslider on a page and also pulling some rss feeds using php. Pulling the feeds is taking a long time and as a result delaying the load of the easy slider until after the feeds have been pulled in. This can be seen here: http://perksconsulting.com/dev/ I am looking for a way to display a loader image in the space where the easy slider is so the images do not appear stacked vertically for a few seconds while the php is interpreted by the server, but I have never used a loader image and am not sure how I would do that. I am currently using this script to hide the page contents until everything is loaded, but the one thing it is not hiding is the images from the easy slider: <SCRIPT TYPE="text/javascript" LANGUAGE="javascript"> function waitPreloadPage() { //DOM if (document.getElementById){ document.getElementById('prepage').style.visibility='hidden'; }else{ if (document.layers){ //NS4 document.prepage.visibility = 'hidden'; } else { //IE4 document.all.prepage.style.visibility = 'hidden'; } } } // End --> </SCRIPT> Ideally I would like to be able to display a loading image in place of the slider in the middle of the page until everything loads. Could anyone tell me how to do this? Thank you.

    Read the article

1 2 3  | Next Page >