Skip to main content
Participant
February 7, 2012
Answered

Images not showing on android devices, but they work on PC

  • February 7, 2012
  • 1 reply
  • 895 views

Hello, I'm using Adobe flash cs5.5 and AS3.0.

This is my code:

var image:Array= new Array();

image[0]="image1.jpg";

image[1]="image2.jpg";

image[2]="image3.jpg";

image[3]="image4.jpg";

image[4]="image5.jpg";

var loaders : Array;

    loaders = new Array();

function load_images(load_image:Array,number_of_images:Number):void

{

    for (var i:Number=0;i<number_of_images;i++)

    {

          loaders = new Loader();

      

        loaders.load(new URLRequest(load_image));

           stage.addChild(loaders);

        }

}

load_images(image,5);

loaders[0].x=0;

loaders[1].x=100;

loaders[2].x=200;

loaders[3].x=300;

loaders[4].x=400;

This code works great on PC, but when I publish it to my Android phone, it doesn't show picture. Looks like it don't export them to my phone. How can i fix this?

I have found this code:

[Embed(source="image.jpg")]

var logoLoaderClass:Class;

logoImage = new logoLoaderClass() as Bitmap;

      stage.addChild(logoImage);

It does work, and it does export image to phone, but i need some faster way to do this. I want to have logoImage[0], logoImage[1]....All in arrays. Do you have any idea?

This topic has been closed for replies.
Correct answer Colin Holgate

In the iOS settings, General tab, there is an area near the bottom where you add files. You'll need to add the jpegs there. It's much the same as what the embed line is doing.

1 reply

Colin Holgate
Colin HolgateCorrect answer
Inspiring
February 7, 2012

In the iOS settings, General tab, there is an area near the bottom where you add files. You'll need to add the jpegs there. It's much the same as what the embed line is doing.

kevderAuthor
Participant
February 7, 2012

Thank you very much, for this simple solution:)