Please, How Can I show an image on my site before my flash loads?
I use Macromedia Flash 8. Any one?

Dani AI

Generated

Good question, . If the goal is to see an image while later frames of your SWF load, do that inside Flash: put your background bitmap on frame 1 along with a tiny preloader, and start the rest of the movie on frame 2+. Note that locking a layer only affects editing; it does not change how the exported SWF renders. Also watch the common gotcha where symbols/components with linkage set to "Export in first frame" block your frame-1 preloader. Move those assets to frame 2+ and uncheck "Export in first frame" in the Library Linkage settings so frame 1 appears immediately.

A minimal AS2 preloader that keeps your background visible on frame 1:

// Frame 1 (AS2)
stop();
this.onEnterFrame = function() {
  var total = _root.getBytesTotal();
  var loaded = _root.getBytesLoaded();
  if (total > 0 && loaded >= total) {
    delete this.onEnterFrame;
    gotoAndPlay(2); // start your main timeline on frame 2
  }
};

If you instead mean "show an image on the web page before the SWF even starts downloading," do it in HTML: place a placeholder image as fallback content or in a wrapper, then swap in the SWF when ready (e.g., with SWFObject or a simple onload script). See fallback patterns in the <object> docs on MDN and the SWFObject project for progressive enhancement examples: MDN: object element, SWFObject on GitHub. Since Flash is end-of-life, keeping a solid HTML fallback is essential for anyone maintaining legacy content ().

Recommended Answers

All 2 Replies

what actually you want a "preloader for flash" ?

No. I wanted my backgound image on my movie to show while the entire movie is loading instead of the background colour. But I've solved this. I needed to lock the layer containing the image which I didn't do. Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.