Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9232723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:22:54+00:00 2026-06-18T06:22:54+00:00

I’ m making a game which have 2 levels, 3 scenes. After the last

  • 0

I’ m making a game which have 2 levels, 3 scenes.
After the last scenes, it will go back to the beginning at the first scenes.
The problem is in the last scene, I made a loop of MCs which are targets to shoot with this code:

for(i=1;i<=numTarget;i++){
    tar=_root.attachMovie("mcTarget","t"+i,i);
    tar._x=random(Stage.width);
    tar._y=-random(Stage.height);
    tar._xscale=random(50)+50;
    tar._yscale=tar._xscale;
    tar.onEnterFrame=targetRun;
}

function targetRun(){
    this._y+=spdTarget*(this._xscale/100);
    if(this._y>Stage.height){
        this._x=random(Stage.width);
        this._y=-this._height;
    }

I found they come back again and again in that very first scene until I go to the second scene. I tried so many code and put them in so many place for all day now. What I want is to remove them after the time is up which I use the Interval code.

What I’ve tried, for example:

tar=delete _root.attachMovie("mcTarget","t"+i,i);
    mcTarget.swapDepths(_root.getNextHighestDepth(0));
    mcTarget.removeMovieClip();

or change a number of amount

numTarget=0;

or create a fake scene, before the real first scene. Also this code,

_root.tar.swapDepths(_root.getNextHighestDepth());
    _root.tar.removeMovieClip();

or

mcTarget._visible=false;
_root.tar._visible=false; 
tar._visible=false;

What can I do any more?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T06:22:55+00:00Added an answer on June 18, 2026 at 6:22 am

    Ok… As I could find the answer of how to get rid of MC(s) (Movie Clip) that I made to be loop, I’ll post the answer right here.
    In this case there is 2 scenes so the first is the scene that has MC and another is a scene that I want to stop MC

    To stop it, go to the second scene and add that for-code like you put in the #1 scene to a frame

       for(i=1;1<=numTarget;i+1){
    delete this["t"+i"].onEnterFrame;
    this["t"+i].removeMovieClip();
    }
    

    Please note that you have to change the code follow yours.

    //using delete _root….. << that I used to do before didn’t work, someone said it because this code will all delete the function and all mc that didn’t manually placed on screen and stuck it at the top left of the screen 😛 It did happen to me too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an autohotkey script which looks up a word in a bilingual dictionary
I have an array which has BIG numbers and small numbers in it. I
I have a text area in my form which accepts all possible characters from
I have been unable to fix a problem with Java Unicode and encoding. The
I'm making a simple page using Google Maps API 3. My first. One marker
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am currently running into a problem where an element is coming back from
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.