Hello!
Im trying to create some buttons at runtime... flash 8.
The idea is to load some external file (here a .jpg) and turn it into a button, for what ever use.
For this i used the code below (from macromedia), but when the button is pushed, it disappears...??? Why? With just the trace command, its ok, but with everything else, its gone...
Any ideas??
Code:
code:
// Creates a parent movie clip to hold the container.
this.createEmptyMovieClip("my_mc", this.getNextHighestDepth);
// Creates a child movie clip inside of "my_mc".
// This is the movie clip the image will replace.
my_mc.createEmptyMovieClip("container_mc",this.get NextHighestDepth);
// Use MovieClipLoader to load the image.
var my_mcl:MovieClipLoader = new MovieClipLoader();
my_mcl.loadClip("somePicture.jpg", my_mc.container_mc);
// Put event handler on the my_mc parent movie clip.
my_mc.onRelease = function() {
// trace("It works");
_root.createEmptyMovieClip("someClip",this.getNext HighestDepth);
someClip._x=200;
trace(someClip._x);
};