If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler
NEW : We have got a new blog where we post some interesting SWF internals info.
![List of issues](/flash/images/issue_list.png)
#2106 Any way to change CXFORMWITHALPHA through ActionScript source code?
Author:
Mokkor
![user user](/flash/images/user.png)
Date created:
Type: question
Visibility: Everybody
Assigned to:
State: closed ![Help](/flash/images/help.png)
![Help](/flash/images/help.png)
Also, besides title, is it possible to change the scale of image or shape through
ActionScript source code (or P-code)?
Is there any documentation for this interactions?
Thanks in advance!
I'll say whatever little I know here, maybe someone else can add to or correct me.
Changing scale and alpha of a placeObject in AS3 is possible. That placeObject needs to
have a name, then you refer to it in AS like:
this.sprite1.sprite2.objectname.alpha = 1
this.sprite1.sprite2.objectname.scale = 1
or simply
this.objectname.alpha = 1
this.objectname.scale = 1
where sprite1 etc. are optional if the object is nested into sprites and they have names
Value is a fraction between 0 and 1 for alpha. 0 is invisible, 1 is opaque.
For scale 1 is default scale (65535 scale), 0-1 makes object smaller, 1+ makes it
bigger.
Using 0 as scale or alpha essentially removes object from screen (but internally it's
still there).
Object must be on the stage, the frame where object appears must be displayed when AS3
processes it.
Finaly, idk if this exists into internal flash libraries or it is an external one. I see
it so often, that I assume it is a built-in one. Also idk if this, or something similar,
works in AS1/2.
Oops the correct syntax is scaleX and scaleY, you need two lines to define the scale.
Understood, thanks a lot!
State: new→closed