Archive for February, 2009

Master Collection dead drop London

London your time has come. I have just finished filling the dead drop so get cracking and be there first. The drop in Amsterdam was very interesting to say the least and I have no doubt that this one will also be very entertaining. The copy that I dropped was a Mac version but you will be able to exchange it for a Windows version of you need to. Everything you need is in this post. I am in town for Flash Camp London and I hope to see you all there tomorrow. I’ll be giving a session covering all of the new features in Flash CS4. There are also many other great speakers lined up and I think there are a few spots left.

Good luck London!
Lee

The Amsterdam Drop Explained

So the dead drop in Amsterdam is now over and I’m pretty sure I won’t be able to stay at a Radisson ever again. The first step was obviously to extract the secret message out of the BMP file. A couple of people actually found an existing tool on Windows that extracted it but at least one person wrote a custom ActionScript solution to get the clear text out of the image. The secret text was as follows:

—-[ GPS location (52.370067, 4.896679) - Wall to the left of room 617 - Need UV ]—-

Once arriving at the 6th floor you needed to illuminate the wall with UV light recover the next piece of information. The text on the wall read:

http://leebrimelow.com/lsb.html
key = doritos1973

You then had to go to that URL and type the key into the Flex application to decrypt the AES-encrypted message. This message was as follows:

It is under the 6th floor ice machine at the same hotel. There may be more than one ice machine. Once found follow the instructions in the note to get the serial number from me.

Now here is where it gets interesting. This morning someone who had gotten the first clue came into the hotel and asked if he could search for the software. The hotel security was having none of it and removed him from the building. Throughout the day there were other people at the hotel who had gotten the first clue but couldn’t find the UV writing. Security was apparently not very amused with this drop.

When I came back from FITC I was looking through my peephole at people walking back and forth across the 6th floor. I went out a little while ago to get something to eat and when I returned I was met outside the hotel by a man who said he had found the software. It wasn’t under the ice machine but rather at the front desk. Apparently the hotel staff or security had somehow found the software during the day. My guess is that once all these people came to the hotel saying that they were here to find something, security did a search because it was very well hidden.

The guy who found it was smart to simply go up to front desk and ask for it. So then we walked upstairs so I could show him the UV writing and while there we ran into a guy who had been here almost all day. He had written a custom ActionScript decrypter for the BMP file, went out and bought a UV light, and used the hotel computer to get the final message. I decided that I had to also give him a copy for his amazing effort.

Thanks to everyone for taking part and if you didn’t win then I hope you at least had a good time. This was by far the best drop yet and the staff finding it added some unexpected complexity.

Update: The co-winner, Bertrand Larrieu, sent along the ActionScript he wrote to retrieve the text. Much cleaner than my code which I’ll also be posting soon.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/**
 * @author lab9 - Bertrand Larrieu
 * @version 1.0
 */


package  
{
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.net.*;
    import flash.utils.ByteArray;
   
    public class Drop extends Sprite
    {
       
        private var loader      :URLLoader
        private var bytes       :ByteArray
        private var translate   :ByteArray
       
        public function Drop()
        {
            loader = new URLLoader();
            loader.dataFormat = URLLoaderDataFormat.BINARY;
            loader.addEventListener(Event.COMPLETE, complete)
            loader.load (new URLRequest("stego.bmp"))          
        }
       
        private function complete(e:Event):void
        {
            trae ("youpi");
            bytes = loader.data as ByteArray;
           
            translate = new ByteArray();
           
            bytes.position = 54;
            var dec:int = 7;
            var b:int = 0;
            var lsb:int;
            for (var i:int = 0; i < 857280; i++)
            {
                lsb = bytes.readByte() & 1;
               
                b = b | ( lsb << dec);
               
                if (dec == 0)
                {
                    translate.writeByte(b);
                    dec = 8;
                    b = 0;
                }      
               
                dec --;
            }
           
            trace (translate.length);
            translate.position = 0;
           
            trace (translate.readMultiByte(translate.length, "iso-8859-1"));
        }  
    }  
}

London you’re next :)
Lee

New snippets panel for Flash CS4

Many of you will remember my snippets panel that I released a while back for Flash CS3. Well I have rebuilt it from scratch for Flash CS4. First of all I wanted to build it in Flex so I could take advantage of all the nice layout stuff. I also skinned the panel so it looks right at home with the other panels. Lastly I simplified the panel quite a bit to avoid bugs. All you do is click Edit XML and you will be able to edit it inside of Flash. When you are done just click Refresh to update the panel. The XML structure has also been changed to use CDATA sections for the code which makes it easier to create new snippets. You should be able to figure it out by looking at the XML file. Now it is important to note that the old panel will work in Flash CS4 and this version will work in Flash CS3.

To install, download the ZIP file and extract the contents to your WindowSWF directory. You can find that directory at the following locations:

