2009-06-25 by Quentin Lengelé
Posted in
Flash having
no comments »
For some weeks ago, I’m using MovieClips in Flash like I use ViewStack in Flex.
I made this tool because I was bored to work on FLA files with huge timeline animations where it’s almost impossible to find directly what you are looking for, especially when you work on a team and when it’s not your own source code.
In fact, I like the way to open a FLA file and see immediately all the states of an application.
The ViewStack Class and the ViewStackPanel Class manage your different states (frames of a MovieClip) using Event.ADDED_TO_STAGE and Event.REMOVED_FROM_STAGE events.
It becomes really easy to handle you IN and OUT transitions between states and kill all the listeners in a custom view linked to a Class.
In the following example, you’ll see a 2 states (2 frames) ViewStack.
On each frame, there is another MovieClip, linked to a Class that extends ViewStackPanel (here: ContactPanel and InfoPanel).
ContactPanel and InfoPanel inherits of the init(), kill() and disappear() methods… But let’s see in details, just for the ContactPanel:
ContactPanel Class:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
| package org.cornflex.examples.viewstack
{
import flash.display. MovieClip;
import flash.events. MouseEvent;
import org.cornflex.core.ViewStackPanel;
import org.cornflex.transitions.TweenMax;
public class ContactPanel extends ViewStackPanel
{
public var navigation :MovieClip;
public var topBanner :MovieClip;
public var pageContent :MovieClip;
public var nextButton :MovieClip;
public function ContactPanel ()
{
navigation. alpha = 0;
pageContent. alpha = 0;
topBanner. alpha = 0;
nextButton. alpha = 0;
}
override public function init():void
{
nextButton. addEventListener(MouseEvent. CLICK, changeFrame );
TweenMax.to (navigation, .5, {alpha:1});
TweenMax.to (topBanner, .5, {alpha:1, delay:.2 });
TweenMax.to (pageContent, .5, {alpha:1, delay:.4 });
TweenMax.to (nextButton, .5, {alpha:1, delay:.6 });
}
override public function kill ():void
{
//clear listeners and stuff...
}
override public function disappear ():void
{
TweenMax.to (nextButton, .5, {alpha:0});
TweenMax.to (pageContent, .5, {alpha:0, delay:.2 });
TweenMax.to (topBanner, .5, {alpha:0, delay:.4 });
TweenMax.to (navigation, .5, {alpha:0, delay:.6, onComplete :finish });
}
private function changeFrame (evt :MouseEvent):void
{
viewstack.goto (2);
}
}
} |
The main Class of the FLA File, ViewStackExample:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| package org.cornflex.examples.viewstack
{
import flash.display. MovieClip;
import flash.events. MouseEvent;
import org.cornflex.core.ViewStack;
public class ViewStackExample extends MovieClip
{
public var viewstack :ViewStack;
public var jumpButton :MovieClip;
public function ViewStackExample ()
{
viewstack.debug = true;
jumpButton. addEventListener(MouseEvent. CLICK, handleClick );
}
private function handleClick (event :MouseEvent):void
{
viewstack.goto (2);
}
}
} |
As you can see in the Main Class, I put a jumpButton to show the possibility to call other states from outside the viewstack itself.
You can imagine to have a navigation working with indexes and telling the viewstack on which state it has to go…
And the SWF output :
This movie requires Flash Player 9
To understand well the concept, I advice to take a look to my sources, here.
2009-03-25 by Quentin Lengelé
Months ago, I saw lots of video examples on blogs and YouTube and finally I got some time and found AS3 sources from some brilliant japanese guys (Libspark).
They built an AS3 library called FLARToolKit which is translated from a Java library (NyARToolkit).
This library can detect a “marker” on a video source and calculate its position in a three-dimensional space.
Theses coordinates can be easily used with Papervision3D and applied on a Collada Object or anything else.
Here is my AS3 Augmented Reality Example, done with a Spongle Bob 3DS file found for free on TurboSquid.
Here are some screenshots :
You wanna test it?
1. Download the marker in the PDF document and print it.
2. Allow Flash to access to your webcam when it asks.
3. Point the webcam at the printed marker.
This movie requires Flash Player 9
Sources available soon
2009-03-10 by Quentin Lengelé
Posted in
Flex having
6 comments »
Am I wrong or the Charting Components are parts of the Free Flex SDK?
If I’m not, the Adobe Flex Dev Team forgot to implement these Charting Components in their last SDK, once again.
One fixed or semi-fixed thing is you don’t need to add the “playerglobal.swc” when you create a project.
I said semi-fixed because, if you want to build a Flex project using Flash 10 player features, you need to remove the playerglobal.swc (FP9) and replace it by the playerglobal.swc (FP10). And If you don’t forget to change your HTML Wrapper “Required Flash Player Version” on 10.0.12, with a bit of chance, it will work correctly.
Hopefully, these tricks are common for experimented Flex/Eclipse users. But think one instant to the poor developpers wanting to learn some MXML and stuff… They have to be very very patient to set up their IDE before starting to enjoy the power of Flex.
2009-01-22 by Quentin Lengelé
Posted in
Flex having
no comments »
I’ve found some other bad stuff in the last production release of the Flex SDK.
- There is no Chart Components
- There is no more GroupingCollection in mx.collections
- When you create a project with the 3.2.0.3958, you MUST add the playerglobal.swc (Flash9 or Flash10) library if you want to use classes like MovieClip, Loader,…
At least, we are able to compile Flash 10 applications and use the expected unloadAndStop(true) and System.gc() methods… but Jesus! When they are planning to release a complete and bug free SDK?!
How can they announce that :
“Flex SDK version 3.2.0.3958 is the latest production quality release.” at http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK
2008-09-12 by Quentin Lengelé
Posted in
Flex having
3 comments »
Mike Chambers Article here.
I was hoping for a long time Adobe AIR team release a new version of AIR. I was hoping especially for the memory leaks (garbage collector) in the Flash Player 9 normally fixed in Flash Player 10 and other bugs.
But I was a bit disappointed :
There is no runtime installer in the AIR 1.5 given in the last SDK Nightly build.
We still have to wait before testing and debugging 
I installed the last SDK in Flex Builder but we just able to see AS3 code improvements and we cannot export an AIR application because there is no runtime to play it.
The only way to test improvements is to build a Flex Application with that new SDK because there is a Flash Player 10 beta2 for Internet Browsers.
And I was disappointed again :
I wanted to test the famous and expected “unloadAndStop()” method of the Loader Class.
The purpose of that method is to kill all listeners and free memory of a loaded SWF inside a Flash-Flex-AIR application. … It still seems to be buggy because I cannot see memory variations when this method is called.
I hope it’s due to the beta2 version of Flash Player 10 because this bug is a real mess! The unload() method of the MovieClip class in Flash Player 8 was working so perfectly !!
Definitely, Adobe put companies in bad situation. Think one instant to the companies have been planned big projects with Flex or AIR and they are blocked now due to bugs that was not there in previous Flash Player versions…
Can we continue to wait quietly ?? It’s difficult to do…when clients are nervous.
2008-07-25 by Quentin Lengelé
I’m developping a new way of General Positionning System with Flash 9.
It’s still in beta and it has to be bundled with Flicker and many other GPS services.

