August 2, 2007
Need Pownce invites?
I have 5 pownce invites left, if you want some just leave me a comment ![]()
I have 5 pownce invites left, if you want some just leave me a comment ![]()
Often when I work in flash there is some content that is larger than visible area. So I need either to broke my content on several pages (frames), or to make it scrollable on visible area. Simplest solution would be to use ScrollPane component, but it adds more than 20kb on swf size, and often I just need two buttons to scroll my content up or down. So I created simple class that can make any two buttons act as scroll buttons (as long as you give tham right names and put them in movieclip). This looks something like this:
How to use simple scroll buttons:
1. Create empty movie clip on stage and give it some name, like myScroll.
2. Inside myScroll create two buttons and name them btnUp and btnDown.
3. Copy net/zoondev/controls/SimpleScrollButtons.as in your working folder (keep folders structure)
4. In library right/click on symbol that holds myScroll, select linkage
5. In Linkage properties select Export for ActionScript, and in Class type: net.zoondev.controls.SimpleScrollButtons

6. Create movieClip that will hold your content and give it some name, like myMC
7. Put your content in myMC. You can put anything inside it, even another movie clips.
8. draw rectangle that will represent visible part of your content on stage, create movieclip from it, and give it some name, like myMask.
9. Create empty layer on top, and put this code in it:
myMC.mask = myMask;
myScroll.init(myMC, myMask);
10. If flash throws an error when you try to compile movie go to File/Publish Settings/ ActionScript settings and uncheck Automatically declare stage instances
![]()
This is it
If you want to change scrolling speed you can pass two additional parameters in myScroll.init, so it will look like this:
myScroll.init(myMC, myMask, 30, 40);
First is number of pixels (how many pixels will myMC move), and second is number of milliseconds between two moves. Default values are 20 pixels each 50 milliseconds.
You can download SimpleScrollButtons class here, and sample here.
Here is list of tools I use during my work. Some of them I use on daily bases, some not so often, but they all make my work easier. I hope they will ease your work too.
Flash Develop
If you ever tried programming in Flash built-in code editor, you know how annoying it is. Coming from Delphi background (does anyone remembers Borland Delphi? It is still the greatest IDE I’ve ever worked in) I got used to code completion, class browser and all the other little tools, that made my life easier. And none of them was inside flash ![]()
So I spent my days both loving and hating my work until one day… I discovered Open Source Flash. And there… well there was (and still is) tons of great flash related stuff. And among all those tools was… Flash Develop. Flash develop is reason I moved my code from timeline to classes. And now life seems much easier to me
Ultra Edit (UEStudio)
Ultra Edit (and it’s advanced brother UEStudio) is greatest all around text editor I’ve found so far. It has tons of advanced features, like syntax highlighting, macros, FTP explorer… If you often make small code changes UltraEdit is tool for you. Great for quick tweaks of html, CSS, PHP etc. Even ctrl+space works
Service capture
If you work with any type of remotnig calls this is definitely tool for you. It resides somewhere between your app and server (your app and network connection to be more precise), monitoring and displaying all remote service call’s. So you can see all client app’s that make remote calls, server that receive calls, and most important, data sent in each call. Data is deserialized and displayed as object trees so it could be readable. It also have Bandwidth Simulation and URL to file mapping feature.
XAMPP
If you work with any typeof dynamical content your web site, you’ll need some server side programming. There are many possibilities, like ASP, Java, CF, PHP, Ruby(on rails) etc. I usually use PHP since it is most widely deployed, and there are bunch of great free scripts made for it. So instead of constant redeployment of my PHP script to my hosting, during development, I decided to install server locally for testing. I downloaded Apache, PHP and MySQL, installed them. and they didn’t work (or, at least, didn’t work together). Apache had to be configured, and (trust me, I tried), that is Sisyphean task. But luckily there is easier solution, named XAMPP. It is Apache, PHP, MySQL bundle, already configured, so all you need is just to install it. Great. And not to mention that it has Tomcat(Java) and Perl plugins, so you can easy extend it’s functionality.
SQLYog
This is like phpMyAdmin, but not in PHP
It is essential for me in early parts of development, when I need to create tables, and test my PHP scripts. Another great timesaving feature is possibility to migrate database from one server to another (from test server at localhost to deploy server at hosting provider). Only problem is that most of hosting providers don’t allow direct connections to their MySQL servers. But, in SQLYog enterprise you have http tunneling. All you need is to upload gateway script (in PHP) to your server, and connect SQLYog to MySQL trough it.
TortoiseSVN
Even if you don’t use Version Control in your workflow, you’ll still need tool like this. TortoiseSVN is subversion client that integrates in windows shell, so you can browse repositories and and use version control directly from explorer. With it I can finally download all that great projects at Open Source Flash and Google Code. If you want to completely integrate Subversion into your work process, there is great tutorial on Blitz Labs
UNLOCKER
Did you ever tried to delete some file, only to receive annoying message like: “This process is used by another application and it can’t be deleted”. Well not anymore. Unlocker finds all processes that use certain file, and release file from them. If file can’t be unlocked there is possibility to remove file upon next system restart. This tool can be extremely useful when you want manually to remove various kind of malware from your PC.
Process Explorer
This is ctrl+alt+del on steroids. It shows all processes currently running on your system, but you can also see which process called another, and all resources that each process use. Process Explorer shows you information about which handles and DLLs processes have opened or loaded. Good insight on how windows work.
Foxit reader
I have great respect for all Adobe products except one: Acrobat reader. It is huge, it is slow, and it is… it is more than 20 megs download. I know it is packed with bunch of cool and advanced features, like forms and stuff, but I don’t need any of them. All I need is some small tool so I can open and read PDF. And that’s where Foxit Reader comes in. It is small, and most importantly it is lightning fast. And if you want to extend it’s functionality there are plugins. I suppose plugins are something that Acrobat team at Adobe, never heard of :>
Total Commander Extended Pack
Total Commander is probably the best file manager for PC. It has tons of great features, like multiple file rename, built in packers and unpackers,file and dir compare, FTP client (only FTP client I use) etc. And shortcuts. In TC there is shortcut for almost everything. And with extended pack it gets even better. There are tools like registry browser, process manager, uninstaller, and some tweaking tools. And it can easily be extended with even more plugins. If you would like to use TortoiseSVN in TC install ShellExtension plugin.
IrfanView
I used ACDSee for a long time, but lately it become too overloaded with features for comfortable use. All I need is (again) some fast tool for image preview. If I want to edit image I’ll use Photoshop or GIMP. And IrfanView is just the tool for me. Almost all types of images are supported including some exotic types like CAD drawings and Corel Draw files. Bye bye ACDSee.
Windows Live Writer
Even a blind hen sometimes finds a grain. Even Microsoft sometimes creates good peace of software
Jokes aside, this is really great blogging tool. And, what is so unusual for Microsoft products, it supports all major blog types, not only Live Spaces. This post was written in it, so do I need to say anything more?
CTC Clatronic WTS 2804
No link here, this is just ultra fast water heater I use for making coffee
Did I miss something? Do you know for some other great time-saving tools? Or some programs that are better than those I use? Just leave me a comment, I’m always open for new improvements of my workflow.
I’ve been working in FD 3 Alpha last several days, and it worked nice and stable. There was some minor errors in code completion, and it needed some tweaking, but in overall FD 3 is great tool.
Beta should be even better. Download it here.
I’m working on some application for numerical analysis in Flex. One of the problems I had to solve is how to create Newton polynome from table with x and y values. While creating it I made some errors while addressing data, so I broke formula in bunch of traces to see where things went wrong. Then I found out this (look at the values trace returned, this was nonrelated to error I was looking for)
trace (tmp[j]) //1.221403
trace (tmp[(j-1)]) //1
trace(tmp[j]-tmp[(j-1)]) //0.22140300000000002 (wtf????)
That reminded me of first series of Intel’s Pentium processors. This look like small error, but because of similar error some patriot missiles missed targets during the first gulf war. Good thing is that I don’t work for army, so I can live with it. But bitter taste remains…
I really like Apollo. I know it is still in Alpha, and there are a lot of new features to be added, so I have a suggestion for Apollo team at Adobe: Add Neko Virtual machine to Apollo distribution.
Why Neko VM?
It would be great for Apollo to implement some features Neko provides, like Socket Server, threads, SPOD, MySQL and especially SQLLite support. With NekoVM it would be possible to create Apollo apps in Haxe, giving us another way to skin a cat.
I also believe it would mean a lot for Neko itself, and that I would finally be able to find some non-dedicated Neko hosting.
If you would like to learn more about NekoVM you should check out Haxe and Neko pages.
Tell me what do you think about this idea. If enough people thinks like me I’ll create some on-line petition, and I hope Adobe will listen to us ![]()
This happened to me while working on some flex based Apollo app’s. I used CursorManager.set/removeBusyCursor() and this problem appeared:
When in my app is Busy cursor and I switch to another application, hiding my Apollo app, if in meanwhile Apollo app remove Busy cursor, when I switch back to it, there is no cursor at all in it. Everything works, but default Windows pointer is invisible. I didn’t have time to test this error in flex created swf, so I hope this happens only in Apollo
Finally….. I’m on MXNA :) Well, this means I should write more often now
Like most people around here I’m also hooked on twitter.
Some time ago I started building my own twitter app in apollo, download api, and hit the wall on first step. Authorization didn’t work :(
So as usual I started googling for solution and… Nothing! Well not quite nothing, but all solutions depend on proxying twitter calls, and I didn’t want to load my server with unnecessary trafic
So I started searching for solution in code and… Here it is
Open twitter/api/Twitter.as.
Look for function twitterRequest. Inside that function is line:
var rArray : Array = new Array (new URLRequestHeader (”HTTP_AUTHORIZATION“, “Basic ” + login64));
change HTTP_AUTHORIZATION to Authorization so the line should look like this:
var rArray : Array = new Array (new URLRequestHeader (”Authorization“, “Basic ” + login64));
Voila :) Now Basic Authorization works, when you crate twitter object just authenticate with your username and password and all twitter calls should work fine. Example:
var twitter:Twitter = new Twitter();
twitter.setAuth(”username”, “password”);
twitter.loadFriends(); //now works
Incredible how simple (stupid) this error was ![]()
Well this is my first post ever. See you soon… ![]()