Results 1 to 2 of 2

Thread: empty movie clip

  1. #1
    Join Date
    Jul 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question empty movie clip

    How to create an empty movie clip inside an empty movie clip?
    Do any one know how to create tic tac toe game using actionscript 2.0?

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Hello Ben,
    Let's break your questions down shall we...

    How to create an empty movie clip inside an empty movie clip?
    Are you using ActionScript 2.0 or 3.0? Regardless, the technique is rather simple.

    In AS 2.0
    Code:
    this.createEmptyMovieClip("outside", this.getNextHighestDepth());
    outside.createEmptyMovieClip("inside", outside.getNextHighestDepth());
    This creates two movieclips -- outside on the main stage and inside within it.

    In AS3.0, it's even simpler:
    Code:
    var outside:Movieclip = new Movieclip;
    var inside:Movieclip = new Movieclip;
    addchild(outside);
    outside.addChild(inside);
    You could even do away with the var inside:Movieclip line and use an instance of the same class for both movieclips depending on your implementation.

    Do any one know how to create tic tac toe game using actionscript 2.0?
    See if this helps you. If not, post back.

  3. The Following User Says Thank You to Medyman For This Useful Post:

    evan (07-20-2008)

Bookmarks

Posting Permissions

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