Category: Flash

  • AS2 Quick Primer: It’s Not Hard Or Slow To Do

    I know their are other primers out there (<a href=”http://www.person13.com/articles/index.jsp”>Joey Lott: ActionScript 2.0 Primer</a>, <a href=”http://www.ultrashock.com/tutorials/flashmx2004/as2-01.php”>Dave Yang: ActionScript 2.0</a>) but I think it is my duty do provide this information as simply as possible because of the current agitated feelings of AS1 vs AS2 (<a href=”http://www.waxpraxis.org/archives/000133.html”>case 1</a> and <a href=”http://www.waxpraxis.org/archives/000134.html”>case 2</a>). My goal is to show it’s relatively easy to write AS2, flexible enough so you don’t have to immerse yourself 100% to consider yourself coding in AS2 100%, and not slow to develop with. I’m going to try to do something I never do: Be succinct and not use slang (still using contractions, though).

    <strike>I don’t think this is <a href=”http://www.powersdk.com/ted/2003_10_01_archive.html#106735376547742843″>ego-driven crap</a></strike>, I think people have a lot of time they have invested in learning Flash, which many use to do their job, get their paychecks, and pay their bills and feed their mouths. This is a very important subject for us using Flash in our daily lives as well as those, like Branden, who probably invested a lot of physical and emotional time up front, and therefore, have a lot invested in it all.
    <code>
    AS1 – Simple Class

  • Today’s Neat F2k4 Style Property: modalTransparency

    Went digging and found this neato property:

    _global.style.modalTransparency = 50;

    When you create a pop-up (remember my disable the entire movie code?), it creates a fullscreen movie clip so you can create modal dialogues. However, I couldn’t see it, and thought that was kind of dumb, so went looking to see how the PopUpManager created it. It’s a lazy use of a property; if it’s there, it uses it. So, if you do the above, it’ll be a hazy white. Pretty cool!

    Full kizz-node:
    – put a Button on stage
    – put an Alert on stage
    – delete the Alert
    – use this code on frame 1

    import mx.managers.PopUpManager
    import mx.controls.Alert

    _global.style.modalTransparency = 50;
    PopUpManager.createPopUp(this, null, true);

    Optionally, you could replace null with Alert, but the point here is just to see the transparency difference. One thing of note, however, is you cannot “animate” using this property. I tried an onEnterFrame of it, but it merely sets the mc’s alpha via this property, nothing more. If you wish to animate the modal blocker’s alpha or color, you’ll have to get a reference to the mc by modifying the createPopUp method to return a refernce to the movie clip. Just don’t distribute the code… it’s against Macromedia’s EULA, hehe!

  • Media Temple Goes Flash… partially

    <a href=”http://www.mediatemple.net”>Mediatemple.net</a>, my hosting provider, orignally had their website done in HTML and these phat CSS based menu’s. This morning, looking to see how to get my email to work with Outlook Express, I noticed their menu is now done in Flash, as is the frontpage.

    I don’t see the point in doing the front page elements in Flash other than cool factor, but I do see the point in doing the menu; with all the issues I’ve had with getting CSS + JS to work on multiple browsers and platforms (with such a simple thing), I’m thinking their logic was that it will always look the same. Anyway, I like it.

  • DataProvider Metamorphisis: A Parasite That’s Straight Jacked

    I don’t read much. From disregarding instruction books on my Nintendo games to only touching the new <a href=”http://www.macromedia.com/devnet/mx/flash/”>DevNet</a> articles when I want confirmation in my hard won beliefs. I feel I learn better through doing.

    So, I figured I’d give the DataProvider a try with the new components in F-two-Fo (F24/Flash 2004). I breifly scanned over the intructions as I couldn’t get a simple List to update with my DataProvider’s information. I liked the simple way of setting it’s property to the DataProvider instance, but… it still didn’t work. Since they documented modelChanged, I thought maybe I had to broadcast it myself, or maybe subscribe the List as a event listener manually; no dice. After actually reading, it seemed I was doing everything correctly.

    So, I naturally asked <a href=”http://www.erikbianchi.com/”>Erik</a>; if I can’t figure something out, and still can’t after actually RTFM, Erik is my first choice of help. After discussing last night’s <a href=”http://www.dayofdefeat.com/”>DoD</a> excursions while Erik pounded away, he reached the same point of “wtf” that I did. The DataProvider.as file was kind of whack too.

    Erik kept mentioning that he read and interpreted the docs as saying the DataProvider was nothing but an API; basically just an interface not actually holding any data (because the Array’s worked). I then re-read the 2nd paragraph if the List’s dataProvider description (I think that’s where it was). It turns out that the DataProvider simply extends the Array’s prototype so all Array’s now have the DataProvider methods (addItem, removeItem, etc). We tried it and it worked.

    Why does weird shiot always happen on Friday’s?

    So, in conclusion, DataProvider used to be a class in which to hold all of your data. Now, it’s just a (don’t know the pattern name) an API that’s added to Array’s. So you create an array, but use the DataProvider methods on that array.

    Uh, yeah. If this is already covered on DevNet, whoop-pu-dee-dooooooooo…