A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: loadMovie

  1. #1
    Junior Member
    Join Date
    Mar 2005
    Posts
    29

    loadMovie

    i have a swf that has this code loacted in a keyframe
    Code:
    this.onEnterFrame = function() {
    	if (checklog == 2) {
    		delete this.onEnterFrame;
    		this.gotoAndPlay(27);
    	}
    	if (checklog == 1) {
    		delete this.onEnterFrame;
    		this.gotoAndPlay(15);
    	}
    };
    now it works fine thwn i test the swf but when it's loaded into another swf through loadMovie it does not work! i tink it maybe something to do with this code, but the swf being loaded in also sends and loads variables. i'm not sure if that effects it because again, when i test that swf it works fine.

    anyone got any ideas?

  2. #2
    Senior Member whispers's Avatar
    Join Date
    Mar 2001
    Location
    CFA2h (respect the HEX)
    Posts
    12,756
    your EXTERNAL.SWF has to have NO _root references in its code...

    if you use _root in the external.swf (the one being 'loaded' in)...

    when viewing/testing the .swf by itself.. _root means the MAIN timeline of the EXTERNAL.swf.... once that .swf is loaded into ANOTHR .swf (the MAIN.swf for example).. all references to _root mean the MAIN.swf's timeline.. and NOT the main timeline of the .swf being loaded in? (make sense?)

    once the external.swf has been loaded into another .swf.. the external.swf's timeline becomes the timeline of whatever object you just loaded your .swf into.

  3. #3
    Junior Member
    Join Date
    Mar 2005
    Posts
    29
    the gotoAndPlay is to effect the external swf's timeline not the main swf, so if i used _root in the external, won't that refer to the main swf's timeline?

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