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 8139473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:50:04+00:00 2026-06-06T11:50:04+00:00

I want to have a image in my Flash file which can be changed

  • 0

I want to have a image in my Flash file which can be changed from another program.

In ActionScript 2 I used a Loader, set the contentPath and made a Motiontween in the Timeline this worked very well.

But now in Actionscript 3 I do the same, I use the UILoader, I set the source and create a Motiontween but now the image disappears for a short time, everytime the Tween starts over again.

Is there a way to do this properly?

My code right now:

var myXML:XML;
var myLoader:URLLoader = new URLLoader();

var text:String;
var imagePath:String;

myLoader.load(new URLRequest("C:/Flash/paths.xml"));
myLoader.addEventListener(Event.COMPLETE, processXML);

function processXML(e:Event):void
{       
    myXML = new XML(e.target.data);

    text = myXML.text;
    imagePath = myXML.path;

    TextContainer.text = team1name;
    imageContainer.source = team2logoPath;

    trace("trace");    
}

The text isn’t flickering but the image is, so I don’t think the XML Loader is the reason that it works with and not with AS3.

Even if I only change the source of the image every time, the image gets invisible for a short time:

imageContainer.source = "C:/images/no_image.png";
  • 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-06-06T11:50:06+00:00Added an answer on June 6, 2026 at 11:50 am

    OK the flickering you are getting is the load time it takes to download the image or in the 3sample you provided loading the image from disk. If you want to avoid this you need to preload the image in one way or another.
    You find an open source preload easy.
    What I would do is create an array of image containers and just remove current element from stage and then add the next one in the array when you want to change images.
    With this method you will assign the source to the item and it will download it even if it is not being displayed.

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

Sidebar

Related Questions

Hi I have a flash file. Which contain images. I want to place an
i want have an image and i want to set it as a background
so I have a SWF file. It can generate Jpeg images. I want to
I have a flash movie that loads images dynamically from an xml file. I
I want to have an image bound to a boolean and have the source
I have a website built in mvc3. I want to have an image of
So I have Image like this (source: de-viz.ru ) I want to get something
So I have Image like this (source: de-viz.ru ) I want to get something
I have bitmap image variable and i want to bind it to my xaml
I have an image that I want to position in the right and repeat

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.