Skip to main content
November 29, 2006
Answered

Buttons

  • November 29, 2006
  • 2 replies
  • 198 views
Ok, I have a problem. :(

Heres the code I have:

var button1 = this.createEmptyMovieClip("button1", "button1", 3);
loadMovie("button1.swf", "button1");
button1._y = 65;
button1._x = 415;
_root.button1.onRelease = function() {
trace("hi");
};

Now my problem arises because when I click the button it dosen't work. Why? and how do i fix this.

Many Thanks.
hugh.
This topic has been closed for replies.
Correct answer Devendran
Hi
While loading a Content into a movie clip will remove all the variable and content of that target movie

i.e if u wish to load a jpg/swf into a movie clip called "mcHolder_mc" will remove all the Content and variable stored in the mcHolder_mc. So you can't access it any more. Also the loading is independent function so We can't expect it will occur immediately after calling. So better to use load clip

2 replies

December 4, 2006
Yes! many thanks it works!
DevendranCorrect answer
Inspiring
November 29, 2006
Hi
While loading a Content into a movie clip will remove all the variable and content of that target movie

i.e if u wish to load a jpg/swf into a movie clip called "mcHolder_mc" will remove all the Content and variable stored in the mcHolder_mc. So you can't access it any more. Also the loading is independent function so We can't expect it will occur immediately after calling. So better to use load clip