Hi Guys I have a problem which I hope you can answer. I have posted this problem on another news group but they are dead from the neck up. They don’t answer the question the pose a totally stupid and irrelevant question. I think I must be speaking Chinese. I was given a webite to help me put images into flash. The website was.
kirupa.com/developer/flashcs3/loading_image_as3_pg1.htm. I got to the forum from this website.
I managed to put an image into flash and create a SWF file. It all worked. Am I making myself clear. They don’t understand even this.
I now have a Movie Clip on the stage. I want to manipulate this object in ActionScript. It is possible to make a ball bounce using ActionScript I HAVE SEEN IT. They think I am talking Chinese.
What I have done is copy the code out of the time line used in the above tutorial and tried to make it work. Getting no help only silly questions about the meaning of life and splitting the atom. I know my code is not perfect. I am a beginner in this area. Just help on getting an image loaded in ActionScript onto a flash stage object. Nothing complicated.
package code
{
/*****************************************
* MovieSlides :
* Demonstrates a PPT slide show.
* -------------------
* See MovieSlides.fla
****************************************/
import flash.events.Event;
import flash.display.MovieClip;
import fl.containers.UILoader;
public class MovieSlides extends MovieClip
{
var imageLoader:Loader;
imageLoader = new Loader();
var myTimer:Timer = new Timer(2000,8);
myTimer.addEventListener(TimerEvent.TIMER, timerListener);
MyImages:Array = new Array(
"S_DSC_0106.jpg","S_DSC_0218.jpg","S_DSC_0768.jpg",
"S_DSC_0790.jpg","S_DSC_0929.jpg","S_DSC_0218.jpg"
);
public function MovieSlides()
{
// constructor code
loadImage("S_DSC_0218.jpg"); // remove & replace below
// myTimer.start();
// SitBackRelax;
}
}
function loadImage([url:String):void](http://www.kirupa.com/forum/String):void)
{
// Set properties on my Loader object
// imageLoader = new Loader();
imageLoader.load(new URLRequest(url));
imageLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, imageLoading);
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, imageLoaded);
}
function imageLoaded(e:Event):void
{
// Load image
imageArea.addChild(imageLoader);
}
function timerListener(e:TimerEvent):void
{
// trace("Timer is Triggered");
}
function SitBackRelax():void
{
// work through image array and call loadImage()
// Does imageArea.addChild() ad each image? out of memmory !
}
}
Thanks TIA Desmond.