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

  • Home
  • SEARCH
  • 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 6342859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:19:25+00:00 2026-05-24T20:19:25+00:00

I’ve looked through similar question on this site and can’t find a solution, so

  • 0

I’ve looked through similar question on this site and can’t find a solution, so here is my problem:

I have a save function that saves some data.This function is in 1 movie clip in another movie clip. After the save I want to gotoAndStop(1) of the main time line not the current nested one…can anybody help?

Below is the code:

function save()
{

    var oldname:String = so.data.username;
    so.data.username = oldname + tf.text + " " + nf.text + "\n";
    tf.text = "";
    nf.text = ""; // resets textfields
    so.flush(); // writes changes to disk
    trace("Saved");
    gotoAndStop(1);  <<----this must goto frame 1 of the main time line??
}

This is AS3. In AS2 I used to be able to call _root. or _parent. and that would work fine but now it throws a compiler error. Stage.gotoAndStop(1); also doesnt work…

Appreciate any help,
Thanks in advance
Luben

  • 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-05-24T20:19:26+00:00Added an answer on May 24, 2026 at 8:19 pm

    You can access the topmost DisplayObject using root. Because DisplayObject does not have a gotoAndStop() method, attempting root.gotoAndStop() will result in:

    1061: Call to a possibly undefined method gotoAndStop through a reference with static type flash.display:DisplayObject.

    You can however typecast root to MovieClip1, which will grant access to it:

    MovieClip(root).gotoAndStop(1); // or:
    (root as MovieClip).gotoAndStop(1);
    

    Typecasting to MovieClip will also allow you to access user-defined properties and functions on the main timeline – this is because MovieClips are dynamic which drops compile-time constraints on what properties and methods you are allowed to access on an object.


    1Except for in cases where you have a document class that inherits Sprite instead of MovieClip.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
Does anyone know how can I replace this 2 symbol below from the string
I have some data like this: 1 2 3 4 5 9 2 6
I am trying to loop through a bunch of documents I have to put

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.