Vector renamed to ArrayList

As days before i posted about AsWing Flash Player 10 compatibility, i saw that the new FP class Vector is not top class yet in Flex SDK 4, but today, fudo posted a issue at aswing forum, i notice that in Flash CS4, it is already a top class.

So i did the renaming, the new name is org.aswing.util.ArrayList, please update from svn if you want to get this change. If you just want swc file, you can download it here http://svn.aswing.org/aswing/trunk/AsWing/swc/AsWing.swc.


Kicks Creator

A

Save your sensible

A

Andagel an amazing 3D sci-fi game developed with Sandy3D

Andagel is the last game proposed by protopop studio.

After the successful Alien SLayer 3D FPS game, Sandy3D is proud to be the engine choosen for this incredible flash 3D game.

After some long months of development, Robert Kabwe offer us this incredible flash game, approaching quality of our old good playstation games.

Good use of 3D in flash games is pretty rare, and most of people still consider it as a waste of time, but I’m guessing Andagel will change their mind )

Here is the brief story of Andagel:

Centuries a go this planet was the target of a terraforming alien species. Their terraforming project was abandoned but not before leaving an outpost on the planet’s surface to collect and harness energy.

This outpost grew into the thriving Megatropolis of Junx City, and it is on the outskirts of this city that the story of Andagel takes place.

It is very rare to play some good and wel finished flash games, especially when there’s a use of 3D in it. But hopefully there’s some, and Andagel is one of them, definitely! A good story board, great textures, interessting gameplay and good sound design, that is what I call a real game )

Hope you’ll like it as much as we do !

gate


How to make a Popup always on top?

Some guys asked me about this question for times, i thought i should make a post here since you want to know this too.:)

Well, all the Popups in AsWing, including JPopup and all its sub classes such as JWindow JFrame, has their owner — the first param of their constructor, for example new JFrame(owner, …), the owner specified where the popups create their assets. You can set a default owner for all popups by calling AsWingManager.init(defaultOwner, …) or AsWingManager.setRoot(defaultOwner), if there’s a default owner set, you can pass null to the popup constructors, null means to use default one.

So, how to make a popup on top of others? Yes, you already know, just make its owner on top of others, for example, there’s two sprite on your stage, sprite2 is on top of sprite1, if you call AsWingManager.setRoot(sprite1) to make sprite1 as default owner, then you created a popup with sprite2 as its owner for example topFrame = new JFrame(sprite2, …), then you’ll got topFrame always on top of other popups which created with default owner.

BTW, the owner can be a JPopup instance too, if a owner is a popup, the created popup will be its sub popup, always on top of parent popup and if parent popup hide or minimized the sub popup will be non-visible.

Here’s a demo:

public class TopPopup extends Sprite{

private var sprite1:Sprite;
private var sprite2:Sprite;

public function TopPopup(){
super();
sprite1 = new Sprite();
sprite2 = new Sprite();
addChild(sprite1);
addChild(sprite2);

AsWingManager.initAsStandard(sprite1);
createFrame(null, "Normal Frame1");
createFrame(null, "Normal Frame2");
createFrame(createFrame(null, "Parent"), "Sub").setSizeWH(100, 80);
createFrame(sprite2, "Top Frame").setSizeWH(200, 140);
}

private function createFrame(owner:*, title:String):JFrame{
var frame:JFrame = new JFrame(owner, title);
frame.setDragDirectly(true);
frame.setSizeWH(140, 100);
frame.setLocationXY(Math.random()*200, Math.random()*100);
frame.show();
return frame;
}

}

TopPopup
(Click here to run the SWF)


Create a AsWing’s NumericStepper

Although we have JAdjuster component for AsWing, but sometimes people ask us for NumericStepper, most time, we tell them just use JAdjuster, we know it’s different, but most time they are replacable.

Well, if you do want a NumericStepper component, it’s easy to create by your self, just combine with JTextField+2Button, with a BoundedRangeModel, a basic MVC NumericStepper component born.

Here’s a example implementation, see the demo screenshot below:
NumericStepper

The test App source code:

package{

import flash.display.Sprite;
import flash.events.Event;

import org.aswing.*;

public class NumericStepperTest extends Sprite{

private var infoText:JTextArea;
private var ns:NumericStepper;

public function NumericStepperTest(){
super();
AsWingManager.initAsStandard(this);
var frame:JFrame = new JFrame(null, "NumericStepperTest");
var topPane:JPanel = new JPanel();
ns = new NumericStepper();
var button:JButton = new JButton("Reset");
topPane.appendAll(button, ns);

infoText = new JTextArea();
frame.getContentPane().append(topPane, BorderLayout.NORTH);
frame.getContentPane().append(
new JScrollPane(infoText), BorderLayout.CENTER);
frame.setSizeWH(300, 300);
frame.show();

ns.addStateListener(__nsStateChanged);
button.addActionListener(__resetValue);
}

private function __resetValue(e:Event):void{
ns.getModel().setValue(50);
}

private function __nsStateChanged(e:Event):void{
infoText.appendByReplace("value : " + ns.getModel().getValue()+"\n");
infoText.scrollToBottomLeft();
}
}
}