2008-04-17 by Quentin Lengelé
This movie requires Flash Player 9
Click and move your mouse over the image.
Again, you need to build a sphere with 3DStudioMax and export it in ASE format.
And your texture has to be a spherical shot to be applied on the sphere.
Take a look to my sources here.
2008-04-08 by Quentin Lengelé
Posted in
Flash having
no comments »
This example is amazing.

- Mouse move — move light source
- Mouse click — change light color
- Mouse wheel or +/- — change material’s highlight curve
- Ctrl + wheel or +/- — change spotlight size
- Spacebar — next texture
Source :
http://blog.alternativaplatform.com/en/2007/12/30/spot-normal-mapping/
2008-04-08 by Quentin Lengelé
Posted in
Flash having
no comments »
TweenMax builds on top of the TweenLite core class and its big brother, TweenFilterLite, to round out the tweening family with popular (though not essential) features like bezier tweening, pause/resume capabilities, easier sequencing, hex color tweening, and more. … …
TweenMax introduces an innovative feature called “bezierThrough” that allows you to define points through which you want the bezier curve to travel (instead of normal control points that simply attract the curve). Or use regular bezier curves – whichever you prefer. See the sample below. Click to add bezier points.
Source :
http://blog.greensock.com/tweenmaxas3/
2008-04-02 by Quentin Lengelé
Posted in
Flex having
no comments »
- Design in Mind: provide a framework meant for continuous collaboration between designer and developer. Probably involves an additional component model that integrates with the existing Halo components.
- Accelerated Development: take application development from concept to reality quickly. Features could include application templates, architectural framework integration, binding improvements.
- Horizontal Platform Improvements: features that benefit all application and user types. Features could include compiler performance, language enhancements, BiDi components, enhanced text.
- Broadening Horizons: expand the range of applications and use-cases that can leverage Flex. Features could include finding a way to make the framework lighter, supporting more deployment runtimes, runtime MXML.
Source :
http://opensource.adobe.com/wiki/display/flexsdk/Flex%2B4