Archive

Archive for the ‘Flash’ Category

Encode to FLV

February 3rd, 2009

This is a quick help for how to Encode/Convert movies to the Flash FLV format. There are a couple of general encoding features that could be good to know. The key is to find a good balance of frame rate, data rate and keyframe.

When working with digitally compressed video in a format such as Flash Video, the higher the frame rate, the larger the file size. To reduce the file size, you must lower either the frame rate or the data rate If you lower the data rate and leave the frame rate unchanged, the image quality is reduced. If you lower the frame rate and leave the data rate unchanged, the video motion may look less smooth than desired. Something to remember here as well is that you can never gain quality when encoding, so if you have a bad video to start with it will not get any more pleasant to look at just because you boost the data rate.

For short;
Frame rate (fps); The less, the more jumpy.
Data rate (bitrate); The less, the more pixels/blur.
Keyframe; The less, smaller file size.

Since Flash Player 9,0,115,0 there is now the possibility to convert HD quality, so i brief version list of the codecs;
Flash 6-7; Sorenson Video
Flash 8-9; On2
Flash 9-10; On2 (new F4V open format since 9,0,115,0)

There is a really good convert guide to get some help on the export settings;
http://www.adobe.com/devnet/flash/apps/flv_bitrate_calculator/

How to work out the best video compression for me?
This is the hard bit, for short I would recommend these steps.
1.) Figure out a compression that you guess would be the perfect one (get help from calculator).
2.) Setup 4 more compressions, 2 that has higher quality than your (1.) setting and 2 that are below.
3.) Line up all the videos and find the video with the lowest quality settings but that you find is still good. Now from this go back to step 2.
4.) After a couple of rounds this way you should have found a compression for your video.

Remember that all videos are different, so there is no magic setting that will work on all your videos. Also when choosing the “best” video you need to keep track on the file size and what the target is going to be.
Read more…

Flash , , , , , ,

Flex 3 as CS4 development tool

January 23rd, 2009

Are you as me and using Flex as a development tool and just switched to CS4 development. Well, no problem, you can still use Flex for your coding and debugging.

First you need to download and install Gumbo for flex.
1.) Download Gumbo: http://opensource.adobe.com/wiki/display/flexsdk/Downloads
2.) Place it inside the Flex SDK folder: /Applications/Adobe Flex Builder 3/sdks
3.) Go into the library directory: /Applications/Adobe Flex Builder 3/sdks/{sdk version}/frameworks/libs/
Remove all files except the /player/10/playerglobal.swc.
Before: flex_sdk_before After:

flex_sdk_after1

4.) Open the “flex-config.xml” in the /Applications/Adobe Flex Builder 3/sdks/{sdk version}/frameworks/ folder
Replace the text “{targetPlayerMajorVersion}” with “10″.

5.) Open/Restart Flex and add the SDK to flex: Preferences/Flex/Installed Flex SDKs
flex_add_sdk_1

6.) Create a empty ActionScript Project, In the window make sure to change the SDK (use a specific SDK).

Now you should be able to use Flex Builder as a code editor when building Flash CS4 projects. You can also look on how to develop for CS3. A tip is not to click finish, click the next button and in the field “Main source folder” enter src. Cleaner place for putting the fla & as files.

Flash, Flex , , , ,

Myracer portable MF-101

January 9th, 2009

Just got hold of Myracer MF-101 that is a portable game device from South Korea (made in china) and somewhere play4u is a part of the action as well, looks like you can get a lot of new games from there (I don’t understand Korea).

product

The MF-101 comes with some built in applications as, Game, Movie, Music, E-book, Image Viewer and of course has some custom settings. At a first glance the device it seems very inspired from the PSP but it’s much smaller in all the ways and very light. It has 1gb inbuilt memory but has a SD-Card slot if you want to expand, must say that the USB plug is strangely placed. The whole cool thing about this portable game device is that it has a Flash Player.

Read more…

Flash , , , , , ,

Flash CS4

December 15th, 2008

I finaly got my license of Adobe CS4.

cs4package-compress

Happy as I was i tried out Flash and some of the new cool features, created a small dynamic draw application and tried out the 3D features (use the knobs, hold and drag mouse). Make sure you have Flash Player 10 installed.

cs43ddraw.png

As usual, download source here dynamicdraw.zip

Flash , ,

Cairngorm and Flash

October 22nd, 2008

When developing Flash Applications I like to use the Cairngorm micro-architecture as I do in Flex. Without all the nice Flex Framework classes it takes a little more work. Iteration Two did a Cairngorm Flash 0.95 package but that seems to have fallen of the web.
So I took the Flex Open-Source 2.1 Cairngorm classes and removed everything until it started to work.

