A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: AS3 code for equivalent to 'loadMovieNum'

  1. #1
    Registered User
    Join Date
    Oct 2015

    Post AS3 code for equivalent to 'loadMovieNum'

    I'm new to flash and am working in AS2 with no knowledge of AS3. I've downloaded an animation with AS3 script onto the stage and also added a forward button to take the user to a new page. It (the button) won't allow me to add the AS2 script that I normally use viz. on (release) {
    loadMovieNum("Compound11.swf", 0);
    What I'm looking for is the AS3 equivalent to this action.

    On another forum I was given the following AS3 script, but when I click on the forward button it brings the next page over the existing one...

    my_btn.addEventListener(MouseEvent.CLICK, loadSwf);

    function loadSwf(e:MouseEvent):void {
    var newMovieName:URLRequest = new URLRequest("Compound16.swf");
    var loader:Loader = new Loader()
    addChildAt(loader, 1);

    I've tried a number of other scripts with no success.

    Compound16 is the name of the new page to be loaded. All the movie pages are in AS2 except this one. I have also entered the AS in a frame on the timeline and not to the object.

    Thanks in advance!

  2. #2
    Senior Member
    Join Date
    Feb 2005
    https://forums.adobe.com/thread/636511 is my source for this:
    "There are no levels in AS3, so the Num element of loadMovieNum doesn't exist."
    try just doing: addChild(loader); addChildAt will place the object on layer number 1.

  3. #3
    Registered User
    Join Date
    Oct 2015
    Thanks very much for that swak - much appreciated!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center