Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 11-08-2006, 11:12 PM   #1
michey
old flash newbie
 
Join Date: Dec 2004
Location: Switzerland
Posts: 130
Default AS1 to AS2

I 'd like to change an application written in AS1 to AS2, but as far as I can see there is nothing which is definitively AS1 syntax in the following (just a part of the whole) Code.

PHP Code:
current_x = [new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array()];
current_y = [new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array()];
current_xscale = [new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array()];
current_yscale = [new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array()];

final_x = [new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array()];
final_y = [new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array()];
final_xscale = [new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array()];
final_yscale = [new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array()];

radius_x = [new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array()];
radius_y = [new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array()];
radius_xscale = [new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array()];
radius_yscale = [new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array()];

offset_x = [new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array()];
offset_y = [new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array()];
offset_xscale = [new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array()];
offset_yscale = [new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array()];

speed = [new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array()];
angle = [new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array()];

finish_script = [new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array(),new Array()];

counter 1;
for (
1j<=_parent.total_yj++) {
    for (
1i<=_parent.total_xi++) {        
        
current_x[i][j]      = _parent["square_mask_" counter]._x;
        
current_y[i][j]      = _parent["square_mask_" counter]._y;
        
current_xscale[i][j] = _parent["square_mask_" counter]._xscale;
        
current_yscale[i][j] = _parent["square_mask_" counter]._yscale;
        
        
increment_x _parent[_parent.picture]._width/4;
        
increment_y _parent[_parent.picture]._height/4;
        
        
final_x[i][j]      = i*increment_x increment_x _parent[_parent.picture]._x;
        
final_y[i][j]      = j*increment_y increment_y _parent[_parent.picture]._y
        final_xscale
[i][j] = increment_x;
        
final_yscale[i][j] = increment_y;
        
        
radius_x[i][j] = (final_x[i][j] - current_x[i][j])/2;
        
radius_y[i][j] = (final_y[i][j] - current_y[i][j])/2;
        
radius_xscale[i][j] = (final_xscale[i][j] - current_xscale[i][j])/2;
        
radius_yscale[i][j] = (final_yscale[i][j] - current_yscale[i][j])/2;
        
        
offset_x[i][j] = current_x[i][j] + radius_x[i][j];
        
offset_y[i][j] = current_y[i][j] + radius_y[i][j];
        
offset_xscale[i][j] = current_xscale[i][j] + radius_xscale[i][j];
        
offset_yscale[i][j] = current_yscale[i][j] + radius_yscale[i][j];
        
        
speed[i][j] =((4*4)+(4*4)) -((i*4)+(j*4)) + 6;
        
angle[i][j] = speed[i][j];
        
finish_script[i][j] = "running"
        
counter++;
    }
}
    if (
this._parent.sizer == "small") {
        
this._parent.big_picture_button._visible false;
    } else if (
this._parent.sizer == "big") {
        
this._parent.big_picture_button._visible true;
    } 
So why the Script does not work anymore, published for the FPlayer7 and AS2?

Some suggestions about?

You can have a look at the application(it is from www.uncontrol.com) in my link -work.in.progress- in my signature, it's the 4. menu-item(GESTALTER).

Thanks in advance.
__________________
michey

Last edited by michey; 11-09-2006 at 05:47 AM.
michey is offline   Reply With Quote
Old 11-10-2006, 01:49 PM   #2
michey
old flash newbie
 
Join Date: Dec 2004
Location: Switzerland
Posts: 130
Default

I wrote the whole Code in AS2, but still it doesn't work.
For those who are interested in helping -here- is the original .fla.
__________________
michey

Last edited by michey; 11-10-2006 at 01:52 PM.
michey is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:22 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.