You can download the Cairngorm to Flash code here.

To think about is that;
- Delegates needs to handle the creation and sending of external services
- Bindable does not exist so instead dispatch when data is updated
There are probably a lot of more things here.

Flash ,

Flex 3 as CS3 development tool

July 24th, 2008

I’ve played around a little with Flex 3 Builder. I love the FDT plugin to Eclipse. But I think it’s a little to expensive and for having a use for it I need the enterprise to get debugger functionality.

So I started to search and to play around with my Flex 3 Builder, why can’t I use this??? Well, as it looks like it’s actually possible.

I created a little video tutorial how to set it up. This is my first video tutorial so sorry if it’s a little strange. If anyone got some good tips of how to create video tutorials please let me know because this was harder than I thought. The files are very big so will try to record them all over.

Read more…

Flash, Flex , , ,

Using tweens for animation

July 18th, 2008

Started to look what Tween Managers that is out there and after looked at Moses Tween Bencher. I’ve decided to start using Tween Lite AS3 . The performance and stability of multiple tweens are amazingly better than Tweener, Fuse, Laco that I’ve been using for some years now.

For more functions I think I try out Tween MAX – The big brother.

Flash , , ,

Flash 9.0.115 update crash XMLSocket; Socket Security

May 23rd, 2008

When Flash 9 update came all XMLSockets stopped working. This is for the sandbox security update for XMLSocket and ONLY XMLSocket. Took me a while to understand the problem and how to solve it.

Before:
XMLSocket goes and checks the sandbox security (crossdomain.xml) as all other security related flash things.

Now:
XMLSocket wants to check port 843 (default) for a security crossdomain file. This is NOT same file as the crossdomain that is on the web server port 80.

Solution:
After long searching and reading it’s really 2 things you need to do.
1.) The server must feed client with a special XMLSocket crossdomain file. Download the zip from http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html and read the article, could also be good to read http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html so you know what is going on.
I don’t know so much about servers so on my ubuntu machine i just typed in the terminal.
./flashpolicyd.pl –file=../policyfile.xml –port=843

2.) Flash Client; make sure to run loadPolicyFile(“xmlsocket://mysite.com:843″) or change port number to what you have in #1. When it’s loaded it should all work.
It’s simple as that,,,

Why most people always write lite, I know this but not, This is how you doing it…. Flash Blogs, shape up. =)

Flash, Life , , , ,

Guitar Hero “in” Flash

February 14th, 2008

I was writing a new Audio Sync Engine for AS3. The idea is that our Sound Manager is working in Sound Forge, by setting markers he can export an xml file with markers data and positions. I wrote the plug-in in c++ by mashing up some existing plugs.

Then the Flash developers can use the Sync Engine to connect markers to changes for example lip sync, character moods and so much more.

When drinking some beer with the colleges we decided to make our own Guitar Hero game.

By connecting the XBOX 360 Guitar Hero control I could with JavaScript find the control, its movement in X,Y (up and sideways). The only thing that I couldn’t get hold of was the Z (pin to pitch audio).
After getting the JavaScript API to work it is easy to push the data to flash. By ExternalInterface its easier to handle JavaScript handling when not needed to put all handling in root.

hiqhero1

Flash , ,

Wii game in Flash

February 12th, 2008

My company had a recruitment fair in Finland. So for dragging people to the “booth” we created a Flash game for the Wii.

HiQ core business is consulting with advanced developers (flash/flex/c++/java and so on).

We created the game “Monkey goes to Work”. A quick game based from the idea “Wario Ware – Smooth Moves”.

By using the WiFi-USB adapter on a laptop and a simple web server I could easily use the Wii Opera browser to get access to our own application.
Some problem with the connection because Wii console needs internet connection to be able to find the computer. It works so long you don’t try to test the connection again, could help to restart the Wii console a couple of times.

Wii Opera supports Flash Player 7. One big problem could we the performance, just having some moving animations and transparency making the application slow.

To control the Flash it’s possible to use remote 1 as a ordinary mouse. But to really get something out of it I used JavaScript to connect to the browser API, possible to get all 4 remotes.
I extracted control 2 and push changes into flash player. Some things for example that I could control is X,Y,Z (distance), Roll (rotating remote), Connection status.
Couldn’t get the gyro to work, probably because all the browser movement is based on the IR. So moving remote outside screen will loose updated. But the buttons is going through wiresless.
Possible to get hold of all buttons on the remote and on the nunchuck. But the nunchuck joystick doesn’t respond.

Flash ,