Posted in PHP, actionscript 3 on February 17th, 2010 by admin – Be the first to comment
Hey it was problem before I see this solution, to pass charactes to PHP like numbers, basicly because Flash use fromCharCode in UTF-8 format and PHP do chr function work in ASCII.
So here is the script solution:
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
| function uniord($ch) {
$n = ord($ch{0});
if ($n < 128) {
return $n; // no conversion required
}
if ($n < 192 || $n > 253) {
return false; // bad first byte || out of range
}
$arr = array(1 => 192, // byte position => range from
2 => 224,
3 => 240,
4 => 248,
5 => 252,
);
foreach ($arr as $key => $val) {
if ($n >= $val) { // add byte to the 'char' array
$char[] = ord($ch{$key}) - 128;
$range = $val;
} else {
break; // save some e-trees
}
}
$retval = ($n - $range) * pow(64, sizeof($char));
foreach ($char as $key => $val) {
$pow = sizeof($char) - ($key + 1); // invert key
$retval += $val * pow(64, $pow); // dark magic
}
return $retval;
} |
found on : Unnamed – post number 1799714
Posted in Uncategorized on February 15th, 2010 by admin – Comments Off
my CV
I used MiKTeX 2.8 Setup to compile it on Windows 7.
Soruce file of my CV
Note: you need to compile it in XeLatex. Also there is file that u need to add in the same dir as “cv.tex”. It is the image in CV. You can download it here:

ace
but use it only for training purpose otherwise you violate the trademark rights
Used links:
Typesetting your academic CV in LaTeX
Posted in Uncategorized on February 14th, 2010 by admin – Be the first to comment
Several friends ask me to provide them the source for welcame page because they like it.
So I’m posting it into my blog, so that everyone that like it take.

what it is in the box
All you need to change it in:
1 2 3 4 5 6 7 8 9 10
| package com.stanislavstankov.data {
public final class Data {
public static var footer:String = "StanislavStankov.com © 2007-" + (new Date().fullYearUTC) + " All rights reserved.";
public static var name:String = "Stanislav Stankov";
public static var caption:String = '<pro nick="dfm" type="flash" class="guru" style="hero" />';
public static var button_arr:Array = ["enter my portfolio", "http://portfolio.stanislavstankov.com", "enter my blog", "http://blog.stanislavstankov.com"];
}
} |
To add more then 1 or just 1 button, or no button you need to change button_arr array. In array are added in sequence button_label, button_link.
to have 3 buttons you need to
1
| public static var button_arr:Array = ["btn1", "btn_url_1", "btn2", "btn_url_2", "btn3", "btn_url_3"]; |
Posted in Uncategorized on February 13th, 2010 by admin – Be the first to comment
Today I feel to replace the old welcome page when you go to index of www.stanisalvstankov.com. This is how it looked version 4

welcaome page version 4
lets look at history for fun

v1 stanislav stankov page

v2 stanislav stankov page

v3A stanislav stankov page

v3B stanislav stankov page

v3C stanislav stankov page

v3D stanislav stankov page
Posted in Uncategorized on February 11th, 2010 by admin – Comments Off
Hey I write presentation presenting RTMP protocol, Bulgarian language.
presentation it is : Real Time Messaging Protocol
RTMP description : RTMP.pdf
filles with all images & doc files : docs.zip
whats in zip?

in-zip-file
Posted in actionscript 3 on February 8th, 2010 by admin – Be the first to comment
IT is great to read this article. Lately the swf that I start localy do not check where they are started and I get a thrown errors… you can just make it little more professional by reading it.
Preventing SWFs From Running Locally
Posted in Uncategorized on February 5th, 2010 by admin – Comments Off
svn cleanup — Recursively clean up the working copy.
So what does this means?
It means that all “.svn” folders in you rfolder and sub folders are removed.
When do I use it?
Hmm.. basically when you want in your working local folder to not have any “.svn”. That are bugging you and taking only more time to get all folder files.
Solution #1 : Registry file
CleanSVN.reg – register add you to your right click menus in folder “Delete SVN Folders”. Tested and works 100% on XP, Vista and 7.
Screen-shots:

delete svn folders
Solution #2 : C# app
C# software app that do the job.
Screen-shots:

directory remover - start

directory remover - finish
realated topics:
How to clean .svn folders from your project
How To Recursively Delete .svn Folders
Delete All .svn Files in windows
Posted in actionscript 3, projects & snippets on January 28th, 2010 by admin – 1 Comment
So lets create 2 files:
setCookies.fla

setCookies.fla flash env with component names
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| var date:Date = new Date();
val_ti.text = ">> " +date.time;
setCookie_btn.addEventListener(MouseEvent.CLICK, clickHandler);
show_btn.addEventListener(MouseEvent.CLICK, showHandler);
function clickHandler(info:MouseEvent):void {
var local_data:SharedObject = SharedObject.getLocal("VSh", "/");
local_data.data.key = val_ti.text;
status_txt.text = local_data.flush();
}
function showHandler(info:MouseEvent):void {
var local_data:SharedObject = SharedObject.getLocal("VSh", "/");
read_ti.text = local_data.data.key;
} |
getCookies.fla

getCookies.fla flash evn with component names
1 2 3 4 5 6 7 8 9 10 11
| var timer:Timer = new Timer(500, 0);
timer.addEventListener(TimerEvent.TIMER, checkForCookieHandker);
timer.start();
info_ta.text = "check for cookies every 0.5 sec ... ";
function checkForCookieHandker(info:TimerEvent):void {
var local_data:SharedObject = SharedObject.getLocal("VSh", "/");
local_data.flush();
info_ta.text = "[" + timer.currentCount + "] key: " + local_data.data.key + ", size: " + local_data.size + "\n" + info_ta.text;
} |
Demo
Set cookie
This movie requires Flash Player 10
Get cookie
This movie requires Flash Player 10
see also:
where is .sol files in windows 7
source files in flash-cookie.zip
Posted in Uncategorized on January 27th, 2010 by admin – Comments Off
What if you need trace in browser environment?
Need Firebug for IE, Opera, Safari?
check it here: getfirebug
Posted in actionscript 3 on January 27th, 2010 by admin – Comments Off
Hi if you are searching where .sol files are set in Windows 7, check here:
C:\Users\USER\AppData\Roaming\Macromedia\Flash Player\#SharedObjects