Well, for copyright reason, i can’t post all of the component codes, maybe after the book published, there will be a downloadable version.

But trust me, if you want, you can implement it easily by yourself, a Container with a BorderLayout, left is a JTextField(lost border and background), right is a Box contains two JButton with Arrow Icons, and with a BoundedRangeModel to hold the data(you can take JAdjuster as example), finally create a Border to your NumericStepper, it is!


Online Papervision3D training - Nov 8th. Optimization Techniques


We’re doing one more of these before the year’s end and won’t likely do it again until February 2009. We weren’t going to do it at all, but we’d had a great response to do one more, so we’re squeezing this one in before the holidays really kick in.

I’m taking a break from traveling for a while, so RMI has set me up with some on-line course time and this weekend (SATURDAY), I’m going to pouring over the Winterwonder Land application and talking about optimization techniques for Papervision and the flash Player in general.

In the course files, I’m including nearly all the demo’s I used for the classes I taught in person as well as the source for Winterwonder Land’s animation engine etc.

If you’re interested, you can sign up over at RMI’s site:

http://www.richmediainstitute.com/node/277

Hope to see you there!

      

3D Vector Text

The Away3D Team is happy to announce a powerful new feature: vector shape primitives. It allows the engine to represent complex vector graphics in 3D as a series of transformed linear and bezier instructions. The most immediate appliance of this is, of course, 100% sharp text despite the scale.

Usage is extremely simple: the engine will be able to dynamically parse True Type Font (ttf) files, so you can just point it to an external or embedded font file and Away3D will do the rest! Furthermore, a Scalable Vector Graphics (svg) parser should also be included in the package, clearing the way not only for 3D text, but for any kind of vector graphics such as logos and even art developed in Adobe Illustrator. These primitives will behave just as any other 3D object, and become particularly interesting when extrusions are applied to them.

The new feature produces some really impressive graphics, so dont hesitate to play around with it when it is out. Implementations are endless… Click on the image above to see it in action!

The Away3D also introduces Li from http://www.lidev.com.ar/ as the newest Away3D Team member with his great addition of Vector Shapes to the engine.


AsWing Flash Player 10 compatibility

Some days ago, Stef and Oliver told about the flash player 10 new class Vector conflict with AsWing’s org.aswing.util.Vector, seems we need to rename AsWing one to another name. Some like ASVector(since we have ASFont, ASColor etc.) or just ArrayList.

But today i finally got a chance to try Flex4 SDK, i compiled a SWF with AsWing component and FP10 Vector, in fact it is __AS3__.vec.Vector, not a top class. There’s not any problem, every thing runs very well.

So, i guess, maybe after Flex 4 SDK formal version released, Vector will become a top class?
Then, there will not have problem too, just, if you use two Vector class in same class file, you have to always use the full name of org.aswing.util.Vector, it’s not really a problem, just, hmmm, not convenient.

I can’t just rename the class name right now before more full test, but i guess i will finally rename our Vector to ArrayList, and maybe replace most our Vector use to Adobe’s, since it is much faster?

Except this, i have not found any other compatibility problem of AsWing on FP10, if you found some, please must tell me!:)


AsWing Flash Player 10 compatibility

Some days ago, Stef and Oliver told about the flash player 10 new class Vector conflict with AsWing’s org.aswing.util.Vector, seems we need to rename AsWing one to another name. Some like ASVector(since we have ASFont, ASColor etc.) or just ArrayList.

But today i finally got a chance to try Flex4 SDK, i compiled a SWF with AsWing component and FP10 Vector, in fact it is __AS3__.vec.Vector, not a top class. There’s not any problem, every thing runs very well.

So, i guess, maybe after Flex 4 SDK formal version released, Vector will become a top class?
Then, there will not have problem too, just, if you use two Vector class in same class file, you have to always use the full name of org.aswing.util.Vector, it’s not really a problem, just, hmmm, not convenient.

I can’t just rename the class name right now before more full test, but i guess i will finally rename our Vector to ArrayList, and maybe replace most our Vector use to Adobe’s, since it is much faster?

Except this, i have not found any other compatibility problem of AsWing on FP10, if you found some, please must tell me!:)