Need help going from as2 to as3 with root

Hi guys I'm only just getting into AS2, back then I would use _root to access the root of the timeline.
I am trying ot do the same thing in AS but have been unsuccesful
I've tried
  MovieClip(root).myinstancename_mc.gotoAndStop(2);
but get
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at myfile_fla::viewback_mc_5/manageMouseClick()[myfile_fla.viewback_mc_5::frame1:8]
Any help would be great

if you had a movieclip with instance name myinstancename_mc on the root timeline when that code executed, you wouldn't see that error message.  ie, there's nothing wrong with your syntax.
the most common problems would be typos, myinstancename_mc in more than one keyframe and myinstancename_mc not existing when that code executes.

Similar Messages

  • Need help going from dial-up internet to wireless internet on an eMac.

    I have an eMac that is running 10.5.6 (if that matters) and it has an AirPort card, AirPort Extreme (0x14E4, 0x4E) but all I have is dial-up and would like to upgrade to a wireless connection. My question is, what do I need? Do I need a modem and a router? or just a router or just a modem?

    You need a modem, and at some point, the wireless connection needs to be bridged to a wired device. If the modem itself doesn't have wireless capabilities or you have multiple computers, get a wireless router as well.
    (50859)

  • Please help 'Translate' These codes from AS2 to AS3 for me

    Hi, i need help 'translating' these codes from Action Script 2 to Action Script 3. Please Do it for me:
    toc    loadText = new LoadVars();
        loadText.load("Curie.txt");
        loadText.onLoad = function(success) {
            if (success) {
                // trace(success);
                Curie.html = true;
                Curie.htmlText = this.Curie;
    Please translate it for me, i need it ASAP thanks
    Kenneth

    Thank you for helping me
    Kenneth
    Date: Thu, 15 Oct 2009 05:49:14 -0600
    From: [email protected]
    To: [email protected]
    Subject: Please help 'Translate' These codes from AS2 to AS3 for me
    Take a look at that:
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/migration.html
    There is a LoadVars section on that.
    There is also a tutorial here:
    http://www.republicofcode.com/tutorials/flash/as3externaltext/
    Cheers,
    CaioToOn!
    >

  • Please help convert from as2

    I never learnt as2 and I just purchased a fla file from a stock sight thinking it was in as3 and it isn't!!! doh
    can anyone help me convert this from as2 to as3:
    stop();
    import flash.filters.*;
    //--------------variables to change--------------------------//
    //set this value to true if you want sparkles to be created from the mouse
    //and false if you want automatic sparkles
    var createSparklesFromAnyMouse:Boolean = true;
    //set to true if you want sparkles to stop being created when the mouse
    //is still
    var createSparklesFromClick:Boolean = false;
    //modify the size of the sparkles
    var maxSparkSize:Number = 18;
    var minSparkSize:Number = 8;
    //increase this value to shorten the life, 0 to live forever
    var fadeSpeed:Number = 10;
    //the speed the sparkles fall, higher number quicker the speed
    var speed:Number = 1;
    //choose whether you want the sparkle colour to be random
    var randomColour:Boolean = true;
    //if you don't want a random colour pick a default colour
    defaultColour = 0xFFffFF;
    //do not modify code below here...
    var sparkle:Number = 0;
    var mousePosX:Number;
    var mousePosY:Number;
    var whichBat:Number;
    var count:Number = 0;
    this.createEmptyMovieClip("empty",this.getNextHighestDepth());
    howToCreate();
    function howToCreate() {
              if (createSparklesFromClick == true) {
                        trace("create sparkles every time I click the mouse");
                        //create sparkles from mouse clicks
                        activateClick();
              } else {
                        if (createSparklesFromAnyMouse == true) {
                                  trace("create sparkles from the mouse");
                                  //create sparkles from the mouse
                                  this.onEnterFrame = function() {
                                            createSparkle();
                                            createSparkle();
                        } else {
                                  trace("create sparkles every time I move the mouse");
                                  //create sparkles ONLY when the mouseMoves
                                  createWhenMoving();
    function createWhenMoving() {
              this.onEnterFrame = function() {
                        if (mousePosX != _root._xmouse && mousePosY != _root._ymouse) {
                                  createSparkle();
                        mousePosX = _root._xmouse;
                        mousePosY = _root._ymouse;
    function activateClick() {
              empty.onMouseDown = function() {
                        this.onEnterFrame = function() {
                                  createSparkle();
              empty.onMouseUp = function() {
                        delete this.onEnterFrame;
    function createSparkle() {
              movingSparkle = this.attachMovie("colouredSparkle", "s_"+sparkle, sparkle);
              movingSparkle2 = this.attachMovie("colouredSparkle", "ss_"+sparkle, sparkle+100);
              sparkle++;
                        if(sparkle>100){
                        sparkle = 0;
              setParams(movingSparkle);
              setParams(movingSparkle2);
    function setParams (movingSparkle){
              movingSparkle._x = _root._xmouse+randRange(-8, 8);
              movingSparkle._y = _root._ymouse+randRange(-15, 0);
              movingSparkle._xscale = movingSparkle._yscale=Math.random()*maxSparkSize+minSparkSize;
              movingSparkle._rotation = randRange(0, 360);
              if (randomColour == true) {
                        col = Math.round(Math.random()*0xFFFFFF);
              } else {
                        col = defaultColour;
              colouredFill = new Color(movingSparkle.colour_mc);
              colouredFill.setRGB(col);
              colouredFill = new Color(movingSparkle.white_mc);
              colouredFill.setRGB(col);
              moveSparkle(movingSparkle);
    function moveSparkle(movingSparkle) {
              var ySpeed = randRange(0, speed);
              var rot = randRange(-15, 15);
              var blurX = randRange(2, 5);
              var blurY = blurX;
              var blurFilter = new BlurFilter(blurX, blurY, 3);
              movingSparkle.white_mc.filters = [blurFilter];
              movingSparkle._alpha = randRange(85, 100);
              var alphaDrop = randRange(1, fadeSpeed);
              movingSparkle.onEnterFrame = function() {
                        //change speed
                        this._y += ySpeed;
                        //change rotation
                        this._rotation = this._rotation+rot;
                        //make it smaller
                        this._xscale = this._yscale=this._xscale*0.98;
                        //fade the sparkle
                        this._alpha = this._alpha-alphaDrop;
                        //remove the movieclip if it get tiny
                        if (this._alpha<10) {
                                  this.removeMovieClip();
                                  delete this.onEnterFrame();
                        if (this._height<4) {
                                  this.removeMovieClip();
                                  delete this.onEnterFrame();
    function setColour(mc, col) {
              colourIt = new Color(mc);
              colourIt.setRGB(col);
    function randRange(min:Number, max:Number):Number {
              var randomNum:Number = (Math.random()*(max-min))+min;
              return randomNum;

    Zhanbolat,
    In theory, conversion of this code is not difficult, especially because it is clear what the logic is designed to do. The issue is that you will not have an expected result once only this code is converted in isolation. This puppy uses some other objects that are written in AS2 including entities in the FLA library.
    In short, it looks like this application needs a total overhaul at every level in order for it to properly function as an AS3 program.
    With that said, although this is, again, not a difficult task, it is unlikely to find someone to do it for free. You may have a better luck if you start conversion yourself and post focused questions as you go.

  • Issues converting scroll bar components from AS2 to AS3

    I am working on editing a document that has scroll bar components that I would like to convert from AS2 to AS3 since everytime I try to open the document it shows a WARNING and won't convert them and when I publish and look at the final document the scroll bar seems to act unusally since it is obviously still on AS2.
    Here are two of the scripts I finally was able to find within it. Should I fix it and how so? This first is for the "Creative Scroll Area" and the second is for the "Creative Scrollbar"
    package  {
              import flash.display.MovieClip;
              public class Creative Scroll Area extends MovieClip {
                        public function Creative Scroll Area() {
                                  // constructor code
    package  {
              import flash.display.MovieClip;
              public class Creative Scrollbar extends MovieClip {
                        public function Creative Scrollbar() {
                                  // constructor code

    Okay, well I know the code is making a scroll bar and a scroll area and under the "type" it says they are "compiled..." which is unusual since most of the other components I've worked with have been movie clips or bitmaps. Do I need to look up what AS3 components I need to replace the script from above? Because when I looked for that I couldn't specifically find what I needed or really understood if I was looking at the right information.
    Here is something I found when trying to "debug" it:
    WARNING: The component 'UIScrollBar' requires ActionScript 2.0, which is not supported in this version of Flash Professional.
    WARNING: The component 'Creative Scrollbar' requires ActionScript 2.0, which is not supported in this version of Flash Professional.
    WARNING: The component 'Creative Scroll Area' requires ActionScript 2.0, which is not supported in this version of Flash Professional.

  • Need help getting from 10.5.8 to 10.6.

    need help getting from 10.5.8 to 10.6.  i know i'm late to the game!

    If you are not sure of what you are doing,If you are worried about losing anything when doing a major systems upgrade/update,
    Before embarking on a major OS upgrade, it would be wise, advisable and very prudent if you backup your current system to an external connected and Mac formatted Flash drive OR externally connected USB, Thunderbolt or FireWire 800, Mac formatted hard drive. Then, use either OS X Time Machine app to backup your entire system to the external drive OR purchase, install and use a data cloning app, like CarbonCopyCloner or SuperDuper, to make an exact and bootable copy (clone) of your entire Mac's internal hard drive. This step is really needed in case something goes wrong with the install of the new OS or you simply do not like the new OS, you have a very easy way/procedure to return your Mac to its former working state.
    Older version of CarbonCopyCloner found here.
    http://mac.filehorse.com/download-carbon-copy-cloner/2734/
    Older versions of SuperDuper can be found on the SuperDuper Website and Homepage.
    http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html
    Then, determine if your Mac meets ALL minimum system install requirements.
    Mac OS X v10.6 Snow Leopard system requirements
    Purchased Installer disc here.
    http://store.apple.com/us/product/MC573Z/A/mac-os-x-106-snow-leopard
    To install Snow Leopard for the first time, you must have a Mac with:
    An Intel processor
    An internal or external DVD drive, or DVD or CD Sharing
    At least 1 GB of RAM (additional RAM is recommended)
    A built-in display or a display connected to an Apple-supplied video card supported by your computer
    At least 5 GB of disk space available, or 7 GB of disk space if you install the developer tools.
    In addition, see this discussion for more relevant info that you may need if you have any other questions or issues.
    Snow Leopard upgrade - keeps Photoshop?

  • Declare new color from AS2 to AS3

    Hi All,
    Could you let me know how to "convert" the following code from AS2 to AS3:
    var distracterBkgdColor = new Color(this.distracterBkgd_mc);
    Thanks!

    var ct:ColorTransform = this.distracterBkgd_mc.transform.colorTransform;ct.color = 0xrrbbgg;
    this.distracterBkgd_mc.transform.colorTransform=ct;

  • Need help Connecting Crystal Reports 8.5 with GBS Agency Expert 6.7.6c

    Need help Connecting Crystal Reports 8.5 with GBS Agency Expert 6.7.6c.  I need assistance on connecting these together so I can run a report.  I am not an IT person so if someone could dumb it down it would be great.
    Thanks,
    NBGHealth

    Hello,
    I assume GBS Agency Expert 6.7.6c is some sort of database or data source? If you have an ODBC driver then create or use a System DSN to the database. Then you can create a report using that DSN.
    Otherwise I suggest you contact the makers of GBS Agency Expert 6.7.6c and ask them how to connect to the database.
    Let them know CR is ANSII 92 ODBC 3 compliant.
    Thank you
    Don

  • Need help translating menu from as2 to as3

    Ive been at this for a week now, trying to build a
    straightforward accordian menu, translating an existing as2 menu
    into as3. I desperately need help, I've reach my conceptual ends in
    terms of code knowledge. Could someone please take a look at what
    I've got and what I need to do to get it working? I've included the
    AS3 file I've been working on and well as the AS2 files I've been
    referencing and attempting to translate. Any help really be
    appreciated...also, here is the code I have so far below.

    you have a 4 enterframe loops running continually when they
    only need to run after a menu item has been clicked and can stop
    after all menu items have reached their final positions.
    and you need to compute the final positions for each menu
    item after one of them is clicked.
    you might do better to check for an as3 tutorial for an
    accordian menu. it's a bit more involved than you're thinking.

  • Need help figuring out what's wrong with my code!

    I am having a few problems with my code and can't see what I've done wrong. Here are my issues:
    #1. My program is not displaying the answers to my calculations in the table.
    #2. The program is supposed to pause after 24 lines and ask the user to hit enter to continue.
    2a. First, it works correctly for the first 24 lines, but then jumps to every 48 lines.
    2b. The line count is supposed to go 24, 48, etc...but the code is going from 24 to 74 to 124 ... that is NOT right!
    import java.text.DecimalFormat; //needed to format decimals
    import java.io.*;
    class Mortgage2
    //Define variables
    double MonthlyPayment = 0; //monthly payment
    double Principal = 200000; //principal of loan
    double YearlyInterestRate = 5.75; //yearly interest rate
    double MonthlyInterestRate = (5.75/1200); //monthly interest rate
    double MonthlyPrincipal = 0; //monthly principal
    double MonthlyInterest = 0; //monthly interest
    double Balance = 0; //balance of loan
    int TermInYears = 30; //term of loan in yearly terms
    int linecount = 0; //line count for list of results
    // Buffered input Reader
    BufferedReader myInput = new BufferedReader (new
    InputStreamReader(System.in));
    //Calculation Methods
    void calculateMonthlyPayment() //Calculates monthly mortgage
    MonthlyPayment = Principal * (MonthlyInterestRate * (Math.pow(1 + MonthlyInterestRate, 12 * TermInYears))) /
    (Math.pow(1 + MonthlyInterestRate, 12 * TermInYears) - 1);
    void calculateMonthlyInterestRate() //Calculates monthly interest
    MonthlyInterest = Balance * MonthlyInterestRate;
    void calculateMonthlyPrincipal() //Calculates monthly principal
    MonthlyPrincipal = MonthlyPayment - MonthlyInterest;
    void calculateBalance() //Calculates balance
    Balance = Principal + MonthlyInterest - MonthlyPayment;
    void Amortization() //Calculates Amortization
    DecimalFormat df = new DecimalFormat("$,###.00"); //Format decimals
    int NumberOfPayments = TermInYears * 12;
    for (int i = 1; i <= NumberOfPayments; i++)
    // If statements asking user to enter to continue
    if(linecount == 24)
    System.out.println("Press Enter to Continue.");
    linecount = 0;
    try
    System.in.read();
    catch(IOException e) {
    e.printStackTrace();
    else
    linecount++;
    System.out.println(i + "\t\t" + df.format(MonthlyPrincipal) + "\t" + df.format(MonthlyInterest) + "\t" + df.format(Balance));
    //Method to display output
    public void display ()
    DecimalFormat df = new DecimalFormat(",###.00"); //Format decimals
    System.out.println("\n\nMORTGAGE PAYMENT CALCULATOR"); //title of the program
    System.out.println("=================================="); //separator
    System.out.println("\tPrincipal Amount: $" + df.format(Principal)); //principal amount of the mortgage
    System.out.println("\tTerm:\t" + TermInYears + " years"); //number of years of the loan
    System.out.println("\tInterest Rate:\t" + YearlyInterestRate + "%"); //interest rate as a percentage
    System.out.println("\tMonthly Payment: $" + df.format(MonthlyPayment)); //calculated monthly payment
    System.out.println("\n\nAMORTIZATION TABLE"); //title of amortization table
    System.out.println("======================================================"); //separator
    System.out.println("\nPayment\tPrincipal\tInterest\t Balance");
    System.out.println(" Month\t Paid\t\t Paid\t\tRemaining");
    System.out.println("--------\t---------\t--------\t-------");
    public static void main (String rgs[]) //Start main function
    Mortgage2 Mortgage = new Mortgage2();
    Mortgage.calculateMonthlyPayment();
    Mortgage.display();
    Mortgage.Amortization();
    ANY help would be greatly appreciated!
    Edited by: Jeaneene on May 25, 2008 11:54 AM

    From [http://developers.sun.com/resources/forumsFAQ.html]:
    Post once and in the right area: Multiple postings are allowed, but they make the category lists longer and create more email traffic for developers who have placed watches on multiple categories. Because of this, duplicate posts are considered a waste of time and an annoyance to many community members, that is, the people who might help you.

  • Need help booting from usb on Lenovo U410

    I have burned a .iso file on a usb stick, and now i want to to boot my laptop from the usb.
    I shutdow the computer and a pressed the NOVO button on the side  start the cmmputer to give me the menu
    under the BIOS setup and the BOOT tab, i am confused to which step to priorritize to boot from the usb. i have the following:
    1.ATA HDD: ST9...
    2. ATA SSD1: SANDISK SSD U100 24GB
    3.RAID DEVICE 2
    4. RAID DEVISE 1
    5. ATAPI CD:
    6.USB HDD: GENERIC USB HDD
    7.USB FDD
    8.USB CD
    9.PCI LAN: EFI NETWORK IPV4
    10. PCI LAN : EFI NEWTOWORK IPV6
    i obvisouly tried putting anything with the word "USB" to the top but still my lenovo u410 dosent boot from the usb..
    Any help please?
    Solved!
    Go to Solution.

    hi Moh27,
        Thanks for Using Lenovo community Forums!
    Inside BIOS under boot tab you will find there UEFI Boot you will need to disable that
    then u need to move the USB HDD: GENERIC USB HDD to number 1.
    You can do that by highlighting the USB HDD: GENERIC USB HDD and pressing F5 or F6 to move it up
    -or-
    Highlight the things on top of the USB HDD: GENERIC USB HDD then put them down still using the F5 or F6 to move them down, do it one by one till the USB HDD is on top.
    Just make once you got the USB HDD: GENERIC USB HDD to 1 hit F10 to save and exit changes.
    Hope this helps,
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
    Follow @LenovoForums on Twitter!

  • I have a godaddy website with a welcome page- I need help adding a few additional pages with a hyperlink to my welcome page.

    I need help attaching a few hyperlinks my godaddy welcome page. I have 2 more ipages articles, I also converted them to pdf. Godaddy only helped (last year) with the 1st article.  I do not know how to attach a hyperlink to the artlcles and add the hyperlinks to my welcome page.

    The program is called Pages not iPages. Just let us know if you do not speak English and what language you do speak so we can adjust for that.
    The issues are to do with your web page not with Pages.
    I think you are asking how to link from your web page to your pdf articles. You must first copy those pdfs to your web server, or some other web location, and then provide html links on your welcome page to those pdf files.
    The pdfs themselves may contain links to other locations but I can not see that that is what you are asking for.
    Nor to what those links would be to.
    From your heading I think you may have confused the name of Pages, the word processing program, with web pages which are two different things.
    Peter

  • Major gaming system Migration from AS2 to AS3

    I have a major project entirely in AS2. It is made of a
    Multimedia Application, which provides access to functions needed
    to load games, save information, insert *.jpg files... The 50+
    games each have their own graphic.swf and engine.swf, where the
    graphics deal with gameplay and the engine communicates with the
    Multimedia Application.
    If the Multimedia Application is migrated to AS3 but the game
    swf files remain the same, will the functions still be able to
    communicate (call functions and send references to objects)?

    No, AS2 and AS3 are absolutely different animals. There are
    some techniques (search for as2 as3 bridge in the net) that create
    a bridge which are cumbersome in my view.

  • Need help in formating a form dealing with negative currency

    Need Help!!!
    Creating forms in Adobe acrobat Pro I could format a number cell to calculate additions/subtractions of currency. If the result was negative I could get the cell to show the negative result in red text and show parentheses around them. How can I do that in LiveCycle?
    If i have to use formcalc - what would i type in?

    In LiveCycle can be done using the Numeric Field object and some formcalc script.
    Use the "Numeric Field" from the Object Library. For the Field patterns (Select the placed numeric field, On object Window Object -> Field) use "num.currency{}" to show the currency(Ex: $) and "parentheses" if its negative. Write some script to show red text/border in red .
    On exit event of the Numeric Field here is the script:
    if($.rawValue <0) then $.font.fill.color.value = "255,0,0" endif  // This will make entire text in red color if the value is negative.
    if($.rawValue <0) then $.validate.nullTest = "error" endif      //This will make border of the field in red color if the value is negative.
    Hope this helps.

  • Need help connecting to 360 and pc with internet

    im new to using routers and i lost the manual and the box and i need help using the router the model number is NH1005,V2 fast ethernet 10/100 5-port Hub and it is a linksys so can someone help me im confused and i need the ip addreess or something
    thanks in advance

    Hi....
             A network HUB is a network device that is used to connect multiple computer so that they can share the resources. In more general way a hub can be defined as a common connection point for devices in the network.
                There are hubs that can be managed by an administrator. In case of NH1005 it is not a manageable HUB. Connect the devices to the HUB and if the devices are properly configured they will communicate with each other.

Maybe you are looking for

  • Is there any way to retrieve my contacts from the iPhone 3G, after I imported my contacts to my sim card within the settings, mail

    Is there a way to retrieve my contacts back into my 3G iPhone? I was trying to save my contacts by importing my contacts to my sim card by going into settings, mail-contacts and then hit the Import SIM Contacts. It wiped out ALL of my contacts and I'

  • F110 APP run Error

    Hi Experts, When I try to run F110. Below Error shown. I pasted  Error Job log below: Job started Step 001 started (program SAPF110S, variant &0000000002020, user ID SAPUSER) Log for proposal run for payment on 12.07.2014, identification WIP4 Informa

  • Insert or overwrite inserts BLANK in the timeline

    Hi, I am trying to do a basic 3 point edit. Open the clip in Source monitor, set I, O and then when i use the shortcuts "," or "." it just inserts a BLANK GAP??? If i drag the clip, it works just fine. ANy idea why? I use Premiere CS6. Thanks.

  • HELP -- About a query design

    how to calculate a characteristic's  different value? let me give a example: i have a infocube, it has three characteristics: Grandfather, father, SonOrDaughter and one key figure : counter. from the data point of view, One Grandfather may have n(>=0

  • Window opens every boot

    I have this problem with this window opens on my desktop everytime i boot up and its driving me crazy thanks for any help