Archive for August, 2007

AsWing A3 1.1 Released!

August 23rd, 2007

This is not a big update from 1.0, no big feature added, just a little upgrade. But some smart new features maybe important for some people, such as CursorManager#setCursor(), AsWingManager#setPreventNullFocus() , RepaintManager#setAlwaysUseTimer(), new initalization method AsWingManager#initAsStandard() is very useful too. And another thing is some headack bugs are fixed, such as contextMenu can’t shown in a JPopup.

Download it here: http://code.google.com/p/aswing/downloads/list

Here’s the change Logs:

___________________AsWing A3 1.1 change log________________

fixed focusRect bug of AIR
fixed contextMenu bug of JPopup(not shown bug)
fixed JFrame background image bug of SkinBuilderLAF(two top corners out bounds)
fixed JViewport view location bug when resized
fixed color chooser model bug when no color selected more than once
fixed color JColorSwatcher bug when dispose it
fixed JPopup memory leak bug
fixed JWindow active transfer bug
fixed JLoadPane set asset before old asset loaded bug.
add JMenu mouseOver state image for SkinBuilderLAF
make JComboBox drop down list item render mouseOver state
added setCursor method to CursorManager
added setAlwaysUseTimer method to make AsWing Components can works with Flex components
added margin param to FlowLayout
added setActivable method to JWindow to make it can judge whether or not become active when show or user interactive.
added revalidate call to JPopup.pack() to make sure the call will always make effect if preferred size has changed.
added dragAcceptableInitiatorAppraiser property to Component to make complex drop trigger appraise

AsWing home new theme

August 22nd, 2007

Aha, yes, it’s pink. :P

Well, thanks Comeny for the new theme design, she has spend on all the day for this design. However, maybe it is not suit for a code library project home, but it really nice, isn’t it? It’s more better than the old one.

We spent all the night to fix the CSS, we both don’t know CSS, so we edite one place, and then upload it to preview, then back to edite. I think we really have to learn some CSS knowledge now.

Hope you’ll like it. Ok, it’s not the final design. AsWing is not going to be a girl site. :)

AsWing A3 component assets structure

August 17th, 2007

Yesterday Bill talked with me about the assets structure of AsWing A3 components.

A3 assets structure is very different from A2, because A3 Component class is sub-class of Sprite(A3 Component extends AWSprite extends Sprite ), A2 is not(A2 Component is not display object, it is a aggregation of MovieClips).

Here is a simple diagram of A3 assets structure:
A3 component assets structure

You can see there is two situations:
1. Component is not cacheAsBitmap, it’s normal situation for most component most times.
2. Component is cacheAsBitmap, it happens when you set yourComponent.cacheAsBitmap=true, or set filters to the component.
(Why it should change assets structure when cacheAsBitmap? because the flash player bug, see this example)

From the structure, you can see a normal component has one mask Shape, maybe has background decorator object, foreground decorator and UI assets (or children components if it is a Container).

Background decorator will be always at bottom depth, Foreground decorator will be keeped at top depth. And, the component’s Graphics is itself graphics property, which GroundDecorator, Icon, Border, UI used Graphics2D object is created from it. In fact the graphics content is at bottom, so if you use a background decorator returns a display object, it will cover this graphics.

Well, but background/foreground decorators is very useful/powerful(which AsWing A2 doesn’t has), for example SkinBuilderLAF use it widely to represent the component UI, and for the reason of it cover the graphics of component self, so generally, setOpaque/setBackground will not works well for components that use SkinBuilderLAF.

AsWing Book (Chinese) is in writing

August 15th, 2007

Hu Kuang started a book writing for AsWing(targeting A3), soonly, i and bill joined him, now, chapter 1 is finished, chapter 2 is in writing.

Here’s chapter 1 contents:

第一章 图形编程

1.1 概述 (http://docs.google.com/Doc?id=dnp8gdz_5wmf725

1.2 创建框架 (http://docs.google.com/Doc?id=dnp8gdz_4cnpjqp

1.3 给框架定位 (http://docs.google.com/Doc?id=dnp8gdz_3gdr96f

1.4 在面板中显示图形 (http://docs.google.com/Doc?id=dnp8gdz_63n8m3f

1.5 2D图形 (http://docs.google.com/Doc?id=dnp8gdz_13dn73pw

1.6 颜色和填充 (http://docs.google.com/Doc?id=dnp8gdz_16d63xzw

I think when the chinese version is finished, we should maybe try to translate it to English.

Best thanks Hu Kuang and Bill.

Do AsWing components can works with Flex components?

August 7th, 2007

The answer is YES.

Here is a cool guy VKT did a reseach about make AsWing components works with Flex components. Here’s some demo made from him.

Lunch the Demo
The Source

Other demos:
http://sonygod.cn/flex/aswingandflex/IFrameDemo.html
http://sonygod.cn/flex/aswingandflex/

Here is the introduction word from him:

The way show you to use aswing within the flex effect.

Tip:
1. you mush know the UIComponent,because this is very important to use flex effect first step.
2.to use flex effect ,you mush set the effect target is flex UIComponent instead aswing Component.
3,to my opptional,I Like use Canvas to the top container to contain the UIComponent which is the aswing’s container.

what would be the next?
yes,I like talk to you just like talk to myself,I want to use flex’s everything for aswing. althought this seem to be impossible by someguy.

Well, pretty cool, note, if you want to try this, you should have the newest AsWing A3 from svn(AsWingManager.initAsStandard(,,true)). Any question, you can contact VKT by sonygodx at gmail.com. (post to aswing list of course are welcome too)

Well, i want to say some thing, why this happens? AsWing is so flexible, at early time, there’s some buggy behavor with AsWing components works with Flex components, i improved RepaintManager very easy to make it works right.

Maybe AsWing is not heavy as Flex, does not have integrated MXML support, does not have more complex controls, but, you know, you are so easy to make AsWing component works in your application, your game, you are so easy to add any DisplayObject to any AsWing component, now, you even can add AsWing components works in a Flex container.

Here is my wonder, do we can add flex component works in AsWing contaners? do we can add any DisplayObject to flex component easily? do we can use flex component in pure AS3 way?