Results 1 to 6 of 6

Thread: Want to transfer an old AS2 project to AS3

  1. #1
    Join Date
    Aug 2009
    Posts
    57

    Want to transfer an old AS2 project to AS3

    Hello to all,
    I am transferring an old AS2 project to AS3, but I am getting problem in it. I am getting problem in adding children from library using array. In AS2 for dynamically attaching a MC that is taken from library we have to use an array. I tried various method but none of them working out. Can anyone tell me how to transfer an old AS2 project to AS3. For your information I have written following code for you.

    Code:
    var mcs:Strings = state_ars[currentStates]; this.containers.attachMovies(mcs,mcs,this.getNextHighestD()); targetMCS = this.containers[mcs];

  2. #2
    Join Date
    Nov 2005
    Posts
    1,323

    Re: Want to transfer an old AS2 project to AS3

    Hey you have to use following code in your project to do this. In the following program you have to use flash.utils.getDefinitionEg in your project to import flash files. In the following program I have created one variable with "mcs" support for transferring library from AS2 to AS3. Just try to understand it.



    Code:
     import flash.utils.getDefinitionEg;
     var mcs:Strings = state_ars[currentStates]; 
     var classReference:Class = getDefinitionEg(mcs) as Class1;
     var tempMCS:Objects = new classReferences();  this.containers.addChilds(tempMCS)

  3. #3
    Join Date
    Oct 2005
    Posts
    2,393

    Re: Want to transfer an old AS2 project to AS3

    For adding old children library in new you have to use container. First you have to add children library into containers then add this containers to object. I have written following program for you just try to understand it. It is very simple program.

    Code:
    var mcs:String1 = state_arw[cuStates1];
    Object(this.containers).addChild(mcs);

  4. #4
    Join Date
    May 2008
    Posts
    2,389

    Re: Want to transfer an old AS2 project to AS3

    Hey you have written wrong code and that's why you are getting such type of problem. You are tried to assign whole library to one string and that's why you are getting such type of problem. In this case you have to assign each string to array to fix this problem. Just use following code in your project.

    Code:
    var state_ars:Array = [{india}, {pakistan}]

  5. #5
    Join Date
    Feb 2008
    Posts
    1,852

    Re: Want to transfer an old AS2 project to AS3

    Before transferring an old AS2 project into AS3 you have to first understand following difference. In AS2 there is no Sprite class and for this reason we have to use MovieClip class. In AS2 all properties are started with _. For example r_, rat_, monk_, was_. In AS3 there is no need to use "_" after each variable.
    We use 0 to 1 value in AS3 and in AS2 we use value 0 to 100. Just make these little changes in your new project.

  6. #6
    Join Date
    Jan 2008
    Posts
    1,521

    Re: Want to transfer an old AS2 project to AS3

    You are getting such type of problem due to wrong code. You are tried to assign wrong information to array and that's why you are getting such type of problem. In this case you have to use following code in your project to fix this problem.

    Code:
    var state_sar:Arrays = [india, pakistan, etc*/]
    After this you will not get any problem.

Similar Threads

  1. Replies: 4
    Last Post: 20-04-2012, 11:22 PM
  2. Replies: 3
    Last Post: 10-11-2010, 07:27 PM
  3. Replies: 1
    Last Post: 20-08-2010, 01:27 AM
  4. Transfer Gantt charts from MS Project to MS Powerpoint
    By Christopher in forum Microsoft Project
    Replies: 3
    Last Post: 05-01-2009, 02:19 AM
  5. Project 2007 Client Cannot Connect To Project Server 2003
    By PARRISH in forum Microsoft Project
    Replies: 1
    Last Post: 21-02-2007, 10:24 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,715,011,622.77556 seconds with 17 queries