Words

Previous   Next

UIMovieClip Fix for Flex/Flash

Posted Jun 4 by shawn 15

Tagged withadobeflashflex

I was working with the new Flex Component Kit for Flash CS3 and I noticed a small issue with the currentStateChange event. The docs describe that event as:

Dispatched after the view state has changed

but I found that it is dispatched by UIMovieClip as soon as it goes to the initial frame for the new state, rather than waiting for the transition to finish playing.

I made a change to allow the currentStateChange to be dispatched immediately if there is no transition and it waits for it to finish the transition animation if your using the currentState:newState:start to currentState:newState:end method.

This is a temporary fix since I’m assuming this functionality will be in there when the kit is off of the Adobe Labs site. Flash CS3 compiler was complaining, so there is code copied directly in that really shouldn’t be. I didn’t find the time to figure out why it wouldn’t find the UIMovieClip class properly despite the fact that it is in the Library.

Anyway, to use this just put it in the folder of your .fla and change its name to match each of the items in your library that you have turned into a Flex component. The name should match the name of the item in the Library/the class name used. Don’t forget to change the class name in the .as file too. You can download the file here. If anyone knows how to submit this change to Adobe, please let me know.

Post A Comment

  • him_aeng – March 27th, 5:11 a.m.

    Your link to .as file has broken. Please give me your code because I met the same problem that you just point out.

    Thank you.


  • Shawn MakinsonMarch 27th, 9:36 a.m.

    Sorry about that, some files didn’t get moved with a server change. I believe I found the file and I have updated the link.


  • him_aeng – March 27th, 10:08 p.m.

    Thank for your kindly reply. But in line 201 of your code use some variable that was already deprecated, “contentBounds”. In present, UIMovieClip don’t has “contentBounds” anymore but was change to “bounds”.

    and inherited function such as “dispatchResizeEvent()” and “sizeChanged” must prefix with “override protected”

    Thank you again.

    Now I will use your class in my project. So excited :)


  • him_aeng – March 27th, 10:57 p.m.

    Your class make the thing that was promising. It’s awesome.

    Now the statement

    Dispatched after the view state has changed”

    was true story now.

    thank for your helps.

    keep make a great blog.

    two thumbs up.


  • evening dresses Feb. 23rd, 4:33 a.m.

    Wide Collection of Prom Dresses, Evening Dresses and Gowns, Cocktail Dresses, Wedding Dresses, Little Black Dresses, beaded dresses, ball gowns and Black


  • links of london Feb. 23rd, 8:28 a.m.

    Good post….thanks for sharing.. very useful for me i will bookmark this for my future needed. thanks for a great source.


  • FLV Converter April 2nd, 9:39 a.m.

    Very informative and trustworthy blog. Please keep updating with great posts like this one.


  • nike dunk SB April 7th, 11:34 p.m.

    I see two simple yet significant ways I can change our planet and myself.[HTML_REMOVED]discount Chloe Handbags[HTML_REMOVED]instead of plastic and paper bags when I shop.Secondly, I’ll remember to use [HTML_REMOVED]cheap Miu Miu Handbags[HTML_REMOVED] .You may be surprised by what a positive influence these two easy habits can have on the world.Etc….Welcome to http://www.fbib2b.com http://www.fbib2b.com/shoes-nike-air-max-shoes-c-1_47.html air max 90 http://www.fbib2b.com/shoes-nike-air-force-1-shoes-c-1_5.html nike Air Force one http://www.fbib2b.com/shoes-nike-dunk-sb-shoes-c-1_69.html nike dunk SB http://www.fbib2b.com/shoes-nike-air-max-shoes-c-1_47.html Nike air max 90 http://www.fbib2b.com/shoes-nike-air-max-shoes-c-1_310.html nike shox shoes http://www.fbib2b.com/shoes-nike-air-max-shoes-c-1_47.html air max shoes http://www.fbib2b.com/shoes-nike-air-max-shoes-c-1_310.html air force one http://www.fbib2b.com/shoes-nike-shox-shoes-c-1_28.html shox shoes http://www.fbib2b.com/jerseys-nfl-jerseys-c-172_173.html cheap nfl jerseys http://www.fbib2b.com/jerseys-nfl-jerseys-c-172_173.html nfl jersey for sale http://www.fbib2b.com/shoes-louis-vuitton-lv-shoes-c-1_154.html LV boots sale http://www.fbib2b.com/bose-inear-headphones-p-5448.html bose ear headphonese http://www.fbib2b.com/hair-straighteners-c-169.html ghd Hair Straightener


  • evening dresses May 11th, 7:48 a.m.

    evening dresses


  • fiwedding June 11th, 2:48 a.m.

    evening dresses


  • cosplay July 1st, 3:22 a.m.

    wholesale ed hardy tees,


  • steelers shop Aug. 13th, 10:09 p.m.

    thanks for sharing.

    welcome to my home http://www.nflsteelersshop.com


  • Colts Jerseys Aug. 13th, 10:13 p.m.

    WELCOME


  • anklets silver Aug. 20th, 3:02 a.m.

    I will download the file soon. I admire that you know so much about computer.


  • nfl jerseys Sept. 1st, 11:05 p.m.

    Nice post.Thank you for taking the time to publish this information very useful! I’m still waiting for some interesting thoughts from your side in your next post thanks


Leave a comment

Markdown syntax is okay, but any raw HTML will be removed.

squareFACTOR
222 South Westmonte Dr.
Suite 311
Altamonte Springs, FL 32714 28.659606 -81.393275