Mac: /[USER]/Library/Application Support/Adobe/Flash CS4/en/Configuration/WindowSWF

Windows: \Documents and Settings\[USER]\Local Settings\Application Data\Adobe\Flash CS4\language\Configuration\WindowSWF

On Windows the path may be slightly different based on your OS. I’m sure you can do some investigation and find the directory.

Enjoy!
Lee

Master Collection dead drop – Amsterdam

Update: This drop has been found.

The latest software drop is now up for grabs in the wonderful city of Amsterdam. I’ve upped the ante on the difficulty this time as there are so many talented Flashers in town at the moment for FITC. The location can be revealed by finding the message embedded into the this image file. This was not done with any existing tool and instead was done by me using some custom ActionScript. This method of hiding messages, known as digital steganography, is a widely used technique for concealing information. The method I used is known as LSB steganography and only the last bit was manipulated in this case. That is all the information you get. The software is for PC but you will be able to exchange for a Mac version if you need to.

Good luck Amsterdam!
Lee

What is the F4V format for?

During my preparation for the Flash CS4 workshop that I’m doing I started to look at a new Flash video format called F4V. So what is the F4V format? Basically it is Adobe’s wrapper for H.264 video. So why do we need this wrapper for an open standard like H.264? Well it turns out the answer is to overcome some of the limitations of H.264 like the inability to embed cue points. I can imagine in the future that we may try to add alpha channel support which H.264 also doesn’t support.

So this proprietary wrapping makes total sense but unfortunately the cue point functionality doesn’t really work. When encoding a video in Adobe Media Encoder I chose the F4V format and then added an event cue point just like I would with FLV. When I then imported the video into Flash and loaded it into the FLVPlayback component I even saw the event cue point in the component inspector. At this point I was really happy. But then I wrote the standard cue point event handler but the event never fired when it hit the cue point.

Rich Shupe saw one of my tweets about it and emailed a way to actually respond to the cue point. The solution was to respond to the XMP data event of the NetStream class. The code sample is listed below.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
package {

    import flash.display.Sprite;
    import flash.media.Video;
    import flash.net.NetConnection;
    import flash.net.NetStream;
     
    public class F4VCuePoints extends Sprite {
   
        private var _vid:Video = new Video();
         
        public function F4VCuePoints():void {
            var nc:NetConnection = new NetConnection();
            nc.connect(null);
             
            var ns:NetStream = new NetStream(nc);
            ns.client = this;
             
            addChild(_vid);
            _vid.width = 200;
            _vid.height = 140;    
            _vid.attachNetStream(ns);
             
            ns.play("scaly.f4v");
        }
                     
        public function onMetaData(info:Object):void {

        }
       
    public function onXMPData(info:Object):void {
            var xmpXML:XML = new XML(info.data);
           
            // parse using Namespaces
            var xmpDM:Namespace = new Namespace("http://ns.adobe.com/xmp/1.0/DynamicMedia/");
            var rdf:Namespace = new Namespace("http://www.w3.org/1999/02/22-rdf-syntax-ns#");
           
            var cueFrameRateString:String = xmpXML..xmpDM::Tracks..rdf::Description.@xmpDM::frameRate;
            var cueFrameRate:Number = Number(cueFrameRateString.substr(1,cueFrameRateString.length));
            trace("frameRate for DVA Ticks divisor:", cueFrameRate);
           
            var cuePointList:XMLList = xmpXML..xmpDM::markers.rdf::Seq.rdf::li;
            var len:int = cuePointList.length();
            trace("number of cuePoints:", len);
            for (var i:int=0; i < len; i++) {
                var cueXML:XML = cuePointList[i];
                    trace("\tname:", cueXML.@xmpDM::name);
                    trace("\ttype:", cueXML.@xmpDM::cuePointType);
                trace("\tstartTime:", cueXML.@xmpDM::startTime/cueFrameRate, "\n");
            }
        }
    }
}

Big thanks to Rich for passing this along. It is ridiculous that we have to write that amount of code to respond to F4V cue points. I am hoping that this implementation is not quite finished and we are planning to make it easier in the future.

Update: I have confirmed from an internal source that if you create a navigation cue point on an F4V file, it does not add a keyframe into the video file at that point. Until this is fixed I would advice simply using regular H.264 files with AS cue points.

Lee

Introduction to Flex tutorial (part 2)

I just uploaded the second tutorial in the introduction to Flex series. This time I show you how to create a custom Flex component and use it as an item renderer for the list component so that it displays the user’s profile image next to the Twitter message. I decided to add this tutorial in the series before we get to styling and skinning as the item renderer concept is a very important one to learn when developing with Flex.

Lee

Pixel Bender basics on Adobe TV

Here is a video that I did a while back for Adobe TV. It walks you through how to create a simple Pixel Bender filter and then incorporate it into Flash CS4. Very similar to what I showed on gotoAndLearn but it’s still worth a look.

Lee

Next Page »