-
Actionscript 3, postproduction
Flash 9? Interesting Flex swf format...
I tested Flex made SWF file and decompiled with Flare, something interesting like:
1. The file version now: flash 9
2. No ActionScript code disclosed any more. (Really!?! If it's true, excellent for us and we have to preorder Flash 9 or Flex 2 right now!)
Last edited by georgecalgary; 10-21-2005 at 02:06 AM.
-
Senior Member
Originally Posted by georgecalgary
2. No ActionScript code disclosed any more. (Really!?! If it's true, excellent for us and we have to preorder Flash 9 or Flex 2 right now!)
Flare cant decompile actionscript? That can be expected if they have built completely new engine for AS3. It wont take long before decompilers get updated.
Or are you saying there is no actionscript whatsoever?
-
Actionscript 3, postproduction
I'm not sure. But I know Flare could decompile SWFs made by MX2004 and then Flash 8 the same.
I tested with Flasm as well, no any low level code!
I sent a message to no|wrap.de and hope they could have the answer soon. Personally, I hope it is true!
-
Flash 9 is still a ways away. I assume you mean Flash Player 8.5.
FP8.5 is built off a totally new 'Virtual Machine'. Of course the decompilers can't get into them yet, it's only been out for a week and they havn't had a chance to get to it. Not to mention it's still in Alpha.
SWF will remain an open format, so don't get your hopes up.
-
Actionscript 3, postproduction
Originally Posted by gSOLO_01
Flash 9 is still a ways away. I assume you mean Flash Player 8.5.
FP8.5 is built off a totally new 'Virtual Machine'. Of course the decompilers can't get into them yet, it's only been out for a week and they havn't had a chance to get to it. Not to mention it's still in Alpha.
SWF will remain an open format, so don't get your hopes up.
yes, you're right. Mr. Kogan of nowrap.de replied that.
-
There are still ways to protect your code using the new bytecode that AVM+ interprets. Loader.loadBytes allows you to execute binary code, you can load this code from anywhere Although i havent tested it properly yet.l
-
Senior Member
Originally Posted by FlashGuru
There are still ways to protect your code using the new bytecode that AVM+ interprets. Loader.loadBytes allows you to execute binary code, you can load this code from anywhere Although i havent tested it properly yet.l
Could we see example of that, please? I dont understand yet the logic how you could execute binary code not included in swf. Is that only possible if you use "binary sockets"?
-
Sure.
Heres an example, that gets the raw bytes of a bitmap, encodes those bytes into the jpeg file format using a JPEGEncoder that Tinic Uro of Macromedia wrote, and then uses Loader.loadBytes() to convert those raw bytes into the proper type of file that Flash can display. Which in essence is pointless, because you are adding a further step which isnt necessary to display a JPEG inside the player, but this goes to show that you can create objects that Flash supports (SWF's,PNG'S,JPEG's,GIFS) directly from raw bytes.
Code:
package
{
import flash.display.MovieClip;
import flash.util.*
import flash.display.BitmapData
import flash.geom.Matrix
import flash.display.Loader
public class TestLoader extends MovieClip
{
[Embed(source="guy1.jpg")]
private var TestBitmap:Class
private var myBitmap:BitmapData
public function TestLoader()
{
var b:TestBitmap = new TestBitmap()
myBitmap = new BitmapData(b.width,b.height)
myBitmap.draw(b,new Matrix())
var j:JPEGEncoder = new JPEGEncoder(100)
var bytes:ByteArray = j.encode(myBitmap)
var l:Loader = new Loader()
l.loadBytes(bytes)
this.addChild(l)
}
}
}
-
Senior Member
Thank you, Guy
I am still not quite sure if I understand it correctly. When loading "raw bytes", does it get cached somewhere like normal swf files? And if it does, what would it show if someone would look at it directly?
-
Raw bytes dont get cached, no.
-
Flashguru,
I've tried your TestLoader with Tinic's .as jpeg encoder but I'm unable to get this compiling without errors. I'm sort of new, make that very new to Flex as I primarily work with Flash but I'd love to get this working.
I downloaded Flex 2 and can get simple .as projects or Flex projects running, but I simply don't get how to do this with what seems to be two .as scripts.
Do I make a Flex or Actionscript project? Any help would be greatly appreciated. Maybe even a simple blow by blow as to how to create this.
Thanks in advance and thanks for the GREAT work.
astarace
-
Actionscript 3, postproduction
Originally Posted by astarace
Flashguru,
I've tried your TestLoader with Tinic's .as jpeg encoder but I'm unable to get this compiling without errors. I'm sort of new, make that very new to Flex as I primarily work with Flash but I'd love to get this working.
I downloaded Flex 2 and can get simple .as projects or Flex projects running, but I simply don't get how to do this with what seems to be two .as scripts.
Do I make a Flex or Actionscript project? Any help would be greatly appreciated. Maybe even a simple blow by blow as to how to create this.
Thanks in advance and thanks for the GREAT work.
astarace
I'm not so deep in Flex but I might know a little bit about them. Not know whether could help you.
You should include or import .as packages to use external classes.
Include AS inline of MXML or AS class:
Code:
#include
<mx:Script source="filename">
Import AS into MXML:
Code:
<mx:Script> import ...
Notice this: the Flex compiler transforms the main MXML file and its child files into a single ActionScript class. As a result, you cannot define classes or use statements outside of functions in MXML files and included ActionScript files.
-
The code is for an Actionscript Project, not a Flex project.
-
George,
Thanks for the quick help. I tried what you posted and I gotta little further but won't compile cause of errors.
Flashguru,
Thanks for the advice on making it an Actionscript file, I took your post and used it as the default .as file, then I dl'd tinic's jpeg script and added it to the project as an actionscript file...............
Won't compile, because of errors like...
>>>Access of undefined property JPEGEncoder<<<
>>>Time annotation is not a compile-time constraint: JPEGEncoder
I'm really not that fimiliar with this Flex and all of you are just so amazing at it. I just want to see if I can pull a jpeg to see if I should continue going down this road with Flex. From what I can see Flex and AS3 can really do some amazing things.
Are you guys Master Magicians?
I'll still be banging my head, but just for a bit.
astarace
-
Use JPEGEncoder: http://www.kaourantin.net/source/JPEGEncoder.as
While this may help to obfuscate your code &c, in the end it's still just embedding the resource in the swf which will more than likely be obtainable by future decompilers.
-
solo,
That's what my problem is. I'm trying to use Tinic's JPENEncoder.as script and I just can't get it working.
Has anyone gotten Tinic's jpencoder script to work?
Thank you
astarace
Last edited by astarace; 11-08-2005 at 11:57 AM.
-
Nope, like i said you can load the code in binary form over a socket connection, thus the code is never in the .swf file.
-
I believe that's what tonypa wanted to see an example of...
-
FlashGuru,
I'm still fumbling on trying to get this JPEGEncoder to work!
***Can I pay you to create a working Flex Project for me?***
Like I said earlier, I'm really a Flash guy and all this AS3 stuff is killing me, and I just want to see this work so I can further develop with FLEX, of I'll just go back to Flash and look for another solution.
Thank
Starace
-
Retired SCORM Guru
Originally Posted by georgecalgary
2. No ActionScript code disclosed any more. (Really!?! If it's true, excellent for us and we have to preorder Flash 9 or Flex 2 right now!)
Supposedly entirely new AVM (Actionscript Vitual Machine) with FP 8.5 ... well I guess it's officially going to be 9 ... which is why the decompilers can't handle it yet. AS3 probably gets compiled different. (Though if it really does thrwart decompilers that'd be awesome.)
Dunno if I saw it on the labs site or somewhere else, but there was an example of using the ability to read raw bites to extract EXIF data out of an image straight from a digital camera. Pretty cool.
Last edited by PAlexC; 11-14-2005 at 12:51 PM.
"What really bugs me is that my mom had the audacity to call Flash Kit a bunch of 'inept jack-asses'." - sk8Krog
...and now I have tape all over my face.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|