Load Movie Clip

Using multiple movie clips

Page 1 of 1

4 Replies - 36291 Views - Last Post: 23 February 2006 - 07:53 PM

#1 michelle@urban  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 1
  • View blog
  • Posts: 309
  • Joined: 09-July 05

Load Movie Clip

Posted 22 February 2006 - 01:31 PM

Hey there,

I'm doing a project at the moment which require load several movie clips onto the main timeline.

What i'm after is the the mc's playing and then at the end I want the playhead on the main timeline to move onto the next frame playing the next mc. Does this make sense?

This is the actionscript i'm using at the moment, just so you know I am writing all of my actionscript within the frame and not on the objects.

stop();
//create an empty container to store the movie clip in
var container:MovieClip = createEmptyMovieClip("container", getNextHighestDepth());

var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this);

//load the tower movie clip
mcLoader.loadClip("Tower.swf", container);

function onloadInit(mc:MovieClip) {
    //Trace mc level
    trace("onloadInit: "+mc);
};


Then at the end of the Tower.swf I have the actionscript:

//on enter frame go to and stop on frame five of the presentation timeline
this.tower_mc.onEnterFrame = function(){    
    _root.gotoAndStop(5);
}



Thing is the the code isn't working and the mc is just replaying over and over. I know that this is probably a simple problem that I have overlooked.

Thanks for any help

Michelle

xx

This post has been edited by pioSko: 24 February 2006 - 02:35 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Load Movie Clip

#2 theRemix  Icon User is offline

  • D.I.C Regular

Reputation: 15
  • View blog
  • Posts: 440
  • Joined: 19-October 05

Re: Load Movie Clip

Posted 22 February 2006 - 03:11 PM

these lines at the end of Tower.swf
this.tower_mc.onEnterFrame = function(){
    _root.gotoAndStop(5);
}



maybe just put

stop();
// unload this movie clip if you need to
// then
_root.gotoAndStop(5);




this should work
Was This Post Helpful? 0
  • +
  • -

#3 michelle@urban  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 1
  • View blog
  • Posts: 309
  • Joined: 09-July 05

Re: Load Movie Clip

Posted 22 February 2006 - 03:25 PM

Cheers for that,

I've changed the code, but it still isn't working, it's just playing the movie clip and then stopping at the end. Could it be that I've loaded the mc wrong? It just doesn't seem to want to go back to the presentation timeline. Do I have to root it back using a URL?

Hope this makes some sense

M x

This post has been edited by michelle@urban: 22 February 2006 - 03:26 PM

Was This Post Helpful? 0
  • +
  • -

#4 michelle@urban  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 1
  • View blog
  • Posts: 309
  • Joined: 09-July 05

Re: Load Movie Clip

Posted 23 February 2006 - 01:49 PM

Hey there, I've got it sorted now :D I unloaded the mc and that seems to work.

Thanks for all you help

M X
Was This Post Helpful? 0
  • +
  • -

#5 theRemix  Icon User is offline

  • D.I.C Regular

Reputation: 15
  • View blog
  • Posts: 440
  • Joined: 19-October 05

Re: Load Movie Clip

Posted 23 February 2006 - 07:53 PM

hth glad it works now.


welcome to dic!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1