jpex | Javascript Prototype Extension | Dependency Injection library
kandi X-RAY | jpex Summary
kandi X-RAY | jpex Summary
Jpex is an Inversion of Control framework. Register dependencies on a container, then resolve them anywhere in your application. The real magic of jpex is its ability to infer dependencies using the magic of babel and typescript...
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of jpex
jpex Key Features
jpex Examples and Code Snippets
Community Discussions
Trending Discussions on jpex
QUESTION
I have looked into the AVM2 Overview document (chapter 4.11, page 33) and found the following about init_scope_depth
:
init_scope_depth
The init_scope_depth field defines the minimum scope depth, relative tomax_scope_depth
, that may be accessed within the method.
max_scope_depth
The max_scope_depth field defines the maximum scope depth that may be accessed within the method. The difference betweenmax_scope_depth
andinit_scope_depth
determines the size of the local scope stack.
I have also came across a citation on the ActionScript 3.0 Bible book about the scope chain, which I believe to be related to init_scope_depth
, and says:
The scope chain, shown in figure 2-1, is an internal device that is created to manage variable scope during function execution.
When a variable is referenced, the Flash Player starts with the most recent function called and checks for variable declarations. If the value isn't found in the most local scope, it moves up one level to the parent function that called the function and checks there. This process continues until the scope chain has been checked all the way up to the global scope.
As shown in the figure, we have the scope order being, from top to bottom:
function scope -> parent function(s) scope (if any) -> instance of the class calling the function -> static instance of the class calling the function -> global scope
Notice also that the scope chain can have more levels depending on class inheritance.
Now here comes my question:
I've been playing with JPEXS Free Flash Decompiler and RABCDAsm, and I have a class called Global
in a package called Data
. The class does not extend any other classes, but implements one interface. Within this class, there are normal methods and static methods. I have noticed that the static methods have initscopedepth
set to 3 and the normal methods have initscopedepth
set to 4. (Note: these values were set by the compiler, as explained in the AVM2 Overview document, chapter 4.11).
My guess is that the initial scope is:
method -> instance of class -> static instance of class (static variables) -> global
But I am not sure and was wondering if anyone could confirm this.
This also leads me to another question. All the methods code
block, both normal and static, start with the code:
ANSWER
Answered 2020-Jul-05 at 17:52All right, I believe that I've figured out the answer after some more research and thinking. The key to the puzzle was figuring out two more things.
- All classes extend the
Object
class by default, as explained in this book. - On method entry, the scope stack is empty and has room for
max_scope_stack
values, as explained in chapter 3.3.3 of AVM2 Overview.
Therefore, the initial scope depth is:
global -> Object class -> MyClass class (static instance)
And thus, the initial scope depth in this case is 3. I have noticed that functions outside classes have initial scope depth of 1 (the global scope only). And methods that are not static have initial scope depth of 4 (they also have MyClass object).
Because the scope stack is empty when we enter a method, and because register 0 holds the this
object (which is the static instance, in the case of static methods, or the class itself if you prefer), we must push this object onto the scope stack so that we can access all the variables and methods on its scope chain. We have of course the scope of the method itself, which makes the max scope depth to be 4.
QUESTION
Anyone knows how to decompile .SWF file?
I have tried JPEXS and Sothink SWF Decompiler but it not working.
I put this .swf
in this link.
Thanks.
...ANSWER
Answered 2019-Mar-15 at 23:36The SWF is not opening with JPEXS because it is compressed!!.
The first thing you should do when a file (eg: swf, jpeg, mp3, mp4) does not open in any program, is to check if the format bytes are correct by using a hex editor.
Checking your file bytes:
Usually a SWF file begins with bytes 43 57 53
(eg:"CWS"
) or even bytes 46 57 53
(eg: "FWS"
).
Your file begins with
78 DA 00 43 40 BC BF 43 57 53
(the last three bytes are the expected43 57 53
of a normal SWF).Those first two bytes
78 DA
means it has some ZLib compression (eg: like a.zip
file).
Solution:
Two options to decomress ZLib. One is by AS3 code and the other is by external (Windows) tool.
Option 1) Use AS3 to decompress.
Get the library AS3ZLib and copy its
as3zlib
folder to same place as your Flash project.as
files. (Find folder at:src/com/wirelust/as3zlib/
).Load (or read) your SWF file's bytes into an AS3 bytearray called
fileBytes
.
Try this code logic:
QUESTION
Im using vaadin-maven-plugin:8.1.2 because I want to have different widgetset than default one. When I compile widgetset (by Vaadin eclipse plugin) I get this:
...ANSWER
Answered 2017-Aug-29 at 11:57I spend like few hours dealing with it, when it was just about putting generated AppWidgetset.gwt.xml file to src/main/resources.
QUESTION
I decompiled *.swf file, with JPEXS Free Flash Decompiler 10.0.0
to add new funtion, save strings to text file
Code:
...ANSWER
Answered 2017-Feb-11 at 20:55Flash CS6 > menu File > Publish Settings.
At the top right corner there's a Target dropdown list. You should pick an option with AIR int it, otherwise AIR classes won't be available and Flash won't compile the code that uses AIR classes.
Then, you are to import classes, not packages:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install jpex
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page