0

I am looping a code where n images are loaded in n UILoader components on the stage using a dynamic XML.

    var aLoader: UILoader = new UILoader();
MovieClip(parent).box1_mc.match1_mc.flag1_mc.source = "C:\\Saverio\\Scoreboard\\Flags\\Squared\\" + country01 + ".png";
aLoader.scaleContent = false;
addChild(aLoader);

However this loop keeps reloading the image, generating a blinking effect on the image that I don't want to show.

This basic function was running smooth when in AS2 I was using the loader.contentPath command.

I need to produce an AS3 project, and NOT an Air app.

Thank you

DiegoG
  • 11
  • 1
  • You are not even using the UILoader to load the image. You are directly setting the source of the image. Also, where is the loop? – Gurtej Singh Mar 31 '17 at 11:26
  • Hi, MovieClip(parent).box1_mc.match1_mc.flag1_mc is my UILoader istance. The loop is made in the timeline which reloads this code. – DiegoG Mar 31 '17 at 11:35

1 Answers1

1

I solved this way:

var aLoader01: UILoader = new UILoader();
aLoader01.source = "C:\\Saverio\\Scoreboard\\Flags\\Squared\\" + MovieClip(root).country + ".png";
aLoader01.width = 330;
aLoader01.height = 220;
flag_mc.addChild(aLoader01);
DiegoG
  • 11
  • 1