So, I’ve been playing with XPath lately. Checked out the implementation at xfactorstudio which is pretty nice.
Then I discovered that the data binding classes have their own xpath implementation right in Flash. You just need to drag a copy of the data binding classes symbol into your library. Do a search for XPathAPI + Flash and you’ll find info on how to use it.
However, every reference I saw to the XPathAPI said it has only two methods: selectNodeList and selectSingleNode. I thought there might be more. A simple for-in loop revealed that there was. So I cracked open ASV and here’s what we have:
Read more...Use components?
Build components?
Hate components, love components?
Can’t get your components question answered on flashcoders?
“Alias” from flashcoders (sorry, don’t know your real name) has set up a new mailing list just for components. Check it out:
https://proalias.com/mailman/listinfo/flashcomponents_proalias.com
Read more...When I first got my hands on Flash MX 2004, over a year ago, I thought AS2, new components, all the other stuff was cool, but JSFL just totally blew me away. So much so that I decided to write a book on it. I knew that once MX 2004 was released to the masses, they would all be swooning over JSFL and vast libraries of new extensions would appear on the web.
Read more...Coming soon, a new set of components I’ve been working on. There’s 30 in all. AS2. Designed with ease of skinning and styling in mind (the two things I hate most about MM’s components).
Here are a few samples – not all the components, but most of them:
Base skin
Blue skin
Green skin
Red skin
Flat skin
The base skin is the way they look “out of the box”. The others are skins I whipped up pretty quickly, and will be included in the package.
Read more...One question that continually gets asked about JSFL is “How do I import a jpg or sound via JSFL?” And the answer is always, “You can’t.”
But wait!
Peter Elst recently asked just that question recently on the Extend Flash list, and of course got just that answer from myself and others.
However, he dug in and came up with a sort of a solution! Here’s the code he posted:
fl.openFileDialog(); fl.getDocumentDOM().selectAll(); fl.getDocumentDOM().clipCopy(); fl.getDocumentDOM().close(false); fl.documents[0].clipPaste();
Basically it opens a file dialog where the user can select the resource he wants to import. He’ll have to change the file filter to *.* in order to see all the files.
Read more...I don’t do a lot of work with video, and I was under the impression that you needed the Media Components in Flash MX 2004 pro to dynamically load and play an FLV file unless you were using FlashCom server.
But I was doing an app that needs to have very basic FLV playback capability, and I needed it to be lightweight, and preferably not UIComponent based. So I dug into the mx class files and saw how they did it and was able to recreate it very simply. I then searched for “FLV” in the Flash help and found almost the exact same code I had just written.
Read more...Didn’t get any real resolution to my last post. But kind of worked out what is going on. When you have an symbol in the library exported first frame, apparently those classes are also exported for the compiler.
Apparently when you reference a class, the compiler first looks in the class path for that class, and if found, it will use that class for type checking. Failing to find the class in the class path, it will check any classes that are exported first frame from the library, and if found, will use that.
Read more...Posted this on Flashcoders, no solution yet.
I have a component that I created, not based on UIComponent. Class is com.bit101.controls.Button.
I export the swc and give it to someone else who does not have my classes. It works fine. They can even use data typing with it, and import my Button class, as long as it is set to export first frame.
If they turn off export first frame, even if there is an instance of the clip on stage, the classes aren’t available to the compiler for importing or checking. The component continues to work just fine. It can see its own classes.
Read more...Just thought I’d share a project I did some work on.
The site is a mix of tweens and Actionscripted Kinematics. The interactive, walking portion is what I did. It’s all AS2 classes. A pretty fun project.
Read more...On the heels of my incredible crashing aqua button script, I thought I’d share a little undocumented JSFL stuff.
The reason the script was crashing has to do with the fill object in JSFL. The help lists four properties of this object:
color
colArray
posArray
style
style can be “solid”, “radialGradient” or “linearGradient”.
color is the color for a solid fill and colArray and posArray are for gradients.
The help doesn’t mention the matrix property, which is used to control the size and direction of the gradient.