Archive for the ‘actionscript’ Category

DesignersBlock >> We have moved …

Wednesday, May 9th, 2007

designers block

What is designersBlock ?

After much deliberation, we have decided to launch a site for web designers of all skill levels, whether you’re just starting out or a bit of an old hat, we hope you can find something of use to you in your desire to create.

We’d recommend all new designers drop in on the forum to start with, everyone’s a friendly chap or chapess and they are all willing to help out if you have a problem with your design or code - watch out though they’ll probably be pestering you for advice soon!

After that you can check out the articles (not many at the mo, we’ll get to that) and if you want to find out more about the people behind DB you can check us out.

New location …

My fellows back at the forum promoted me to a forum moderator :) thanks for that mates !

Got paid for the first time …

Wednesday, April 25th, 2007

Yes , i finally got paid for some of my flash/actionscript work , though its not much but im happy and all excited about it !!
so now i started some how to believe that i can make money out of my hobby , eyh ?

maybe i should frame the money and hang it on the wall ?

Flash math , using atan2 …

Wednesday, April 18th, 2007

Usage

Math.atan2( y, x )

Parameters
x A number specifying the x coordinate of the point.

y A number specifying the y coordinate of the point.

Returns

A number.

Description
Method; computes and returns the arc tangent of y/x in radians. The return value represents the angle opposite the opposite angle of a right triangle, where x is the adjacent side length and y is the opposite side length.

Get wordpress posts in flash …

Monday, March 26th, 2007

got flooded recently with emails requesting a tutorial on how to get wordpress posts into flash , now i dont have enough time to make a tut , but i will go through it in here quickly so pay attention .

Important links :
XML-RPC on Wordpress
XML-RPC home
XML-RPC tutorial press

———————————————-
Now as far as i remember i downloaded the movable type class from here http://www.dentedreality.com.au/bloggerapi/

download the MTC ( movable type class ) and extract them in your folder on your webspace ( should support php) .

Now open up a new php document call it what ever you want , i called it test.php copy & paste the following code :


include_once("class.mtclient.php");
$username = "USERNAME"; //Blog user name
$password = "PASS"; // Blog Pass
$host = "zainal.wordpress.com"; //change this to your wordpress site
$path = "/xmlrpc.php";//"/path to xmlrpc , keep it as it is , sometimes it needs
// the full path e.g www.abcd.com/blog/xmlrpc.php
// create a new blog
$blog = new mtclient($username, $password, $host, $path);
//get last 6 posts ...
$myBlogs = $blog->getRecentPosts($username , 6);
//cant remember why i kept the counter ….
//OH YA the counter will be used to plot user_data e.g user_data1 , user_data2 , notice the &
// mark below its what flash will read and split data based on ” | ” ….
$counter = 1;
// loop through the MultiD array
for ( $row = 0; $row < 6; $row++ )
{
//At this end you can always Produce XML doc , or as in my case i added "|"
// so i can split Data in flash later on ...
print "&user_data$counter=".$myBlogs[$row][title].'|'.$myBlogs[$row][link];
$counter++;
}
?>

now you can get more than title and link here is an explanation :

/* usage:

requires the following files to be in the same directory:
class.bloggerclient.php
xmlrpc.php

re-implements the following methods with metaWeblog
which returns strings “description”, “link”, and “title”
instead of a single “content” string.

getRecentPosts
getPost
newPost
editPost

also adds the special movabletype methods
which allow category assignment and retrieval
and for listing of supported methods

getCategoryList
getPostCategories
setPostCategories
supportedMethods

example:

include_once(”class.mtclient.php”);

$username = “myusername”;
$password = “mypassword”;
$host = “www.myhost.com”;
$path = “/path/to/mt-xmlrpc.cgi”;

$blog = new mtclient($username, $password, $host, $path);
$myBlogs = $blog->getUsersBlogs();
*/

flash code :

