Preload image alternative
I used to use DW preload images behavior (rarely):
<body onLoad="MM_preloadImages('images/progress.gif')">
but I just realized that the following technique is much
better (and does not require js):
<body>
<img src="images/progress.gif" style="display:none;">
Am I right? Or am I missing something...
seb (@webtrans1.com)
high-end web design:
http://webtrans1.com
music:
http://myspace.com/popmodelberlin
The load time for either option would be the same.
> Using style based layout in my opinion is my first
choice as it is less
> buggy
> than js as js can conflict with other parts of a
website.
This is complete misinformation, really.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"gwmbox.2008" <[email protected]> wrote in
message
news:g1as3c$e0o$[email protected]..
>I guess it comes down to why you need to preload images
for in the first
>place.
> The first option as you have pointed out will use js, it
will assume the
> user
> has not disabled any scripting at all and the second
will force the image
> to
> load and thus will probably slow things down depending
on where you place
> the
> null image - i.e. if you place them at the top of your
page you will get a
> series of images that need to load first before your
page content does.
>
> How many images are we talking about? Is it for menu? or
gallery? or
> something else?
>
> Using style based layout in my opinion is my first
choice as it is less
> buggy
> than js as js can conflict with other parts of a
website. I guess if it
> suits
> your needs then use it the way that works well for you -
just test in
> multiple
> browser
>
Similar Messages
-
Windows 8.1 and Lenovo preloaded image - update to be available?
Hi,
I work for an organisation that buys a fair few Lenovo machines. We get them with whatever OS they are bundled with at the time and then install our own image. However, recent Lenovo machines seem to have had significant optimisations which can't be reinstated if you do a clean install, so we have been using the preloaded OS image as a base an deploying our applications on top.
Windows 8.1 looks like it may become suitable for wider use here, so I am wondering if an optimized Windows 8.1 preload will start to ship with Lenovo machines soon? And if the preload image might be available for customers who have a Windows 8 machine, to allow for a clean install without losing all the optimisations, so that we don't have to wait for the first Win8.1 machine to be delivered.
Thanks,
RichardI think it's safe to say you'll start seeing Windows 8.1 preloaded system from Lenovo as soon as Windows 8.1 becomes generally available. And I think Microsoft has said this will happen sometime in October.
However Lenovo will not provide Windows 8.1 preloads for existing systems such as T430, W530, X230, etc. These systems will soon go end-of-life with the coming Haswell refresh. The Haswell systems will get Windows 8.1 preloads, but existing Ivy Bridge systems will not.
Having said that, I really don't understand what you mean about "significant optimisations which can't be reinstated if you do a clean install". Off the top of my head I can't think of anything that is preloaded that isn't available for download on our support website, except for some 3rd-party trial software like Norton, MS Office, and Absolute. Is there anything specific that you need help with recreating/reinstalling in your own image? -
Hi,
I am trying to pre-load a few images on a page to save the loading time but seems to be not working in IE7. Here is my code:
<SCRIPT LANGUAGE="JavaScript">
top1 = new Image();
top1.src = "./1.jpg";
top1 = new Image();
top1.src = "./2.jpg";
</script>
This is declared in the HEAD section. But onmouseover still takes a second or two, but once loaded, mouseover is instant. I have an image name called top1, is it because i am loading the same object with 2 different images so will the first image not finish loading?
Also, if I was to include filenames which are dynamic, is there anything stopping me from using PHP code in the HEAD section? or is there a better way to do this?
Thanks in advance.What you are trying to do has very little to do with PHP, except the generation of the image names in the JavaScript. Once the web page is sent from the server, everything relies on JavaScript. I have created a simple demo on my website at http://foundationphp.com/test/preload.html.
The following script in the head of the page preloads the image:
<script type="text/javascript">
(new Image()).src = "/images/9781430210115.jpg";
</script>
In the body of the page, the rollover is created like this:
<p><img src="/images/9781430216100.jpg" width="130" height="160" alt="Book cover"
onmouseover="this.src='/images/9781430210115.jpg'"
onmouseout="this.src='/images/9781430216100.jpg'" /></p>
Note that the <img> tag has the original image assigned to its src attribute, and the replacement images are specified in the onmouseover and onmouseout event handlers. You cannot do it simply by assigning the preload image to a variable in the head and then assigning that variable name to the image, because the image tag has not been created at the time the script runs.
It sounds to me as though you want to rotate the images. If so, Google "JavaScript image rotator". You should find plenty of solutions. -
Preloading images to browser's cache
Hi,
I'm working on a flash gallery project where images are
loaded through xml file.I have some buttons in the gallery for
different categories of images to be shown. Is there a way to
preload images to browser's cache prior to them being called.?,I'm
using AS2.
Thanks in advance...You can simply load images into an empty movieClip, off
stage.
Dave -
www.offroadfire.com
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/ -
Preloader Image Script and Pop-Up Window Behavior
Hello --
My client's referring site --
www.moscaritolo.com/originals.htm. Please note: I am not a
programmer, but more of a designer and don't possess the skills of
writing code so in the development of this site for my client, I
decided to use this preloadslider -
http://www.dynamicdrive.com/dynamicindex14/preloadslide.htm
- by Jason Moon to display the images. So far, I really like it and
so does my client.
However, I now have a problem with the pop-up window behavior
for the triptych image on the originals.htm page. When you hit the
triptych pop-up behavior, the preloader stops working on the main
page and (#) stays in the address bar even when you've closed the
pop-up window for the triptypch image. Next, I tried just making
the word triptych a standard link to a new htm page and using the
back button on the browser and STILL, the preloader will not work
properly..? Any ideas..?
Textplease code sample ? demo code is enough to try
with.This has nothing to do with samples. You should know
which encodings you use. You decalre it in the HTML
i have not mentioned encoding in the HTML.
by html encoding , i think you mean this (bold letter)
// created by dreamweaver 2004
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
</body>
</html>if you mean that...NO, I DID NOT USE that thing in my JSP. i deleted that.
and XML headers. XML encoding, i have this at the start of XML....
<?xml version="1.0" encoding="ISO-8859-1" ?>
// XML data
Java, if nothing else is said, uses
UTF16.
in my form i have method="post".And what do you receive? What does "corrupted" mean?
Not well-formed? Garbage characters? Truncated?error message: [STDOUT] xmlStringelectric.xml.ParseException: java.io.IOException: could not find 59 line 1, char 46682:
NO, i dont blame my parser. if i provide the XML seperately, then my parser works fine.
but when i send the XML via JSP to the parser it does not work.
that means sending of XML is making some trouble. -
Need to preload image directory
I want to be able to have the preloader check the folder
contents before loading, not just image by image. I was hoping that
someone could help by editing my source file :)
Source files
download ZIPNative Flash cannot see the local or remote drive folder
contents.
You can on a remote server have a server script do that and
pass the information to Flash to process.
You can do that on a local set-up with a third party or
custom coded wrapper around the Flash player.
For others who are willing to look through the many objects
to locate the "source code" look in the library and the Quick
Galllery MovieClip frame 1. -
I want to know some sort of scripting code for me to add to a
frame or something so that during the preloading phrase of the
document on the internet, There is a image there. I'm not sure how
this is done. I just want to have an image instead of regular
white. After loading is done I want the flash movie start. How can
I do this. Can I have a code script?It is still not working. On the internet website I have the
file hosted on, when I view it, it is just white. Also I just
wanted there to show an image as loading screen, I don't want to
show loading bar or KB% or anything. I will show some of the things
in my project that might be causing the problem.
I have 1 layer and it's name is Layer 1. In the first frame I
have actions:
//Play Internal Sound Behavior
if(_global.Behaviors == null)_global.Behaviors = {};
if(_global.Behaviors.Sound == null)_global.Behaviors.Sound =
if(typeof this.createEmptyMovieClip == 'undefined'){
this._parent.createEmptyMovieClip('BS_dp1',new
Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000)
_global.Behaviors.Sound.dp1 = new
Sound(this._parent.BS_dp1);
} else {
this.createEmptyMovieClip('_dp1_',new
Date().getTime()-(Math.floor((new Date().getTime()) /10000)*10000)
_global.Behaviors.Sound.dp1 = new Sound(this.BS_dp1);
_global.Behaviors.Sound.dp1.attachSound("dp1");
if (false) {
_global.Behaviors.Sound.dp1.start(0,1);
}stop();
this.onEnterFrame = function () {
bl = this.getBytesLoaded();
bt = this.getBytesTotal();
if (bt <= 0) {bt = 99;}
offPreloader.gotoAndStop(Math.floor((bl / bt) * 100));
preload_txt.text = Math.round((bl / bt) * 100) + " %";
if ((bl == bt) && (bt > 0)) {
delete this.onEnterFrame;
gotoAndPlay (2);
//End Behavior
In Frame 2 I have the image I want in it the same as frame ,
but there are no actions. Then in Frame 3 is the movie type part
with an animated image on there, and starts the sound "dp1" and
there are actions in this Frame also:
stop()
// Play Sound Behavior
_global.Behaviors.Sound.dp1.start(0,1);
// End Play Sound Behavior
Can someone help me get a loading screen that only shows an
image and nothing else? By the way the Image's name is
"fred_fredburger." -
JavaFX aplication : create a preloading image interface
Could anyone tell me ihow create a preloading bar view with a background image while waiting the appearance of the main program interface created by JavaFX application ?
Or give me a link to a related instance...Hi. You can customize your preloader using CSS:
.default-preloader {
-fx-background-color: yellow;
-fx-text-fill: red;
-fx-preloader-graphic: url("http://host.domain/duke.gif");
-fx-preloader-text: "Loading, loading, LOADING!";
} -fx-preloader-graphic is the image to be used by the preloader.
For more info take a look:
http://docs.oracle.com/javafx/2/deployment/deploy_user_experience.htm -
Export to HTML: Preloading images?
Is there any code I can add to the html page Keynote generates to preload the images? Clicking the Next button on the web page and having to wait 2 seconds for the next slide to load is pretty unacceptable when presenting it to a customer.
I can't believe Apple didn't think of this.you could use something like Dreamweaver to do it I think...but for stuff like that I usually do a google search. Try javascript image preload and see if that works.
ah, here we go:
http://www.pageresource.com/jscript/jpreload.htm -
Hi there,
How can we call a background image to a TD in a table. I have imported the images to HTMLDB instance and reffered to my class as follows:
.toptab {background: url("#WORKSPACE_IMAGES#toptabl.gif") top left no-repeat;
But it doesn't display the image, is it bcoz CSS doesn't compile this URL: <b>#WORKSPACE_IMAGES#toptabl.gif" </b>
Can any tel me the workaround for this..?
thx,
r@vi.See Use uploaded images in uploaded CSS and Re: 2.2 uploaded css files, images and substitution strings
-
When i refresh my page it sticks on the preloader image, and have to play the movie
stop();
//for the rest of the script see "HOME-actions label,PORTFOLIO,CONTACT" embedded movie clips!
//preloader!
loaderInfo.addEventListener(ProgressEvent.PROGRESS, updatePreloader);
function updatePreloader(evtObj:ProgressEvent):void
var percent:Number = Math.floor((evtObj.bytesLoaded*100)/evtObj.bytesTotal);
preloader_txt.text = percent+"%";
if (percent==100) {
play();
is this due to my script?captaincainer wrote:
stop();
//for the rest of the script see "HOME-actions label,PORTFOLIO,CONTACT" embedded movie clips!
//preloader!
loaderInfo.addEventListener(ProgressEvent.PROGRESS, updatePreloader);
function updatePreloader(evtObj:ProgressEvent):void
var percent:Number = Math.floor((evtObj.bytesLoaded*100)/evtObj.bytesTotal);
preloader_txt.text = percent+"%";
if (percent==100) {
play();
is this due to my script?
change last bit to:
if (percent>=100) {
play();
when refreshing, typically more than 100% is loaded. Sounds silly, but true. In which case, play doesn't happen because percent>100...
That should fix it,
-Ted -
I have a swf loading pictures from an XML into a movieclip on
stage, but the onEnterFrame fucntion doesn't seem to shoot, this
should be simple. Help anyone?you lose your onEnterFrame method because it's applied to a
loadMovie() target. to remedy, either wait until loading is
complete before assigning methods to the load target or load into a
child movieclip and assign methods to the parent. -
When I loaded the program, I also loaded Dreamweaver, Bridge and Photoshop all CS6. They are not locating the Bridge Data files. How do I do this?
Now that I read that again, did I misinterpret your request? Did you mean how do you run the bridge program? For that information we would need to know what operating system you are using since windows and macs differ on how programs run.
-
JavaFX - Image preloading problem
Hi,
I try to use ImageView and face some problems with image preloading.
Here is the code related to the component that has problems. The component extends CustomNode.
in class attributes declaration:
var imgNodes: ImageView[];
// list of url of images to display
public-init var imgs: String[];
in create function:
for(indice in [0..batch]){
var view= ImageView{
fitWidth:100
fitHeight:100
translateX: (110 * indice)
preserveRatio: true
cursor: Cursor.HAND
insert view into imgNodes;
on an image loading function:
for(indice in [0..batch]){
imgNodes[indice].image = Image{
width: 100
height: 100
url: imgs[firstItem+indice]
preserveRatio: true
backgroundLoading: true
with backgroundLoading set to true, the images are not displayed. When setting it to false, the images appear. So the urls passed to Image are ok.
If I display the fields error and progress of the Image components, both have the value 0.
I have other components that use preloading and they are working great before showing the problematic component. After, preloading does not work anymore.
It looks like as if the thread used to preload images is blocked.
Can anyone help me with it?
Thanks in advance for your help
ThomasI'm not shure but i think the only group component wich is updated after insert or delete is a Group, so there is the same problem with V/HBox.
Then this code work for me
package forumsamples;
import javafx.ext.swing.SwingButton;
import javafx.lang.FX;
import javafx.scene.Cursor;
import javafx.scene.Group;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.VBox;
import javafx.scene.Scene;
import javafx.stage.Stage;
* @author Alex
var imgNodes: Group;
// list of url of images to display
var imgs: String[] =
for (n in [1..3]) "file:///E:/dev/images/FA/OUI/{n}.bmp";
//in create function:
//on an image loading function:
function load() {
for(indice in [0..3]){
insert ImageView {
fitWidth:100
fitHeight:100
translateX: (110 * indice)
preserveRatio: true
cursor: Cursor.HAND
image: Image{
width: 100
height: 100
url: imgs[indice]
preserveRatio: true
backgroundLoading: true
} into imgNodes.content;
Stage {
title : ""
scene: Scene {
width: 200
height: 200
content: [
VBox {
content: [
SwingButton {
text: "Button"
action: function() {
load();
imgNodes = Group { }
} -
Having Trouble With Image Preloads
Can somebody please tell me what I'm doing wrong?
Check out my homepage -
http://www.huppbrian.us
The links on there are all supposed to rollover, and they
do... kinda.
Hold your mouse over one of them, and you'll see the
appropriate rollover behavior... eventually.
Yes, I did check the "preload images" box for them all (only
the buttons and scroll jpg).
Funny thing is that if you click on one of the links, and
then click the back button, the rollovers on the home page then
work fine.
Any ideas???I haven't renamed anything as far as I know. I made a new folder when I hit Folder option and it's highlighted as well as the path shows up in the processor box. Just when I choose run it tells me to specify a folder. The only thing I can think of is that maybe something messed up b/c I'm copied the files and folders over from my PC but it let me save as on the mac. Also the folder I'm choosing to put them in is on the Mac harddrive. IDK...
Maybe you are looking for
-
Can Oracle materialized view be used as crystal report datasource
Hi, Can we use materialized view created in Orace 10g database as the data source of crystal reports. I'm using Crystal reports Server 2008 V1 version. I'm unable to find the materialized view under my data connection. I can see only tables, static v
-
Hi all For a movement type in T156 , we can get the debit / credit indicator. like wise for a Transaction in Invoice verification where can we get the debit / credit indicator. thnks
-
URGENT: IMAP Portlet - customize link problem
Hi all, I got the IMAP Portlet up and running. But, when I click on the customize link I get an empty page back. Any idea is very welcome. Thanks Ingo
-
PO Create - Workflow - Mail Problem
Hi experts, I have an workflow that trigers after PO creation.(BUS2012). Then it sends a mail. But, mail does not work correctly. In SBWP , if i run the workflow, mail comes to inbox. I want it works directly. Waiting for helps. Regards, Orhan
-
Smart Install - vstack vlan other then vlan 1
Hello people Has anybody managed to get smart install working on a vlan other then vlan 1? Our setup would be: DHCP - Local director TFTP - ekstern server Management vlan 209 My issue is that when I connect the client switch to a normal trunk "sw m