Monthly ArchiveMay 2006
Action Script & Tutorials 26 May 2006 03:23 am
MovieClip point 2 point mover class
This class is based on Colin Moock Follow Grid of Point script.
With this class you can generate movement of movieclip from an array that contain some coordinat points.
-
//
-
// save it as moveToPoint.as in janumedia folder
-
//
-
class janumedia.moveToPoint {
-
-
private var pathArray:Array;
-
private var mc:MovieClip;
-
-
function moveToPoint(t:MovieClip,pathTo:Array,speed:Number){
-
-
pathArray = pathTo;
-
drawPath(t,pathArray);
-
mc = t;
-
mc.count = 0;
-
mc.oldT = getTimer();
-
mc.speed = speed;
-
mc.oriX = mc._x;
-
mc.oriY = mc._y;
-
mc.xPos = pathTo[mc.count].x;
-
mc.yPos = pathTo[mc.count].y;
-
mc.owner = this;
-
mc.onEnterFrame = function(){
-
this.owner.doMove();
-
}
-
-
}
-
-
private function doMove(){
-
mc.curT = getTimer();
-
mc.elapsedSeconds = (mc.curT - mc.oldT) / 1000;
-
mc.oldT = mc.curT;
-
mc.moveDist = mc.speed * mc.elapsedSeconds;
-
// Determine distance between clip and destination
-
var deltaX = mc._x - mc.xPos;
-
var deltaY = mc._y - mc.yPos;
-
var dist = Math.sqrt((deltaX * deltaX) + (deltaY * deltaY));
-
-
if (mc.moveDist>= dist) {
-
mc._x = mc.xPos;
-
mc._y = mc.yPos;
-
mc.count++;
-
if(mc.count <pathArray.length){
-
mc.xPos = pathArray[mc.count].x;
-
mc.yPos = pathArray[mc.count].y;
-
} else {
-
delete mc.onEnterFrame;
-
}
-
-
} else {
-
// Allocate speed between x and y axes
-
var moveX = mc.moveDist * (deltaX / dist);
-
var moveY = mc.moveDist * (deltaY / dist);
-
// Move follower towards the destination.
-
mc._x -= moveX;
-
mc._y -= moveY;
-
}
-
}
-
-
private function drawPath(t:MovieClip,data:Array){
-
var path = t._parent.createEmptyMovieClip("mcpath",t._parent.getNextHighestDepth(),{_x:0,_y:0});
-
with(path){
-
clear();
-
lineStyle(0, 0x000000, 50);
-
moveTo(t._x, t._y);
-
}
-
for(var i=0 ; i<data.length ; i++){
-
path.lineTo(data[i].x, data[i].y);
-
}
-
}
-
}
Don't forget to download the sample here
Action Script & Tutorials 19 May 2006 06:57 am
The Sources beeing shared
Inspired by Herdiansah, I would like to shared also some of my code which are most of them are already published in any Flash Community.
Since this is still relatively new hosting then still just a few sources there but will increase soon
. C'moon get it here. Use it but don't abused it.
Flex 17 May 2006 04:18 am
Flex Builder 2 for Flash Programmers Presentation at DivNet
Today I found a nice article as Breeze presentation at DivNet about Flex Builder 2 for Flash Programmers.
Here the general out line about the presentation:
1rst hour:
- Brief discussion of Flex
- Tour of the Flex Builder 2 IDE
- Description of an MXML component
- Containers for layout speed
- Basic events
2nd hour:
- Component states
- ViewStacks as application screens
- Simple effects
- Q & A
If you love to play on Flex I think you must watch this presentation at Breeze Seminar
Flash Platform 17 May 2006 04:10 am
Bitmapdata / Image Compression Techniques Solutions for Flash 8
Maybe you already know that we can save bitmap data into image file in flash 8 by using bitmapdata class. Mario Klingemann also did is with his BitmapExporter class.
The problem when you try to do save / sent bitmap data from flash to server is the compression. If you try to sent large data to server oftenly (each minute) then your server will do complex job to parsing the data into image and some times your flash will look or may be hang because of it. The solutions for this thing is compression rules!
Talking about the compression Koen De Weggheleire has a great idea about it. He explained to us about how we can compress the image data as well as RLE and LZW compression. With this method you even can have compression ratio 1.56. wow!!
[ via Peter Elst ]
Ajax 16 May 2006 05:28 am
30 Links to AJAX Tutorials
Very helfull link by Max Kiesler about Round-up of 30 AJAX tutorials. This list also you be found at Ritesh Jariwala's blog.
Here the 30 links:
AJAX Client-Server Communication Tutorials
- Alternate Ajax Techniques, Part 1
- Dynamic HTML and XML: The XMLHttpRequest Object
- Guide to Using XMLHttpRequest
- Make asynchronous requests with JavaScript and Ajax
- Instant Tutorial
- Advanced Requests and Responses in AJAXR
AJAX Drag and Drop Tutorials
- Fun with Drag and Drop with RICO
- Drag & Drop Sortable Lists with JavaScript and CSS
- Building a Drag-and-Drop Shopping Cart with AJAX
AJAX Form Tutorials
AJAX File Uploader Tutorial
AJAX Framework and Toolkit Tutorials
- AJAX Tutorial with Prototype
- Learn xajax in 10 Minutes
- Using Ajax with PHP and Sajax
- Developer Notes for prototype.js
Ajax Getting Started Tutorial
Ajax Image Gallery Tutorial
Ajax Keyword Suggest Tutorials
- How to create the Google Suggest feature with ASP.NET 2.0
- Creating an Autosuggest Textbox with JavaScript, Part 1
AJAX Live Search Tutorials
Ajax Rounded Corner Tutorials
Ajax Sorting Tutorial
Ajax Tabbed Pages Tutorials
- Building Tabbed Content
- Make an AJAX Website in Less than 10 Minutes
- Very Dynamic Web Interfaces
- AJAX Design Patterns
- Beautiful JavaScript-Powered Pages
Flash Lite 16 May 2006 04:44 am
Introduction to Animation in Flash Lite 1.1 at DevCenter
It doesn't matter Flash Lite now in ver 2.0. But this article still help a lot for Flash Moblie / Lite developer. So don't miss it
Introduction to Animation in Flash Lite 1.1
Flash Platform 12 May 2006 02:41 am
Adobe Apollo : Flash beyond the browser
Has informed before that Adobe currently develop software project to replace of Macromedia Central. The product with codename Apollo will make Flash run outside browser is the same like Macromedia Central but should be more advanced
.
Apollo programs will function when a person is offline and automatically update data when the user gets back online. For example, a person could book an airline ticket from a handheld or laptop offline; when the person reconnects to a network, the software will complete the transaction.
Apollo is designed to give developers a way to create applications that can render Flash animations as well as HTML and Acrobat files (PDF). That approach preserves the benefits of the Web but allows room for programs that can't be included now, Lynch said.
Read complete article at c|net
Uncategorized 03 May 2006 04:49 am
Selamat Hari Raya Galungan & Kuningan
Hari ini tanggal 3 Mei 2006 umat Hindu merayakan Hari Raya Galungan sebagai ucapan rasa syukur karena telah berhasil memenangkan sifat-2 baik terhadap sifat-2 buruk selama 210 hari terkahir. Perayaan ini akan berlanjut sepuluh hari mendatang yaitu sabtu 13 Mei 2006 akan dilanjutkan dgn perayaan Hari Raya Kuningan.
Untuk itu untuk semua sodara dan rekan umat Hindu saya ucapkan:
"Selamat Hari Raya Galungan dan Kuningan Semoga selalu dalam berkat-Nya"

