Book a Demo

Author Topic: Action Script 2 troubles  (Read 4288 times)

eshk

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Action Script 2 troubles
« on: December 23, 2005, 01:16:06 am »
i'm starting import source code of my application into Enterprise Architect 6.0, and have message what using import directive in Action Script - it's error.
I have many classes, and packages. Can I reverse engeneering my project ?

TimWash

  • EA User
  • **
  • Posts: 26
  • Karma: +0/-0
  • Bad news does not get better with age!
    • View Profile
Re: Action Script 2 troubles
« Reply #1 on: December 25, 2005, 09:47:12 pm »
Hello, can you be a little more specific as to the exact error message(s) you are getting?  I have Flash 8 Professional installed and have successfully reverse engineered several ActionScript 2.0 classes.  Are you using the latest version of EA?

Best regards,

Tim
Tim Stevens
Programmer/Analyst
VB.NET, VB6, VBA, T-SQL, ActionScript, ColdFusion

eshk

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Action Script 2 troubles
« Reply #2 on: December 26, 2005, 12:11:07 am »
I'm using EA 6.0 Trial

1. Create new project.
2. Project/Source Code Engineering/Import Source Directory
 - select type - ActionScript
 - create package per directory
 - synchronization - syncronize existing classes
press ok
When proccessing files - it's for all files generate error "Unexpected symbol import"

- all classes placed to package.
- the packages placed in many places at file system (project consist of many library, used in another projects)
- for import i'm used root directory of my project

for example
\classes\pages\
           +          +base
           +          +dialogs  
           +\enity
           +\server

and classes
class pages.BaseDialog
class server.ServerExchange

the root directoy is \classes

TimWash

  • EA User
  • **
  • Posts: 26
  • Karma: +0/-0
  • Bad news does not get better with age!
    • View Profile
Re: Action Script 2 troubles
« Reply #3 on: December 26, 2005, 12:31:02 am »
You may want to try something simpler.  Here is what I did just to test out whether or not I could even reverse engineer actionscript files:


Create a new project

Expand Logical View folder under Views

Right mouse click on Logical Model folder and repeat steps you did in previous attempts as you have described in your reply to me.   This should at least organize all of your packages underneath one folder in EA.  

Are you sure these are ActionScript 2.0 files?  Could they be ActionScript 1.0 instead?

Regards,

Tim
Tim Stevens
Programmer/Analyst
VB.NET, VB6, VBA, T-SQL, ActionScript, ColdFusion

eshk

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Action Script 2 troubles
« Reply #4 on: December 26, 2005, 01:04:56 am »
ok let's see a little example
i have 2 packages in directory classes:
classes\srv
and
classes\ui

and in it i have 2 files:
classes\srv\Srv1.as
classes\srv\Ui.as

it's code is below:
/*-------------------------------------------------------------*/
import srv.Srv1;
class ui.Ui extends Srv1{
public function toXML1():Void {
toXML();
trace("toxml1");
}
}
/*-------------------------------------------------------------*/
/*-------------------------------------------------------------*/
class srv.Srv1 {
public function toXML():Void {
trace("toxml");
}
}
/*-------------------------------------------------------------*/
and import both directory to Logical Model.
it's ok worked, created diagrams for both classes, but i'm cann't view generalization. Because it's two different classes without relations.

and i have about 50 packages in my project - it's quite difficult import each of them :(

TimWash

  • EA User
  • **
  • Posts: 26
  • Karma: +0/-0
  • Bad news does not get better with age!
    • View Profile
Re: Action Script 2 troubles
« Reply #5 on: December 26, 2005, 11:11:54 am »
Hello, I recreated your simple example and it worked fine for me.  I took the text of your classes from your post and created the .as files in the directories you specified underneath a directory called "Flash Projects" on my C drive.  The class diagram named "srv" shows the generalization as you would expect.  I hope this helps you out as the product seems to work as I would expect it to.

Take care,

Tim
« Last Edit: December 26, 2005, 11:13:11 am by TimWash »
Tim Stevens
Programmer/Analyst
VB.NET, VB6, VBA, T-SQL, ActionScript, ColdFusion

Etienne

  • Guest
Re: Action Script 2 troubles
« Reply #6 on: March 26, 2006, 05:33:29 am »
I had the same problem.  
but the solution was transforn the content of *.as files from UNICODE to ASCII.  


Later the import was successful


I hope that this helpfull.  ;D

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Action Script 2 troubles
« Reply #7 on: March 26, 2006, 02:45:35 pm »
Hello Etienne,

What dialect of Unicode were you using? We've had a problem with UTF-8 conatining a signature (byte order mark).  I'm not aware of any other issues reading unicode files at the moment.