Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3605326
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:06:33+00:00 2026-05-18T21:06:33+00:00

I use the images in the tooltips. Images are on the server. I’m using

  • 0

I use the images in the tooltips. Images are on the server. I’m using the code:

    var tip1:String;
    tip1 = "<img src='assets/images/yes.jpg' align='center' width='150' height='150' hspace='3' vspace='3'/>";
tip1 +=  'some text';        
yes.toolTip = tip1;

But many of images are more than 100 kb, then the image in the tooltip appear with some delay. Is it possible to embed all the pictures during loading swf, to appear at once with the text when the mouse over?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T21:06:34+00:00Added an answer on May 18, 2026 at 9:06 pm

    It certainly is. Add the images you want to include in your Flex app, then embed them in your code like this:

    <fx:Script>
      <![CDATA[
    
        [Embed(source="assets/images/yes.jpg")]
        [Bindable]
        public var YesIcon:Class;
    
    ]]>
        </fx:Script>
    
    <mx:Image source="{YesIcon}" />
    

    If you really want to use this in a toolTip, here’s a good article on how to do that: http://blog.flexmp.com/2008/09/10/flex-custom-tooltip-speech-bubble/

    EDIT:
    Here’s a quick and dirty example of how to preload your images into an ArrayCollection when your application starts. You’ll want to add some code to make sure all of your images are loaded before enabling the application or performing some other action, but again this should get you started.

    <?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" 
             xmlns:s="library://ns.adobe.com/flex/spark" 
             xmlns:mx="library://ns.adobe.com/flex/mx"
             creationComplete="creationCompleteHandler(event)">
        <fx:Script>
            <![CDATA[
                import mx.collections.ArrayCollection;
                import mx.events.FlexEvent;
    
                private var imageArray:ArrayCollection = new ArrayCollection();
                private var imageArrayIndex:int = 0;
                private var imagesToLoad:ArrayCollection = new ArrayCollection();
    
                protected function creationCompleteHandler(event:FlexEvent):void
                {
                    // Load your XML into the "imagesToLoad" ArrayCollection. 
                    // This should contain your list of images we need to load.
    
                    PreloadImages();
                }
    
                protected function PreloadImages():void
                {
                    var request:URLRequest = new URLRequest(imageArray[imageArrayIndex]);
                    var imageLoader:Loader = new Loader();
                    var loaderContext:LoaderContext = new LoaderContext();
    
                    loaderContext.checkPolicyFile = true;
                    imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, PreloadImage_CompleteHandler);
                    imageLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, PreloadImage_ErrorHandler);
                    imageLoader.load(request,loaderContext);
                }
    
                // Called when the Loader we declared in PreloadImages() is done loading the image.
                protected function PreloadImage_CompleteHandler(event:Event):void
                {
                    imageArray[imageArrayIndex] = new Bitmap(Bitmap(event.currentTarget.content).bitmapData);
    
                    // Check to see if there's still images that need to be loaded.
                    if (imageArrayIndex < imagesToLoad.length - 1)
                    {
                        imageArrayIndex = imageArrayIndex + 1;
                        PreloadImages();
                    }
                }
    
                // Called when the Loader we declared in PreloadImages() encountered an error trying to load the image.
                protected function PreloadImage_ErrorHandler(event:Event):void
                {
    
                    Alert.show(imageArray[imageArrayIndex].toString() + " could not be loaded.\n\nPlease make sure the file exists.");
    
                    // Check to see if there's still images that need to be loaded.
                    if (imageArrayIndex < imageArray.length - 1)
                    {
                        imageArrayIndex = imageArrayIndex + 1;
                        PreloadImages();
                    }
                }
    
            ]]>
        </fx:Script>
    </s:Group>
    

    Another good component you may want to check out is the Flex BulkLoader created by Arthur Debert. It may also work well for your needs.

    https://github.com/arthur-debert/BulkLoader

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I ask myself how use multiple images in one. For example youtube -> http://s.ytimg.com/yt/img/master-vfl102488.png
I am using jquery tools tooltips on an image. It's a basic use of
Say i have 10 small images that i want to use as tooltips. Im
Is there a jquery tooltips plugin that does not use images, is free and
Here I use two images. when i click once on the Sort_down.png image then
It's recommended to use vector images in WPF application because of its scalability. Where
I'm looking for a small tutorial that can help me use svg images in
I'm trying to use Google's Images API to search an image and put it
How can I use semi-transparent png images in IE6?
I use the line below to get thumbnail: bitmap = MediaStore.Images.Thumbnails.getThumbnail(act.getApplicationContext().getContentResolver(), fid, MediaStore.Images.Thumbnails.MICRO_KIND, null);

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.