Do you ever use invisible buttons? No shape except in the hit state. They are very useful because they show up as a translucent blue shape in the authoring environment, but don’t show up when published. You can apply them to existing graphics, such as imported bitmaps, to create buttons or hotspots.
The procedure is to create a rectangular graphic, convert it to a button, edit the button and drag the shape to the hit state frame, exit edit mode, size and shape it to where you want it.
Read more...Here’s what I’ve been working on instead of experiments.
I know there are some bugs, particularly with some of the older files loading in and not working. Feel free to give me the date of any experiment that doesn’t work and I’ll see what I can do to fix it up.
Please refrain from any comments on style. I’m not asking for them and I will ignore them anyway. I have more features planned for the site, but this is the base interface and I want to get that rock solid in terms of functionality before moving on.
Read more...Boy do I feel foolish. Not only can I not believe that I never knew this, but I can’t believe I never had a problem with this. I only now just discovered that the x, y point fed to hitTest must be in terms of the main Stage, or global coordinates. How did this escape me for so many years and how did this only cause a problem now???
This revelation came about as I am redesigning my site. I’ve always kept the main content window in the upper left corner, due to the fact that I always loaded the experiments into a level, not a movie clip. I had to do this because many of my experiments refer to _root, and some of them would be messed up if loaded into a clip. So I kept loading into a level and kept the level at 0, 0.
Read more...Ran into a strange thing today. Authoring an application on a Mac (already I’m in foreign territory), needed to use the font “Universal Greek with Math PI”. But when I make a text field and assign that font to it, nothing shows up. We’re not talking about an embedding problem or System.codepage problem. This is in the IDE. In a static text field. If I break the text apart to a shape, nothing is left on stage. Yet, I can copy the “non-existent” text and paste it into another app and see it. This is happening on more than one machine. Tried some other fonts, it also happens with “Universal News with Commercial PI”.
Read more...Well, I surprised myself and became addicted to PrimalScript. Seriously, the idea of creating a class and having the members and methods pop up when you create an instance of that class… too useful. A zillion other cool features too. It’s already saved me many hours.
With the $99 special (today only), I’ve decided to bite the bullet and grab the full version.
Handling scope issues and keeping the compiler happy in AS 2.0 classes has received a lot of attention on mailing lists and so forth in the last month or two. The following is some observations and results in trying to figure out the best methods of handling certain situations. I am by no means an OOP expert, so there might be some technical details that aren’t quite right here, but overall my final solution works, is clean and the compiler loves it!
Read more...A while back I published a pretty neat little AS 2.0 class for particle effects. I just cleaned it up a bit and made some minor changes to it, the biggest being that the motion code is now applied to an internally created clip, rather than directly on the onEnterFrame handler of the particle itself. This frees up onEnterFrame to apply additional code to.
Read more...Well, I’ve been using Primalscript for the last week, and I do have to admit that it has grown on me. Though it took some getting used to, the class browser is a fine replacement for code folding. Probably even better. ALL your classes and variables are listed right there, color coded. Not even just the ones in the current .as file, but in any files in the project.
PrimalSense is quite awesome, even parsing your homemade classes stored in the classpath.
I also do a lot of work with XML, and it’s nice to not have to jump into different editors for AS and XML. Yesterday I had to restructure a series of XML files. The search and replace of all open files was a life saver.
Tons of litle goodies there that it takes a while to find. I guess I’ll be saving my pennies to purchase a copy when the beta is over.
A while back I made a pretty cool 3D Text component for Flash MX. It was my first test at selling components. Didn’t do so well, but I still think it’s a damn cool toy that people might want to play with.
Since it’s a bit dated now, I’ve decided to give it away free. Download it here. This includes both the original version and the version two which is kind of half developed and abandoned. I may eventually make a v2 component version of it. Who knows?
Read more...I was playing with border styles today. I ran into this before as well – on any components that have borders, the help documents say that the following properties set various border elements:
borderColor a
highlightColor b
borderColor c
shadowColor d
borderCapColor e
shadowCapColor f
shadowCapColor g
borderCapColor h
with the letters referring to a diagram you can see in the help section. “a” refers to the very top bar of the border. Yet, setting borderColor has no effect on that top bar. After digging around through RectBorder.as buried deep in the skin classes folder, I found that “a” is actually set by the property “buttonColor”. Hope that saves someone some frustration.
Read more...