Sometimes when using the autoSize and wordWrap properties with a dynamic TextField there is a tiny delay in it resizing and wrapping everything. It’s so fast that you won’t see it happen. Now if you have some other items immediately following the resize they will not be able to read the updated height correctly. I had this problem tonight with a dynamic vertical menu I’m putting together. The menu has a fixed width and I have to assume that some menu items will be too long to fit that so I need to wrap the text.
Continue reading “Fixing the Flash autoSize delay problem”
Recently I sent over a few Flash 8 source files to a friend at his company. There was one main Flash .fla file and a few external classes stored in seperate .as files. When they tried to publish them on their Mac they received a series of errors like this:
**Error** GoodbyeWorld: Line 5: The name of this class, ‘GoodbyeWorld’, conflicts with the name of another class that was loaded, ‘GoodbyeWorld’
They had one for each of the classes, obviously substituting “GoodbyeWorld” above with each classes name. I was using Flash 8 on a Windows XP system, he was using Flash CS3 on Mac OSX, I could publish it just fine as could the other Windows XP systems in his company. My first assumption was that it was the PC/Mac barrier. If you thought the same then you’d be wrong as well 😅
The next day I was down in the office anyhow so I had a bit of an experimentation with the systems. Blam! Got the same error on one of the Windows systems within a few minutes of testing. For an unrelated reason I had the directory view set to “Details” so I had the modified time/date right there in my view. I noticed it said 11:34 whilst my local clock was showing 11:29. It turns out that everyone there works on a shared network drive. When files are saved on that disk they have their “modified” attribute set by the system that the drive resides on. Turns out that the clock on that system was slightly ahead by a few minutes. I simply set my local clock to be a few minutes ahead of the file server and the error stopped occuring. As soon as his Mac updated its time the next day using an NTP server the problem went away there as well. This error happened on both Flash 8 and Flash CS3 on both Windows XP and Mac OSX. All are updated with the latest patches. So as the title says; Flash hates the future 😋
I’m working on a custom skin for the FLVPlayback component. The design requires a play button with a pause button next to it at all times. All the provided skins use the dual PlayPauseButton system. That’s where you have a play button and no pause button. When you press play it switches to become the pause button. Then when you pause it returns to being the play button. The Adobe LiveDocs say:
If you want to have separate Play and Pause buttons, rather than a combined Play-Pause button, simply place the play_mc and pause_mc clips on the Stage without wrapping them with a playpause_mc clip.
The actual process is this:
- Delete the playpause_mc instance off the stage altogether
- Drop an instance of your play button and an instance of your pause button in it’s place
- Inside the AllLayout clip place your play and pause buttons as you want them to appear
- Now here’s the critical part. Make sure to give them the instance names play_mc and pause_mc
- If you don’t do the last step then the skin won’t show up at all when you view the actual FLVPlayer, it will look fine when you preview the skin though
Setup my first sourceforge project today. It’s for the Stargate Atlantis DHD Simulator project that I’ve been working for the past year or so. Amazing how time flies. In the beginning it was going to be a closed source project but as time passed I decided to make it open source under the GNU General Public License so hosting it at Sourceforge seemed like the ideal move.
Shared libraries are a great concept for Flash. You can store items that get used in several movies in a single file and then load them into the parent movies as their needed. I’m going to show you how…
In my Stargate Atlantis DHD Sim project there is a main movie called “dhd”. That has 36 graphical symbols in it that get used for the symbol buttons. Now I want to use those same symbols in a couple of other projects. Instead of just copying and pasting them into each project I think it will be much nicer to have a single .fla file for the symbols and then to dynamically share them with the other projects. This means when I want to update the symbols appearance I can do it in one place and the changes are automatically picked up by the other movies.
Continue reading “Flash Shared Library Assets Gotcha”
“How can a Flash file see the address of the page its on?”
Get asked that one quite a lot. I’ve put some thought into it and have begun toying with a few ideas.
Continue reading “Handy Flash Domain Reading”
In my last post I described the problem that the new update for IE poses for Flash developers. Well ok, it’s not really a problem but more of an inconvenience for our end users. My final note was to say that I was looking forward to seeing Adobe/Macromedia’s solution as I was dissatisfied with Microsoft’s “Use JScript” solution. After waiting what seemed like an eternity i.e. 3 months Adobe/Macromedia have finally released their solution. You can check it out here.
Continue reading “Microsofts update to Active Content in IE Part II”
I was going to post this a while ago but I thought I would give it some time to see if a decent solutions was released by Microsoft or Adobe/Macromedia. Recently Microsoft released an update for Internet Explorer which disables active content until the user directly interacts with it. This covers a range of areas although the only one to affect me so far is Flash based content. As far as I know the update isn’t in their “high risk” zone so on the most part it will only be applied by people who perform a manual Windows Update and select everything.
Continue reading “Microsofts update to Active Content in IE”
If you’ve been having trouble getting anything to appear when using the loadBitmap() function then chances are you’ve made a simple mistake. The documentation says to use the linkageId of a library object as the sole argument for this function i.e:
var myBitmap:BitmapData = BitmapData.loadMovie(“libObjectId”);
The key to using this function is that you have to attach an actual image object from the library; so say you’ve imported a jpg/png there, give this a linkageId and use that. Don’t drop an instance of the image into a movieclip/graphic object and give that an Id. That would be the reason it didn’t work. Be warned: you wont get an error message telling you it didn’t work, your bitmap will just be blank.
A lot of people in the DevShed Flash forum ask how to change the icons associated with Flash Projector files. There’s a whole slew of commercial applications to do this but there’s one free solution that is really simple to use. I hadn’t really thought of using it for just changing program icons but then it hit me the other day when someone asked, yet again, how to do this. This is a slightly modified version of my thread post, its aimed at Flash Projector .exe files although it can be used for any Windows executable.
Continue reading “Change Flash Projecter Executable Icons”