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 6829459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:30:10+00:00 2026-05-26T22:30:10+00:00

I’m really lost here. I already checked many answers to how to add something

  • 0

I’m really lost here.
I already checked many answers to “how to add something on stage from code that isn’t on document class” but I cannot find an easy answer.

Well, I have two classes:

documentclass, declared on the FLA:

package 
{
    import as3isolib.display.scene.IsoGrid;
    import as3isolib.display.IsoView;
    import as3isolib.display.primitive.IsoBox;
    import as3isolib.display.scene.IsoScene;
    import flash.display.Sprite;

    import com.sb.*;
    import com.sb.services.*;
    import as3isolib.geom.Pt;

    //[SWF(width='760', height='600', backgroundColor='#000000', frameRate='30')]
    public class iso extends Sprite
    {
        private var grid:IsoGrid;
        private var scene:IsoScene;
        private var view:IsoView;

        //Script de Execução do jogo, depois do preloader.
        public function iso()
        {
            trace("It's Alive!");

            var map = new Map();
            map.IsoStarter();

            trace("Ending Loader.");

        }

    }

}

and the class map, i’m calling:

package com.sb
{
    import as3isolib.display.scene.IsoGrid;
    import as3isolib.display.IsoView;
    import as3isolib.display.primitive.IsoBox;
    import as3isolib.display.scene.IsoScene;

    import flash.display.MovieClip;

    import com.sb.*;
    import com.sb.services.*;
    import as3isolib.geom.Pt;

    public class Map extends MovieClip
    {

        private var grid:IsoGrid;
        private var scene:IsoScene;
        private var view:IsoView;

        public function Map()
        {
            //Loading ISO 
        }

        public function MakeMap()
        {

        }
        public function EnableScrolling()
        {

        }

        public function IsoStarter()
        {
            //Load ISO + Iso Configuration
            var box:IsoBox = new IsoBox();
            box.moveTo(15, 15, 0);

            var grid = new IsoGrid();
            grid.setGridSize(400, 400, 5);
            grid.cellSize = 25;
            grid.showOrigin = false;

            var scene = new IsoScene();
            scene.addChild(box);
            scene.addChild(grid);
            scene.render();

            var view = new IsoView();
            view.setSize(760, 600);
            view.centerOnPt(new Pt(150,150,0));
            view.addScene(scene);
            super.addChild(view);

        }

    }

}

BTW: This one works perfectly (beeing document class), but is not organized enough for me:

package 
{
    import as3isolib.display.scene.IsoGrid;
    import as3isolib.display.IsoView;
    import as3isolib.display.primitive.IsoBox;
    import as3isolib.display.scene.IsoScene;
    import flash.display.Sprite;

    import com.sb.*;
    import com.sb.services.*;
    import as3isolib.geom.Pt;

    //[SWF(width='760', height='600', backgroundColor='#000000', frameRate='30')]
    public class iso extends Sprite
    {
        private var grid:IsoGrid;
        private var scene:IsoScene;
        private var view:IsoView;

        //Script de Execução do jogo, depois do preloader.
        public function iso()
        {
            trace("It's Alive!");

            IsoStarter();

            trace("Ending Loader.");

        }


        /* *
         * Iso não pode ser chamado de outra classe senão a Document Root
         * Se for encontrado um jeito para fazer isso, transferir essas 
         * funções para outro script, afim de manter a ordem.
         */

        public function IsoStarter()
        {
            //Load ISO + Iso Configuration
            var box:IsoBox = new IsoBox();
            box.moveTo(15, 15, 0);

            var grid = new IsoGrid();
            grid.setGridSize(400, 400, 5);
            grid.cellSize = 25;
            grid.showOrigin = false;

            var scene = new IsoScene();
            scene.addChild(box);
            scene.addChild(grid);
            scene.render();

            var view = new IsoView();
            view.setSize(760, 600);
            view.centerOnPt(new Pt(150,150,0));
            view.addScene(scene);
            super.addChild(view);

        }


    }

}

Thanks.

  • 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-26T22:30:10+00:00Added an answer on May 26, 2026 at 10:30 pm

    In your Map class, super.addChild(view); is adding your view to movieclip. Try either parent.addChild(view) or stage.addChild(view). If neither of those work, try passing a reference to your document class into Map:

    Change your document class to pass a reference to itself to Map:

     public function iso()
            {
                trace("It's Alive!");
    
                var map = new Map(this);
                map.IsoStarter();
    
                trace("Ending Loader.");
    
            }
    

    And change the constructor in your Map class:

    public class Map extends MovieClip
        {
    
            private var grid:IsoGrid;
            private var scene:IsoScene;
            private var view:IsoView;
            private var parentRef:iso;  // <-----------
    
            public function Map(parentClass:iso) // <-----------
            {
                this.parentRef = parentClass;
                //Loading ISO 
            }
    
            public function MakeMap()
            {
    
            }
            public function EnableScrolling()
            {
    
            }
    
            public function IsoStarter()
            {
                //Load ISO + Iso Configuration
                var box:IsoBox = new IsoBox();
                box.moveTo(15, 15, 0);
    
                var grid = new IsoGrid();
                grid.setGridSize(400, 400, 5);
                grid.cellSize = 25;
                grid.showOrigin = false;
    
                var scene = new IsoScene();
                scene.addChild(box);
                scene.addChild(grid);
                scene.render();
    
                var view = new IsoView();
                view.setSize(760, 600);
                view.centerOnPt(new Pt(150,150,0));
                view.addScene(scene);
                parentRef.addChild(view);     // <-----------
    
            }
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into

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.