I’ve been making a lot of components lately and find myself constantly getting confused with the order of operations of Inspectable getters and setters. It seems that they work quite differently in Live Preview and in testing a movie. I’ve always gotten everything working eventually, but decided it was time I sat down and figured out what the heck was going on.
Let’s walk through a class. Here’s our simple class:
Read more...Need a recent file list? Add a list box named recentList and this code:
recentFiles = MMExecute("fl.mruRecentFileList;");
recentFiles = recentFiles.split(",");
for(var i=0; i
This button will create a new movie:
flaBtn.clickHandler = function(){
MMExecute("fl.createDocument('timeline');");
}
Read more...
OK, just threw this together in about 1/2 an hour. Implements a simple favorites list. Just make a swf, add a list component and three buttons. Name them fileList, addBtn, delBtn, openBtn. Put this code on frame 1:
so = SharedObject.getLocal("favorites");
if(so.data.favList == undefined){
so.data.favList = new Array();
}
favList = so.data.favList;
for(var i=0; i
Rename the existing StartPage.swf and save this fla as StartPage.fla in your StartPage directory and publish the swf. Close all files and voila!
Read more...
I’m not saying you SHOULD do this, but the fact that you can is pretty neat. The Start Page that you see when you first open Flash MX 2004 is simply a swf. It uses loadMovie to load in other data which is how it can tell you there is new help content or an updater, etc.
This swf is located in your configuration directory in the Start Page directory, named simply enough, “StartPage.swf”. Rename that swf (I strongly suggest you don’t overwrite or delete it!) and create another one with the same name in that directory. Bingo, a custom start page.
Interesting trick, maybe. But it could possibly have some potential. The important thing is that this swf is running in the authoring environment, and can therefore make use of MMExecute and JSFL! Wow, even as I’m writing this, I’m seeing some very interesting possibilities here! I may put together a few examples and post them later.
In PrimalScript 3.1, you can hit F7 to test your movie. Some editors use flush to communicate with Flash. Primalscript actually executes a JSFL file. It’s Program Files/Sapien/PrimalScript/JSFLs/compile.jsfl
Here’s what it contains:
fl.outputPanel.clear();
fl.getDocumentDOM().testMovie();
Pretty simple. But even better is that you can really simply add things to it. When I used to code solely on the timeline in the Flash IDE, whenever I tested I would save, then test. Now that I’m back and forth between Flash and PrimalScript, and often testing via F7 in PrimalScript, I often forget to save the fla for long periods of time. (PrimalScript automatically saves the AS file before testing.) Occasionally, Flash MX 2004 has been known to crash (ahem), losing what I didn’t save in the fla. So, I just added one line to the compile.jsfl file, so it looks like this:
Read more...I purchased SWF Studio a few weeks ago, and finally got a chance to play with it for a while the last couple of days. Here’s my first finished product, a digital clock that kind of wanders around the screen. It’s not as lame as it sounds. The digits kind of stream out, follow the leader, bounce around the screen, etc. in typical BIT-101 style. Kind of cool, IMHO. You can change the font face and size as well.
Read more...It seems that Mr. Tarbell has been quite busy indeed these days.
https://www.complexification.net
“Bit 10001” ? hehe!
Read more...One of the questions I get asked more than anything else is, “I did your gravity tutorial, and I have several balls bouncing around on stage. But how do I make them realistically bounce off of each other?”
This is a bit more advanced of a topic. First you need some kind of loop that efficiently checks all balls against all other balls for collision, with no double checking. Then you need the actual code to check if they are hitting. If you get a hit, you need to reposition the balls so they are not overlapping, then you need to figure out their resulting velocities. The last part is the toughest, and relies on the conservation of momentum, coordinate and vector rotation, and can vary with the mass and size of the balls.
Read more...It’s always like Christmas when Jared Tarbell finds the time to add some new stuff to Levitated!
My favorite. I’m a sucker for anything 3D in Flash!
[edit]
I don’t know. Now I think this might be my favorite! Yes, it’s definitely Christmas!
Well, finally got my advance copies of the book:
[About the book][1]
It should hit the stores within a week or so. Looks good. I’m proud of it.I hope it will spark the creation of a lot more extensions. Currently there are only a handful of people doing anything at all with Flash extensions. There is so much power there, I can’t wait to see what happens when the technology gets more well known.
Read more...