Archive for the ‘Others’ Category
|
Funny things about static const in ActionScript 3
package
{
public class FunnyStaticConst
{
// mess around with the sequence but it still works
private static const num1:int = num2;
private static const num2:int = 100;
// a constant object?
private static const BASE:Object = {name:'banana', color:'yellow'};
// constructor
public function FunnyStaticConst()
{
//let's change the "constant"
BASE.name='apple';
BASE.color=red';
trace(BASE.name,BASE.color);
// the result is "apple,red"
}
}
}
|
|
Configure FlashDevelop Code Autocompletion For AIR API
This will enable code auto-completion feature for AIR API in FlashDevelop Project->Properties->Compiler Options->Intrinsic Libraries, click at the “…” button and put these lines there Library\AS3\frameworks\FlashCS3 |
|
MovieMaterial updateBitmap Bug In Papervision3D 2.0 GreatWhite
In latest PV3D 2.0 (GreatWhite) revision, MovieMateiral and MovieAssetMateiral’s updateBitmap function is broken. The problem is that updateBitmap function is actually an empty function. The class hierarchy goes like this: MovieAssetMaterial -> MovieMateiral -> BitmapMaterial -> TriangleMaterial -> MaterialObject3D. updateBitmap is defined in MaterialObject3D as an empty function and it was never overridden along the path. If you are not patient to wait for their next release, the problem can be solved by putting PV3D1.7 updateBitmap function back into the MovieMaterial class. public override function updateBitmap():void
{
// using int is much faster than using Math.floor. And casting the variable saves in speed from having the avm decide what to cast it as
var mWidth:int = int(movie.width);
var mHeight:int = int(movie.height);
if( allowAutoResize && ( mWidth != bitmap.width || mHeight != bitmap.height ) )
{
// Init new bitmap size
initBitmap( movie );
}
drawBitmap();
}
|
|
Testing Results Of Google Indexing SWF Files
A few days ago, we did a test on Google’s swf indexing capabilities and here’s our new findings. You can try to see the result from Google. We are still testing at the moment, so the actual page may not be reflected in Google.
|
|
Testing
This post is meant to test capability of google indexing flash contents. |
|
Concerns Regarding SEO For SWF
|
|
Politics of country drop down menu: solution
To avoid HongKong, Taiwan and China’s “one China” policy problem, do not mention the word “country” in your *uhem* drop down menu. Use something like, “location”, “where do you live?” and “your region” etc. |
|
Politics of country drop down menu
If you list China, Hong Kong and Taiwan as 3 different countries, you’ll get complained by Chinese. I seriously feel that at the current moment all Chinese should spend more energy cleaning up Beijing streets other than hunting down companies who list countries wrongly. BTW, I think website domains should change, too. .com.hk is wrong. It should be .com.cn.hk |

