Hi,
I am new to actionscript. I am now working on my first frash website. I have
created several separate .swf movie which will load to the main movie when
buttons are clicked. Although the moive was loaded properly, nothing happened
when I clicked the buttons inside it.
All the buttons in the separate .swf work fine when played alone but not when
it was loaded into the main movie.
This is the script that i put inside the .swf :
_root.group_btn.onRelease = function () {
_root.computer.gotoAndPlay ("group");
};
Please if anyone could help.
newbuggie
:(
EricNY523 - 30 Apr 2005 18:20 GMT
It has to do with your reference to _root in your loaded SWF Files. When you
load one movie inside another, _root references the top-most movie.
This can be fixed one of 2 ways, (1) don't use _root or (2) in the main
timeline of the movie clips you're loading, put the line:
this._lockroot = true;
For information on what this does, see the live-doc article:
http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/
wwhelp.htm?context=Flash_MX_2004&file=00001522.html
hope this helps
newbuggie - 30 Apr 2005 21:44 GMT
I have put this line in my loaded movie and it all works now.
Thank you very much!
newbuggie
:)