dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: controlling an external movie clip

  1. #1
    Member
    Join Date
    Oct 2002
    Posts
    34

    controlling an external movie clip

    I have a button that opens an external movie clip.

    Here is the code for that button.

    on (press){
    loadMovie("preview.swf","_root.previewplaceholder" );
    }

    That works just perfect.

    Here is what else I want in that button but not sure how to do it.

    on (release) {
    if (count == 0) {
    preview.gotoAndPlay(1);
    count++;
    } else {
    preview.gotoAndPlay(31);
    count--;
    }
    }

    What this code is trying to do is in the preview.swf gotoAndPlay frame 1 or gotoAndPlay frame 31.

    What does the:
    preview.gotoAndPlay(1);
    line have to look like when that is an imported .swf


    Hope this is understandable!!
    Thanks!
    Thanks for the wisdom oh great one!

  2. #2
    the traveler
    Join Date
    Aug 2000
    Location
    West Hartford, CT
    Posts
    638
    when you load a movie into a clip, in this case, your _root.previewplaceholder, you have to refer to the clip in which it is loaded, not the name of the swf.

    Code:
    _root.previewplaceholder.gotoAndPlay(1);
    aa |

  3. #3
    Member
    Join Date
    Oct 2002
    Posts
    34
    That isn't working for me. You have any idea's?
    Thanks for the wisdom oh great one!

  4. #4
    iguanagirl32 mraspiller's Avatar
    Join Date
    Jul 2002
    Posts
    817
    put that button into the SWF, then your code will work...but you have to call the MC so do this:

    on (release) {
    if (count == 0) {
    TheMCsName.gotoAndPlay(1);
    count++;
    } else {
    TheMCsName.gotoAndPlay(31);
    count--;
    }
    }

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