var sender = new LoadVars();
var receiver = new LoadVars();
high= 22;
u = 0;
url = [];
receiver.onLoad = function(ok){
if(ok) {
loader.unloadMovie();
for (var i = 1; i <= 6; ++i)
{
receiver["dataPacket" +i] = receiver["user_data" + i].split("|");
var Ntitle = receiver["dataPacket" + i][0];
url[i] = receiver["dataPacket" + i][1];
trace ("data " + Ntitle);
trace ("data " + url[i]);
trace('attaching');
_root.attachMovie("box", "box" + i, _root.getNextHighestDepth());
_root["box"+i].btn.ID = i;
_root["box"+i].pTitle.text = Ntitle;
_root["box"+i].btn.onPress = function() {
getURL(url[this.ID],_blank);
}
_root["box"+i].btn.onRollOver = function() {
trace('get some');
}
_root["box"+i]._y = 65 +(high * u);
trace('hight ' + (high * u));
_root["box"+i]._x = 0;
u++;
delete receiver["user_data" + i];
}
}
}
sender.sendAndLoad("http://localhost/movabletypeClass/test.php", receiver, "post");

Like i said earlier , you can always produce XML doc from the test.php and read that in flash , there are many ways you can read external files , it all depends on YOU !
Flash & php source files can be downloaded from here …@ ZAINALS

Zainals ver 2 sneak peek preview !

Tuesday, February 27th, 2007

May not be clear but cant bother resize em in then link them today .

The past week been my depression week for no reason and i just wish to know what is happening with moi =\ .
Anyway , give me your feedback !

zainals2

zainals2

zainals2

zainals2

zainals2

zainals2

Tweener , tween and transition class .

Thursday, February 15th, 2007

I was surfing google code to see whats new .
Found a new tweening class “caurina.transitions.Tweener”.

Tweener is a static class - that is, a class that allows you to run methods on it, or call its properties, but that never lets you create instances from it. This means that, with Tweener, you never create a new object - you simply tells Tweener to do something for you.

Tweener works on the idea that, instead of setting the value of a given property of a given object directly, as in myMC._x = 10, you can tell that property to create a transition to that value - by doing this transition or tweening, you can control your numeric data in a more fluid way. Doing slides, fades, and all kinds of animation is the result of this kind of manipulation: by making a property or variable go to one value or the other fluidly, not immediately.

> Link
> Documentation
> Examples

16 Tips For Better Flash Development .

Wednesday, February 14th, 2007

good article on how to optimize your flash movies , worth the clicky …

Flash is capable of performing an impressive number of tasks and delivering such a wide variety of different types of information that it can be tricky to know where to start when trying to reign in a bloated application. In an effort to keep a large and still growing Flash application that I am developing under control…

Read more 

Undocumented flash 8 ‘Documented’ …

Wednesday, February 7th, 2007

Open source Flash

  • Filters
  • Blending Modes
  • Geometry Classes
  • TextField Extensions
  • MovieClip Extensions
  • Bitmap Display
  • Text Renderer Control
  • FileReference
  • Bitmap Caching
  • Performances
  • ExternalInterface API
  • o JavaScript to Flash
    o Flash to JavaScript

  • Flash Lite authoring features in Flash Professional 8
  • Mysteries
  • Bugs
  • Community Submitted Examples

Simply the best Bookmark !!

Friday, January 26th, 2007

Every Developer/Designer should have this on the top of the their bookMarks !

the site includes :

  • Tutorials ( Everything  Flash , php , ajax , css etc )
  • Site reviews ( best sites ever)
  • free useful tools ( fonts , code snippets )
  • and much MORE !

I cant say more that You’ll have to see it  your self !!

http://www.smashingmagazine.com 

Getting Wordpress posts into Flash!

Thursday, January 25th, 2007

flash worspress flashblog

After reading few documentation about some APIs & classes used with wordpress, i was able to get flash to read the titles and arrange them with their links .

not only that , its now possible to get the post title , post link , post entry(description) etc …
This will be one of the elements that i ‘ll be using in my ZAINALS ver 2 :)
lovely eyh ?