//via an object property
a = {}
a.x = 23
pathRef('x','_level0.a.x')
trace(x) //23
x = 45
trace(x) //45
trace(a.x) //45
//via a movieclip property
pathRef('x','_level0._x')
trace(x) //0
x = -100
trace(x) //-100
trace(_level0._x) //-100
Better still as a pathRef is always created by path so if you swap the object it is pointed at, the reference will still work. With pure references this would break.
a = {}
a.x = 23
pathRef('x','_level0.a.x')
trace(x)
//redefine a
a = function(){}
a.x = "I am a function now!"
trace(x) //I am a function now!
Too fun. This one has 1000's of uses from remote controlling objects to reference resilient classes.
As always send me any bugs or changes in the code.
DIGG IT!
1
Comments Published
Friday, February 20, 2004
at
10:06 AM
.
I have found this extremely useful on a current project. This library adds a getter/setter to the MovieClip class allowing you to manage color without declaring a Color Object. A Color object is created within getter/setter execution but is destroyed as a temporary variable. This keeps you from having to manage color objects along with the MovieClips they modify.
DIGG IT!
0
Comments Published
Friday, February 13, 2004
at
9:42 AM
.
I wrote this along time ago March'03 to manage Intervals within PowerSDK:FLOW. A recent thread on Flashcoders "setInterval id: possible...", prompted me to set this one free. It makes managing intervals easy and more flexible at the same time.
Interval Manager provides the following:
1. Structured way to add and remove Intervals from the player
2. Allows managed intervals to support many functions
3. Allows interval and interval functions to support custom arguments and custom scope.
DIGG IT!
0
Comments Published
Thursday, February 12, 2004
at
11:08 AM
.
I have had to work with the standalone player on several projects requiring cross platform executables with Flash. I am going to cover two problems, align left and player file size.
The standalone player does not support an SALIGN equivalent from within the player itself, so you have to make one yourself using actionscript.
965 Kb - Flash Standalone Player
483 Kb - UPX Flash Standalone Player
953 Kb - Python 2.3 DLL
336 Kb- Python 2.3 DLL
Both of these examples worked identically before and after compression!
It also looks as though UPX is compatible with Unix so compression of projectors on OSX is potentially supported. Someone try this out on OSX and see if it works. Log your results in the comments.
DIGG IT!
1
Comments Published
Wednesday, February 11, 2004
at
5:56 AM
.
I bought a 500GB Lacie Firewire hard drive and have been doing spring cleaning. I found this jewel from a long time ago and thought I would share. The example is a replacement for startDrag and stopDrag but allow many clips to be dragged at once across many different timelines.
The sample was intended to remove several limitations with startDrag/stopDrag. Even more useful is that with a feature equivalent replacement drag, startDrag/StopDrag can then be used for event based purposes in context with _droptarget. I believe the first version drag was created in the months following the release of Flash 5 as support for clipEvents was added combined with this new stuff called ActionScript.
The drag method used identical syntax to startDrag with the exception of passing a -1 to execute a stopDrag equivalent. Here is the code for the example:
DIGG IT!
0
Comments Published
Wednesday, February 04, 2004
at
7:09 AM
.
Abe Pazos built a PHP application to convert ICO files to the ASCII Icon File Format. The results are simply stunning as it provides perfect conversion of icons.
DIGG IT!
0
Comments Published
Tuesday, February 03, 2004
at
4:51 AM
.
This profoundly affects the compatibility of socket communications through a firewall allowing access to ports below 1024!\0
Due to security changes in Flash Player 7,0,19,0 you can designate a custom location for a policy file as follows:
The to-ports allows you to specify access at a port level, thus allowing access to ports below 1024 like Port 80. This opens the door to getting socket apps in Flash into corporate setttings along with getting Flash compeditive in the instant messaging space. This is a huge change for servers like Jabber as high port clients have been problematic as an admin must change the firewall settings. Port selection can make a huge difference in the number of compatible end users.