Load a  external jpg in BitmapData

Hello Everybody,
I search a way to load a external jpg from my server in my
swf to use
it with the BitmapData-Class.
The Method loadBitmap only works with images from my internal
library.
What do you think is the best way to solve this problem.
For me it seems to be a little bit stupid to load the image
in a MovieClip.
Then Scan the Mc to write it in a BitmapData-Object.
To Filter it. And then write it back to an MC.
Do you know a way, where I can load it directly to and
BitmapData-Object
like this:
1) load Image in BitmapData-Object
2) Filter - Image
3) attachBitmap to MovieClip
I am a noob with Flash 8 and my english is very bad.
So sorry and thanks for you help
jm

//import BitmapData
import flash.display.BitmapData;
//stop movie so it doesn't repeat over and over
stop();
//load a pic into an mc on the stage
content_mc.loadMovie("flash.jpg", 1);
//create a function that runs every frame (only for this
example, it keeps running and you won't want that
_root.onEnterFrame = function() {
//this is the interesting bit, basically the next line is
your preloader 100% action, the pic has to actually have been fully
loaded before we can do this
if (_root.content_mc.getBytesLoaded() ==
_root.content_mc.getBytesTotal()) {
//create a variable to hold the bitmapdata info
myBitmapData = new
flash.display.BitmapData(content_mc._width, content_mc._height,
true, 0x00FFFFFF);
//copy the bitmap into the bitmapdata variable we just
created
myBitmapData.draw(_root.content_mc);
//now attach it to a different mc for the sake of example
_root.content_mc2.attachBitmap(myBitmapData, 1, "auto",
true);
//rotate both movieclips so you can see the difference
_root.content_mc._rotation = 30;
_root.content_mc2._rotation = 30;
supplied by myFlash83

Similar Messages

  • [Q] Loading one external JPG file into different MCs & Downloading

    Hi, I was wondering if I set few MCs to load the same
    external JPG file, would users need to download thme few times?
    Or only need to download once?
    I am having trouble loading long 700*8000 jpg files due to
    limited pixel size of 2300(?).
    I was thking of making them into 2000 * 2000 square pictures
    by cutting long picture into short sigments and putting them side
    by side.
    and using AS to make them appear as single long picture by
    using 2 MCs with same image but at different x position of loaded
    square Picture.
    Anyone have better idea?
    I am bit hesitated to make jpg to swf files cuz I have too
    many pictures
    Plz spare some time for me..
    Thank you for your time~!!!!

    thank you, kglad..
    I was thking of making 700 * 8000 image into 2800*2800 image
    this square picture works as four (700*2800) images.
    So that i can use 2 set of same jpg MC with differnt Masking
    to make them
    appears as continuously long images
    eg. 1st Mc will be showing _x: 0-700
    at the bottom of the first MC, 2nd MC will be showing _x:
    700-1400
    and so on so on..
    so..when user is scrolling down..these MCs will makeing
    sqaure image
    as long portrait image..
    I dont beleve myself it is a good solution..
    Probably most suitable way would be what you just suggested
    me..
    Its just that it will be quite a time consuming job to make
    jpgs into swfs...
    Thank you again for your kindness..:)

  • Loading multiple external jpgs...

    I'm trying to go through a for loop, create a movieclip for each database entry, add the image by url stored. The problem is the code I have only does the last image. I know it's because something is not incrementing and they all have the same name. Do I need to increment the name of my loader? Holder or what?
    var resultsLength:Number = result.serverInfo.initialData.length;
    for(var i:uint = 0; i < resultsLength; i++){
      var thisClip:MovieClip = new ProductBox();
      cleanse_mc.addChild(thisClip);
      thisClip.x = currentX;
      thisClip.y = currentY;
      currentX += moveX;
      // populate image
      var thumbLoader:Loader;
      var holder:MovieClip = new MovieClip();
      thumbLoader = new Loader();
      var thisImage:String = String(result.serverInfo.initialData[i][14]);
      var thumbRequest:URLRequest = new URLRequest(thisImage);
      thumbLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, introCompleteHandler);
      thumbLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, introProgressHandler);
      thumbLoader.load(thumbRequest);
      function introCompleteHandler(loadEvent:Event){
       var image:Bitmap = (Bitmap)(loadEvent.target.content);
       thisClip.addChild(holder);
       holder.addChild(image);

    no, something that would preserve all you movieclips/positions while you're waiting for image loading to complete:
    var resultsLength:Number = result.serverInfo.initialData.length;
    var i:unit=0;
    var thisClip:MovieClip();
    loadF();
    function loadF(){
      thisClip = new ProductBox();
      cleanse_mc.addChild(thisClip);
      thisClip.x = currentX;
      thisClip.y = currentY;
      currentX += moveX;
      // populate image
      var thumbLoader:Loader;
      var holder:MovieClip = new MovieClip();
      thumbLoader = new Loader();
      var thisImage:String = String(result.serverInfo.initialData[i][14]);
      var thumbRequest:URLRequest = new URLRequest(thisImage);
      thumbLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, introCompleteHandler);
      thumbLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, introProgressHandler);
      thumbLoader.load(thumbRequest);
      function introCompleteHandler(loadEvent:Event){
       var image:Bitmap = (Bitmap)(loadEvent.target.content);
       thisClip.addChild(holder);
       holder.addChild(image);
    i++;
    if(i<resultsLength ){
    loadF()

  • Creating an Array of external JPGs, please help.

    So what I want to do is load up external JPGs into an Array of MovieClips, and then go to the main onEnterFrame function. My code is below:
    var imageLoader:Loader = new Loader();
    var imageArray:Array = new Array();
    function loadImage():void {
        for (i = 0; i < 9; i++) {
            imageLoader.load(new URLRequest("image" + String(i) + ".jpg"));   
            imageArray[i] = new MovieClip();
            imageArray[i].addChild(imageLoader);
        addEventListener(Event.ENTER_FRAME,onEnterFrame);
    I tried adding an Event.COMPLETE function I found:
    imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
    function imageLoaded(e:Event):void {
         var image:Bitmap = (Bitmap)(e.target.content);
         imageArray[i] = new MovieClip();
         imageArray[i].addChild(image);
    Unfortunately, I usually only ended up with 1 or 0 images, and errors. I can't seem to properly pass the i
    value, so that's a big problem because the order the images go is key to my program.
    Please help me get this working so my image gallery can work, thanks!

    So the problem is that you want them in the array in the same sequence am I right on this?
    See the updated code:
    var imageArray:Array = new Array();
    var imageLoader:Array = new Array();
    function loadImage():void {
        for (i = 0; i < 9; i++) {
            var imageLoader[i] = new Loader();
            imageArray[i] = new MovieClip();
            imageLoader.load(new URLRequest("image" + String(i) + ".jpg"));   
            imageArray[i].addChild(imageLoader[i]);
            //imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
        addEventListener(Event.ENTER_FRAME,onEnterFrame);
    /* function imageLoaded(e:Event):void {
         var image:Bitmap = (Bitmap)(e.target.content);
         imageArray[index].addChild(image);
    In this case you can not track whether an image is loaded or not. It is the most simplest way of doing this. If your images are not coming from dynamic sources and are fixed in number and position you can use this method also.

  • External JPG preloader

    Hey all! I could use any help you can give me pertaining to
    the need for an external JPG preloader.
    Check out my site at www.nathanaaron.com - go to
    menu/portfolio/print (for example.) As you can see as you scroll
    through the images, they take a bit of time to load, making you
    think nothing is happening. I have a preloader in the movie file;
    but it's calling external JPG files, so it is not preloading those.
    I'm a bit of a simpleton when it comes to actionscripting, so any
    help would be GREAT! And yes, I have searched and searched online,
    but just honestly can't understand what I'm trying to do here.
    Thanks!

    The overall preloader I'm using for loading the portfolio swf
    is:
    stop();
    onEnterFrame = function () {
    totalBytes = _parent.getBytesTotal();
    loadedBytes = _parent.getBytesLoaded();
    percent = Math.ceil((loadedBytes/totalBytes)*100);
    gotoAndStop(percent);
    info_txt.text = percent+" %";
    if (percent>=100) {
    _parent.gotoAndPlay("illus");
    But again, this doesn't load the external JPGS. The code I
    have that is loading the JPGS (one at a time) is:
    this.pathToPics = "";
    this.pArray = ["Port_SP_Illustration.jpg",
    "ILL_TPMC_Elf.jpg", "Ill_wine.swf", "Ill_red.jpg",
    "IL_art_cake.jpg", "Ill_satisfaction.swf", "Ill_mrproperty.jpg",
    "Ill_child.swf", "IL_art_asbig_fade.swf", "IL_art_asbig_02.jpg",
    "IL_art_asbig_03.jpg", "IL_art_asbig_04.jpg", "Ill_chorus.jpg",
    "Ill_baby.swf", "Ill_father.swf"];
    this.fadeSpeed = 10;
    this.pIndex = 0;
    loadMovie(this.pathToPics+this.pArray[0], _root.photo);
    MovieClip.prototype.changePhoto = function(d) {
    this.pIndex = (this.pIndex+d)%this.pArray.length;
    if (this.pIndex<0) {
    this.pIndex += this.pArray.length;
    this.onEnterFrame = fadeOut;
    MovieClip.prototype.fadeOut = function() {
    if (this.photo._alpha>this.fadeSpeed) {
    this.photo._alpha -= this.fadeSpeed;
    } else {
    this.loadPhoto();
    MovieClip.prototype.loadPhoto = function() {
    // specify the movieclip to load images into
    var p = _root.photo;
    p._alpha = 0;
    p.loadMovie(this.pathToPics+this.pArray[this.pIndex]);
    this.onEnterFrame = loadMeter;
    MovieClip.prototype.loadMeter = function() {
    var i, l, t;
    l = this.photo.getBytesLoaded();
    t = this.photo.getBytesTotal();
    if (t>0 && t == l) {
    this.onEnterFrame = fadeIn;
    } else {
    trace(l/t);
    MovieClip.prototype.fadeIn = function() {
    if (this.photo._alpha<100-this.fadeSpeed) {
    this.photo._alpha += this.fadeSpeed;
    } else {
    this.photo._alpha = 100;
    this.onEnterFrame = null;
    with the forward button coded as:
    on (release) {
    _root.changePhoto(1);
    (and back as:)
    on (release) {
    _root.changePhoto(-1);
    MY issue is, I know coders hate designers; because I know I
    could use the movie clip loader class; but you know, honestly, I
    start reading about class and listeners and my brain pops! I just
    don't get it. I'm good at tweaking code, but creating it is another
    story all together.

  • Vista problem with loading external JPGs?

    I'm really pulling my hair out on this one. I did a quick
    flash piece for a preschool's web site and have tried several
    different Flash components inside of a larger FLA file that load
    external JPG files in a predefined area. With each component, I
    have received complaints (so far only from Vista users) that the
    user sees nothing in the area where photos are supposed to be
    loading. Instead they just see a white or black box.
    Is there any known issue with this? They can see everything
    else in the SWF file (the swinging girl and the text), but not any
    of the loaded JPG photos. Can anyone else out there with Vista tell
    me that they have the same problem? I'd like to track down what the
    common denominator is.
    I've asked two of the users to completely uninstall the Flash
    player and reinstall it, but to no avail. Deactivating Norton
    Antirvirus also didn't seem to do anything.
    Here is the URL:
    http://www.countryvillageps.com
    -- the flash item is the top banner.

    As Ned said the problem might be with the file structure on the server. Other problems may be with spelling. You computer may not be case sensitive to the names of the .swf files that you are loading, but your server might. So, on your computer when you are testing, second.swf is the same as Second.swf, or even second.SWF. But, on the server each of these variations is seen as a different file. Another problem is that when you are loading files from the same computer in testing, those files are close and so they load very quickly from your computer. When the files have to travel from the server, there will likely be a measurable period of time before the file is ready to be shown. This is particularly problematic with video that is embedded into an .swf. The whole file will need to be downloaded and uncompressed before it is available to play. If you stream the video as an external file, you can shorten the wait considerably.

  • Need to load external jpgs at once

    I am using loadMovie to load all my external jpgs at once. On
    start I have thumbnails which animates, and using loadMovie load
    jpgs into that thumbnails. Offline it works fine, but online it
    only loads few jpgs first with animation and rest loads without
    animation just blink and loads. can you help me out for this.
    this is my sample page link:
    http://suewong.yourdemowebsite.com/editorial.htm

    Look at MovieClipLoader instead - images take time to load.
    You have to wait
    until your files have loaded before trying to use them - MCL
    is best for
    that, with its onLoadInit method.
    Dave -
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • Loading external JPGs

    I'm building a generic slideshow. The slideshow displays NINE
    buttons. Each button, when clicked, will load a corresponding
    external JPG. For example, if I click BUTTON THREE then JPG THREE
    is loaded. BUTTON TWO loads JPG TWO, etc.. I'm looking for a way to
    "recognize" if there are FEWER available JPGs than the NINE BUTTONS
    in my slideshow. For example, if I have just FIVE JPGs available
    and I click on button number SEVEN, I want nothing to happen. At
    the moment I get an error message that JPG SEVEN does not
    exist.

    that error message won't be seen outside the authoring
    environment. once you publish, pressing button 7 will result in
    nothing happening.

  • External jpg not loading when slideshow is live.

    When testing locally the slideshow works fine. When i upload
    the swf the external jpg do not show up. Anything graphic embedded
    in the swf shows up. The external jpg don't :/
    The jpgs are uploaded and all.
    i use different syntax that work ok when testing locally but
    no cigar when uploaded.
    I can send the simple fla and jpg upon request.
    Tks for your help

    are you using preloader code or the onLoadInit() method of
    the moviecliploader class to ensure your images are loaded before
    starting the countdown to the next image load?

  • Preloader whilst loading external .jpg

    This is the script I use to load external .jpgs into a site
    btn1.onRelease = function (){
    loadMovie("Bike.jpg", _root.photo.empty);
    _root.stick.gotoAndStop(80);
    How would I create script so that it creates a sepaprate
    preloader whilst each image is loading.

    for something like this it's best to use the MovieClipLoader
    class, rather than loadMovie() - doing so will allow you to use the
    onLoadPrgress handler to update the preloader while it's being
    loaded. it would go something like this:

  • Load external jpg

    I cannot load external jpg, they're not progresive.... the
    jpg files are inside a folder, and I write the next code:
    this.createEmptyMovieClip("mc", 100);
    mc.loadMovie("flash/photo1.jpg");
    but it doesn't work...
    Thanks

    use trace(mc) to confirm "this" refers to a movieclip, make
    sure there's nothing at a greater depth preventing you from seeing
    your image, double check your spelling of flash/photo1.jpg (and
    case counts) and make sure your html file is in a super folder of
    the flash folder, if you're testing in a browser.

  • Can you load external jpg files

    Is there a way to load external .jpg files on the fly or do
    they have to reside in the swf file?

    Hi Persons,
    macrofireball is correct as always, but I'll just add a
    thought to this thread because I suspect "rfull" isn't actually
    asking what he/she
    appears to be asking.
    No photo can ever be displayed "by itself". That is, image
    files are always "opened" in some sort of vehicle. It might be an
    image editor, or it might be a document like a *.DOC or a *.HTM ...
    but
    something must "contain" the image.
    So you can access a photo at any time you wish by putting it
    on a web page, then linking to the web page (for instance). Is
    something like that what you really had in mind?
    Have a good 'un folks!
    .

  • What is or isn't possible on iOS?  (Not having Loader, loadBytes(), external swfs, etc)

    My basic question is:  "What are the classes which we should not use for iOS using the packager."
    I have been trying for a few days trying to get a simple Flash app to run on the iPad.  A very simple app (with sound!) with just 2 classes works fine (Performance is a whole other issue.  We will get to that).  But if I try anything else, all I get is a white/black screen on the iPad.  So it would be really nice to know what classes, functions, etc we CANNOT use for the Packager.
    I have fairly simple app (not as simple as 2 classes) which loads some art assets via URLRequest/Loader, puts them on the stage.  Fairly common standard practice in AS3.
    I've read about not able to load an external file using the Packager.  So to fix the situation of loading assets, I have looked into the [embed] tag, which seems to work.  I hope the blogger doesn't mind, but this page is an excellent source on what works and doesn't work with the [embed] tag in it's various flavors:  http://www.richardleggett.co.uk/blog/index.php/2010/03/08/flash_builder_and_flash_pro_asse t_workflows.  For example, AS3 in a swf is stripped out from an external swf using [embed].
    The best way to load an external swf file for iOS seems to be using [embed] with "application/octet-stream" and load the swf through ByteArray (Option #4 in the link above).  This works great on the PC.  HOWEVER, on iPad, it fails.  The [embed] tag works on the iPad with the other ways, so my guess is that loadBytes() does not work.  Is this true Adobe/Flash guys?  Can you confirm this?
    My initial question is "why is this not allowed on iOS?".  If it is because of the fact that it uses a Loader, can it be changed so it's not using a Loader to construct a MovieClip?  I have a ByteArray with the raw swf/MovieClip data.  Why can't I construct a MovieClip from it without going through Loader?
    This loadBytes() failure seems to be the only thing preventing me from using the normal pipeline of Flash development in loading external assets.  If there are other ways people have found, please share!
    Now on to performance.  Adobe, can you post some examples/samples of code which runs at decent performance?  Like a "tech demo" of what is possible using the Packager running on iPad/iPhone.  That would be extremely helpful for everyone.  I have done a lot of the optimizing suggestions on various sites and pages ( and by Adobe http://www.adobe.com/devnet/flash/articles/optimize_content_ios.html), but I am not seeing the 30 fps performance that is MORE than possible on iPhone/iPad.  Displaying and moving around Bitmaps (I don't use any vector graphics) should be blazing fast.  Quake runs on iPad without any problems and that code is 10 years old.  Moore's law dictates that drawing Bitmaps using CPU should be faster than a 3D engine written 10 years ago...  I am trying out the new iOS 4.2 which is supposed to be "significantly" better, but I am still stuck on loadBytes().
    So at this point, I am blocked on loadBytes() and my performance for a simple app which draws a few Bitmaps and MovieClips is terrible.  I am hopeful some people out there have figured out some solution (there are lots of clever people out there) and I will stumble on to something.  But being forced to go native Objective-C seems to be my only option at this point.
    In summary, here are the questions I would like to ask the Adobe/Flash group for some more help/information/advise:
    - Why is Loader not allowed on iOS?  Is it a technical limitation of the hardware/os/Flash?  Will it never be supported?  What is the future of this class on iOS?
    - Why is loadBytes() not allowed on iOS?  I have the raw embedded data in memory.  I don't need to make a remote call so security should not be an issue.  Can I create a MovieClip without using Loader?
    - Why is AS3 stripped from the timeline when a Symbol is retrieved using [embed]?  Maybe this is the same reason loadBytes() fails, but if I could use [embed] and get a copy of the Symbol, that is what I need.  (There are issues with the mx.core.MovieClipLoaderAsset/Asset, but it is better than being blocked by loadBytes())
    - What are some apps you guys have written that we can use to compare PC vs iOS?  Again, a "tech demo" or sample code of what you as experts in Packager for iOS have done which runs at decent framerate (30+fps) would be of tremendous help.  If the Adobe/Flash group hasn't gotten the current Packager for iOS to handle more than 50+ 2D Bitmaps on screen running at 30+fps, that would be good to know.  Please let us know what the experts and owners of your software are capable of getting the most throughput using the Packager.  I'd hate to sound a bit fed up/angry, but I think you are wasting a lot of people's time and energy with a piece of software that, to me, seems like it was a bit early to release.  Flash can do some great things.  If it can do it on iOS, even better.  But PROVE it to us that it's possible, before having your customers run into barriers imposed on us by trial and error.
    Thanks.

    I have hardly ever seen a post here from someone at Adobe, so you may need to be patient.
    Read this article, and get its associated demo files, to see some good performing tech demos:
    http://www.adobe.com/devnet/flash/articles/optimize_content_ios.html
    Back to your main point, loaders are working, what isn't working for you is accessing of things in the library of a successfully loaded swf, that have been set to Export for ActionScript. That means that the swf you have loaded has an ActionScript Class, to represent the library symbol. iOS Flash apps are native ARM code, and don't include the virtual machines that a browser plugin has, and so it's not able to interpret ActionScript. That may be why it would fail.
    Now, I can think of at least a couple of reasons why you might want to have external swfs with elements that you want to reuse in the main swf. One would be if you're intending to make a lot of them, like say if you wanted to have an Asteroids game and the ability to use artwork from a set of different swfs. Another reason might be if you want to skin your interface, by taking specific elements from the loaded swf and using them in the main swf. That way you could have artists preparing those swfs for you, and you just include them in your package, and load the one you want.
    There is a way to do either of those things. The second one can be done by having the item as a named symbol on the stage of the loaded swf. With a to-be-loaded swf named "inner.swf", that has a movieclip on its stage named "mc1", this script in the main swf would load that external swf and use its symbol on the main swf's stage, without having to make the inner swf's symbol use ActionScript:
    var req:URLRequest = new URLRequest("inner.swf");
    var ldr:Loader = new Loader();
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,loaded);
    ldr.load(req);
    function loaded(e:Event) {
    var mc:MovieClip = e.target.content as MovieClip;
    var innermc:* = mc.mc1;
    innermc.x = 50;
    innermc.y = 50;
    addChild(innermc);
    For the other case, you can take the item off the stage of the loaded swf and draw it into a bitmapdata, and then make as many bitmaps from that as you like. Here's the above example, only it adds the original movieclip to the main swf stage, and also creates a bitmap that looks the same:
    var req:URLRequest = new URLRequest("inner.swf");
    var ldr:Loader = new Loader();
    ldr.contentLoaderInfo.addEventListener(Event.COMPLETE,loaded);
    ldr.load(req);
    function loaded(e:Event) {
    var mc:MovieClip = e.target.content as MovieClip;
    var innermc:* = mc.mc1;
    innermc.x = 50;
    innermc.y = 50;
    addChild(innermc);
    var bmd:BitmapData = new BitmapData(innermc.width,innermc.height);
    bmd.draw(innermc);
    var bm:Bitmap = new Bitmap(bmd);
    bm.x = 150;
    bm.y = 150;
    addChild(bm);
    So, the thing to learn is that a native ARM code application does not have an ActionScript interpreter in it, and if you need to do something that normally requires interpreting ActionScript, find another way to do it.

  • Flash MX Preloader for external JPGs

    Hey all! Any help would be greatly appreciated. In all
    honesty, I have searched and studied and worked to get this myself,
    which I do alot with code, etc. BUT I am going to admit I'm a "make
    it pretty on the outside" kind of guy, and coding makes my eyeballs
    fall out and well, honestly, I just don't get it. My brain can not
    wrap itself around this. Sigh! So I could use your help a little.
    This is what I'm wanting to do. I have a website,
    www.luxeillustrato.com, and if you go to the portfolio area, and
    click on any of the sections (take fine art for example); it will
    showcase my works by loading external jpg files each time you click
    the forward arrow button.
    You can see I have preloaders on the site, that work fine. My
    main page has a movie target with the instance name of photoM. You
    click "artist", and it loads a new swf file into the photoM target.
    IF you click on "portfolio", "fine art", it loads the fine art swf
    file into photoM, using a preloader. THEN, if you click on the
    forward arrow button, a new jpg image of my work is loaded into the
    fine art movie target with the instance name of just
    photo. As you can see, you have to wait until the jpg image
    loads (and you start to wonder if it's doing anything.)
    The problem is, it is not preloading the external jpgs, it's
    just preloading the fine art swf. My preload code is currently:
    stop();
    onEnterFrame = function () {
    totalBytes = _parent.getBytesTotal();
    loadedBytes = _parent.getBytesLoaded();
    percent = Math.ceil((loadedBytes/totalBytes)*100);
    gotoAndStop(percent);
    info_txt.text = percent+" %";
    if (percent>=100) {
    _parent.gotoAndPlay("inter");
    I already have the preload animation bar created (as you can
    see on the site.) What do I need to do to alter the code above (or
    replace it) in order to have the external jpgs be preloaded as
    well? For example's sake, let's just say I have four jpgs, titled
    "door.jpg", "orange.jpg", "boyfriend.jpg", and "untitled.jpg" (in
    case these are needed for the code. They may not be.)
    I hope this is easy to understand. If NOT, just tell me. I'll
    simplify. And seriously, thanks!

    put a stop() on the first frame of your external swf in an otherwise empty first frame.  when preloading is complete apply a play() to your loader's content cast as a movieclip:
    function contentLoaded(evt:Event):void {
        //Optionally change to a clip holder and set progressbar visibility.
        addChild(contentLoader);
    MovieClip(contentLoader.content).play();

  • Preload External Jpgs

    What is the easiest way to preload external jpgs? The client
    wants to update these frequently so they should be external, but I
    want them to show up instantly like the rest of the site once the
    preloading is done.
    Any advice? I had thought about loading them into the
    preloader (at 0% alpha), so that they'd be loaded into the cache
    during preload, so that when the home page comes up, they'd be all
    ready to go? But if it's a different instance of the movieclip,
    will it reload the jpg? Or any time i use that external jpg in the
    flash file will it already be in the cache?
    Thanks. I've heard a few different things and would love your
    advice.
    Jeremy

    There are two different things here. pre-caching (I don't
    know what else to call it) and pre-loading.
    It is possible to pre-cache files off the same server. If you
    load into different instances then it should get it from the cache,
    so yes that would speed things up. But... results are dependent on
    an unknown factor: the user's cache settings. If its set to never
    cache you could end up downloading 'to the cache' and just wasting
    bandwidth.
    You can read about that approach here.
    http://www.actionscript.com/Article/tabid/54/ArticleID/Preloading-Files-into-the-Browser-s -Cache/Default.aspx
    Then there's the regular preload approach where you preload
    into movieclips (perhaps with ._visible=false or 0% ._alpha etc).
    You can find a lot of info relevant to that here:
    http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part1
    http://www.quip.net/blog/2007/flash/actionscript-20/tracking-multiple-files-part2

Maybe you are looking for

  • Hdmi adapter

    I have and older tv without Hdmi. I have an Hdmi to component adapter but cannot get a picture.  Has anyone resolved this problem?

  • SPI (Creative X-Fi Module) has encountered a problem

    Why do I keep getting this message at startup? "SPI (Creative X-Fi Module) has encountered a problem and needs to close." When I try to open surround mixer as well as the?other software, it says "The audio device supported by this application is not

  • Msi gs70 touchpad problems

    The multitouch doesn't work! I can't scroll, zoom, etc. The 3-finger gestures also don't work. I've already tried upgrading the driver from the MSI site. Any help??

  • Adobe Config Error?

    Hi All, I have freshly installed CE EHP1 and when I am deploying my Adobe Application I am getting the following errr: com.sap.engine.services.webservices.espbase.discovery.TargetNotMappedException: Logical Target destination with name : ConfigPort_D

  • Z10 to Bold messages are empty !

    Hi Z10 lovers, I've received my Z10, everything works fine, except one mail issue. I send out a mail via BES10 (and Domino Traveler) to the outside world : OK I send out a mail via BES10 (and Domino Traveler) to lotus Notes user: OK I send out a mail