25 Jun, 07 > 1 Jul, 07
7 Aug, 06 > 13 Aug, 06
16 Jan, 06 > 22 Jan, 06
19 Sep, 05 > 25 Sep, 05
22 Aug, 05 > 28 Aug, 05
8 Aug, 05 > 14 Aug, 05
ADVANCED FLASH
Sunday, 24 June 2007
Flash CS3 and FLfile.runCommandline and Vista
Mood:  rushed

I was working on Apollo source provided by FlashGuru. When I tried to execute Test in Apollo command from Flash CS3 on Vista, it was not working. After doing lots of RND, I felt the problem was not where I was searching. Then I quit Flash CS3.

Goto Programs -> Adobe Flash CS3 and right click over it. In properties dialog box, I clicked to Compatibility.

I checked the box back to "Run As Administrator". Applied the settings and come back.

Now again restart Flash CS3 and test my program. This time itz working.

WOW [Efforts of those 8 hrs.] 


Posted by delhens at 4:57 PM
Post Comment | Permalink
Friday, 11 August 2006
SFCMS [Saffron flash cms] is launched.

Hi All,

Saffronrage solutions  and Saffron Multimedia Inc. has launched its most advanced CMS components on 9-Aug-2006 called SFCMS or SAFFRON FLASH CMS COMPONENTS. It has 6 advanced components and they are planning to extend it with more different components like shopping cart. Perhaps  SFCMS  price  is lowest  among  all  Flash  CMS  conponents.  So ....check it  now....

http://www.saffronflashcms.com/.

 

DEL 

 


Posted by delhens at 12:01 PM
Post Comment | Permalink
Tuesday, 17 January 2006
FLV Plaback component....
>> How to play multiple flv in FLV Playback component of Flash 8.

>> Several users get problems with FLV Playback component to load and play multiple flv.

Lets understand the basic concept of the component. An instance of FLV Playback component may contain several videoplayers. By default 0th videoplayer is activated.

flvplayer.activeVideoPlayerIndex = 0;
flvplayer.contentPath = "mov1.flv";


In this context, 0th player is shown intentionally.

Now, let us suppose,

player.activeVideoPlayerIndex = 1; //Show who will be active player now....

var str = "mov2.flv";

//Set active player's content movie.
player.contentPath = str;

//Reset active player to the first player....
player.activeVideoPlayerIndex = 0;



In this way you can add multiple flvs to different internal videoplayers.
Where to put these code.....As I had used, I had written in ready event. Its per your requirement.

Now, we have to play these videoplayers....

player.stop();
//Activate required videoplayer....
player.activeVideoPlayerIndex = (videoplayerindex);
//Make visible required videoplayer....
player.visibleVideoPlayerIndex = (videoplayerindex);
player.play();


Keep in mind that you can instantiate multiple videoplayers at a time in a single instance of FLV Playback component.

//---------------------CODE------------------
--
import mx.video.*;

var listenerObject:Object = new Object();
var radioListener:Object = new Object();
var completeListener:Object = new Object();


completeListener.complete = function(eventObj:Object)
{
flvplayer.autpPlay = true;
flvplayer.play();
}
var xx = 0;
flvplayer.activeVideoPlayerIndex = 0;
flvplayer.contentPath = "mov1.flv";


var listenerObject:Object = new Object();
listenerObject.ready = function(eventObject:Object):Void
{
var player = eventObject.target;

if(_root.xx >= 2) return;

_root.xx++;
player.activeVideoPlayerIndex = _root.xx;
var str = "mov" + (_root.xx+1) + ".flv";

player.contentPath = str;
player.activeVideoPlayerIndex = 0;
};
flvplayer.addEventListener("ready", listenerObject);

var listenerObject:Object = new Object();
listenerObject.stateChange = function(eventObject:Object):Void {
if(eventObject.state == FLVPlayback.PLAYING)
_root.status_txt.text = "Playing";
else
_root.status_txt.text = "Stopped";
_root.moviename_txt.text =
eventObject.target.contentPath; }
flvplayer.addEventListener("stateChange", listenerObject);

var listenerObject:Object = new Object();
listenerObject.playheadUpdate = function(eventObject:Object):Void {
_root.time_txt.text = eventObject.target.playheadTime;
};
flvplayer.addEventListener("playheadUpdate", listenerObject);



radioListener.click = function(eventObj:Object):Void
{
try
{
var player = eventObj.target._parent.flvplayer;
player.stop();
player.activeVideoPlayerIndex = (eventObj.target.data-1);
player.visibleVideoPlayerIndex = (eventObj.target.data-1);
player.play();
}
catch(err:VideoError)
{
trace("Movie not found...");
}
}
movie1_rd.addEventListener("click", radioListener);
movie2_rd.addEventListener("click", radioListener);
movie3_rd.addEventListener("click", radioListener);

stop();
//---------------------END CODE----------------

Posted by delhens at 4:52 PM
Post Comment | Permalink
Friday, 23 September 2005
FlvPlayback component nut n shell (Flash 8)
FlvPlaback Component. View Demo

FlvPlayback component class is newest component provided by Macromedia. I love this because of it look n feel and extensibility.

Here is code to play a flv file....

import mx.video.*;

var listenerObject:Object = new Object();
var cpObject:Object = new Object();
var radioListener:Object = new Object();
var seekListener:Object = new Object();

listenerObject.ready = function(eventObject:Object) {
try
{
flvplayer.seekToNavCuePoint("alan");
}
catch(err:VideoError)
{
trace("Cue Point Not Found! -- (" + err.code + ")");
}
}

cpObject.cuePoint = function(eventObject:Object)
{
trace("Cue point name is: " + eventObject.info.name);
trace("Cue point time is: " + eventObject.info.time);
trace("Cue point type is: " + eventObject.info.type);

}

seekListener.seek = function(eventObj:Object)
{
trace("SEEK IS UPDATED!");
}

flvplayer.addEventListener("ready", listenerObject);
flvplayer.addEventListener("cuePoint", cpObject);
flvplayer.addEventListener("seek", seekListener);

radioListener.click = function(eventObj:Object):Void
{
try
{
var player = eventObj.target._parent.flvplayer;
player.seekToNavCuePoint(player.findCuePoint(eventObj.target.data));
}
catch(err:VideoError)
{
trace("Cue Point Not Found! -- (" + err.code + ")");
}
}
alan_rd.addEventListener("click", radioListener);
alan_egg_rd.addEventListener("click", radioListener);
aladin_rd.addEventListener("click", radioListener);
addy_rd.addEventListener("click", radioListener);
hammer_rd.addEventListener("click", radioListener);
seekwalk_rd.addEventListener("click", radioListener);
bb_rd.addEventListener("click", radioListener);
sadalan_rd.addEventListener("click", radioListener);

stop();


Note: If you use cue points, dont go for EVENT type. You need to have NAVIGATION type.

Hope this could be helpfull for you!

Posted by delhens at 1:29 PM
Post Comment | Permalink
Wednesday, 21 September 2005
New Mochibot SWF spy
http://www.mochibot.com has launched its beta version online swf tracker. This is quite useful for those who want to track their swfs. This could be effective for swf piracy, performance, content popularity, and viral distribution.




Nice thing y and easy to implement...

DEL

Posted by delhens at 3:00 PM
Post Comment | Permalink
Wednesday, 24 August 2005
Bitwise operators' RND
Click to see RND over bitwise operators...
Download the source code.

Posted by delhens at 1:56 PM
Post Comment | Permalink
Loading multiple XML files on LINKED LIST concept
When we load multiple XML files, we have two ways to load.

One is like....
my_xml.load("my_xml.xml");
ur_xml.load("ur_xml.xml");
another_xml.load("another_xml.xml");

The way is good, But there are some drawbacks.
1. If XML file is bigger, the application will be hang.
2. If all 3 have same importance and any one would not loaded, there may be chance to start your application with incomplete data. For this you may need to check counter.

For chain loading of XML I have tried something, The code may need to be refinement but the logic is very similar to LINKED LIST......

Here we are...
//XML Connections....
var asn_arr = new Array();
var pers_arr = new Array();

var asn_xml = new XML();
var pers_xml = new XML();
var heading_xml = new XML();

//Taking advantage of class dynamism...
heading_xml.mv = asn_xml.mv = pers_xml.mv = this;

heading_xml.ignoreWhite = asn_xml.ignoreWhite = pers_xml.ignoreWhite = true;

//Chain reaction starts...
asn_xml.load("xmls/taskDetails.xml");

heading_xml.onLoad = function(success)
{
if(!success)
{
Debug.write("Fail to load! Trying again....");
this.load("xmls/heading.xml");
}
else
{
Debug.write("XML has loaded successfully...");
if(this.hasChildNodes())
{
_root.heading = this.lastChild.lastChild;
}

//Finally your all data is loaded. Do what ever you want...
this.mv.personal_btn.onRelease();
_root.loadContents();
}
}

pers_xml.onLoad = function(success)
{
if(!success)
{
Debug.write("Fail to load! Trying again....");
this.load("xmls/personnel.xml");
}
else
{
Debug.write("XML has loaded successfully...");
if(pers_xml.hasChildNodes())
{
for(var i = 0; i < pers_xml.lastChild.childNodes.length; i++)
{
var nodes = pers_xml.lastChild.childNodes[i];
var obj = new Object();

obj.id = nodes.childNodes[0].lastChild;
obj.cat = nodes.childNodes[1].lastChild;
obj.nam = nodes.childNodes[2].lastChild;
obj.rank = nodes.childNodes[3].lastChild;
obj.skill = nodes.childNodes[4].lastChild;
obj.locations = nodes.childNodes[5].lastChild;
obj.availability = nodes.childNodes[6].lastChild;
obj.hrs_left = nodes.childNodes[7].lastChild;
obj.training = nodes.childNodes[8].lastChild;
obj.exps = nodes.childNodes[9].lastChild;
obj.last_shift = nodes.childNodes[10].lastChild;

pers_arr.push(obj);
}
}
this.mv.heading_xml.load("xmls/heading.xml");
}
}

asn_xml.onLoad = function(success)
{
if(!success)
{
Debug.write("Failed to load! Trying again....");
this.load("xmls/taskDetails.xml");
}
else
{
if(asn_xml.hasChildNodes())
{
for(var i = 0; i < asn_xml.lastChild.childNodes.length; i++)
{
var nodes = asn_xml.lastChild.childNodes[i];
var obj = new Object();
//assignment details...
obj.client = nodes.childNodes[0].childNodes[0].lastChild;
obj.task = nodes.childNodes[0].childNodes[1].lastChild;
obj.rank = nodes.childNodes[0].childNodes[2].lastChild;
obj.site = nodes.childNodes[0].childNodes[3].lastChild;
obj.date = nodes.childNodes[0].childNodes[4].lastChild;
obj.hrs = nodes.childNodes[0].childNodes[5].lastChild;
obj.skill = nodes.childNodes[0].childNodes[6].lastChild;

//client preferences...
obj.pref1 = nodes.childNodes[1].childNodes[0].lastChild;
obj.pref2 = nodes.childNodes[1].childNodes[1].lastChild;
obj.pref3 = nodes.childNodes[1].childNodes[2].lastChild;
obj.pref4 = nodes.childNodes[1].childNodes[3].lastChild;
obj.pref5 = nodes.childNodes[1].childNodes[4].lastChild;
obj.pref6 = nodes.childNodes[1].childNodes[5].lastChild;

this.mv.asn_arr.push(obj);
}
}
this.mv.pers_xml.load("xmls/personnel.xml");
}
}


There are several more ways to load data on DATA STRUCTURE concepts. Need to explore...till then bye

Posted by delhens at 10:29 AM
Updated: Wednesday, 24 August 2005 10:39 AM
Post Comment | Permalink
Thursday, 11 August 2005
Flash 8: Lake
I have just created a dynamic lake with real water effect and some RND over blending modes. These are my first flash 8 demonstrations.Flash 8 is simply marvelous.

The url for lake is http://delhens.tripod.com/upload/lake.html
and blending experiment is http://delhens.tripod.com/upload/Blending.html

DEL

Posted by delhens at 7:34 PM
Updated: Thursday, 11 August 2005 8:49 PM
Post Comment | Permalink
Mathematical Equations
We need mathematical equations at every step in logical programming. I am posting here a AS2 class of these equations and hope this class will be extended by someone in near future.

Download the as file from here

/*****************************************************************************************
**********************Created and written by DEL********************************
**************************Dated: 3th DEC, 2004********************************************
**************************class: cEquations **********************************************
*********************Useful mathematical equations****************************************
Methods:
---------------
GCD(u:Number, v:Number) return a number. //Calculate Greatest Common Divisor...
LCM(u:Number, v:Number) return a number. //Calculate Least Common multiplier...
BIN(num:Number, base:Number) return a number. //Convert decimal no. into various formats
//of nos. like binary, hexadecimal, octadec-
//-imal etc. according to base...
commonFactor(u:Number, v:Number) return array.//Calculate common factors of 2 nos...
evenOrOdd(num:Number) return String. //Determine the given no. is odd or even.
//If even, return 'EVEN' else return 'ODD'...
factor(num:Number) return array. //Calculate factor of a number with ',' del-
//-imited array...
calcFib(num:Number) return array. //Calculate Fibbonacci's series of a number...
******************************************************************************************
******************************************************************************************
*****************************************************************************************/
dynamic class cEquations
{
function cEquations ()
{
}
public function GCD (u : Number, v : Number) : Number
{
var w, x, y;
x = u;
y = v;
while (y != 0)
{
w = x % y;
x = y;
y = w;
}
return x;
}
public function LCM (u : Number, v : Number) : Number
{
return ((u * v) / GCD (u, v));
}
public function BIN (num : Number, base : Number) : Number
{
var n = parseInt (String (num));
var b = parseInt (String (base));
return n.toString (b);
}
public function commonFactor (u : Number, v : Number) : Array
{
var arr = new Array ();
if (isNaN (u) || isNaN (v))
{
trace ("Illegal Inputs. Please provide a valid no.");
return arr;
}
if (u == 0 || v == 0)
{
trace ("No common factor.");
return arr;
}
u = Math.abs (u);
v = Math.abs (v);
for (var x = 2; x < Math.min (u, v); x )
{
var val1 = u / x;
if (val1 == Math.round (val1))
{
var val2 = v / x;
if (val2 == Math.round (val2)) arr.push (x);
}
}
return arr;
}
public function evenOrOdd (num : Number) : String
{
if (isNaN (num)) return "";
if ((num / 2) == Math.round (num / 2)) return "EVEN";
else return "ODD";
}
public function factor (num : Number) : Array
{
var n = Math.round (num);
var arr = new Array ();
for (var i = 2; i < (num / 2); i )
{
var chk = Math.round (num / i);
var iIn = Math.round (num / i);
var iOut = (num / i);
if (iIn == iOut && chk > i)
{
arr.push ((num / i) "," i);
}
}
return arr;
}
public function calcFib (num : Number) : Array
{
var arr = new Array ();
for (var i = 0; i <= num; i ) arr.push (fibonacci (i));
return arr;
}
private function fibonacci (n : Number) : Number
{
var a = 0;
if (n == 0) return a;
if (n == 1) return a;
else return (fibonacci (n - 1) fibonacci (n - 2));
}
}
//------------------------END--------------------------------

Ve a nice time....
DEL

Posted by delhens at 1:03 PM
Updated: Thursday, 11 August 2005 2:07 PM
Post Comment | Permalink
Draggable Pane
A draggable pane is extended an extended component provided by Macromedia in its DRK.
So how to use it?

Very first, you have to have an instance of the component into the library. Now....here we start...

//--------------CODE------------------------------

class Cls_drgPane extends MovieClip
{
private var drPane1:MovieClip;
private var drPane2:MovieClip;
private var drPane3:MovieClip;

function Cls_drgPane(){}

private function onLoad(Void):Void
{
this.loadPanes();
}

private function loadPanes(Void):Void
{
var arr:Array = new Array("Pane 1", "Pane 2", "Pane 3");
var cArr:Array = new Array("content1.swf", "content2.swf", "content3.swf");
for(var i = 0; i < 3; i++)
{
var att = this.attachMovie("FDraggablePaneSymbol", "drPane" + (i + 1), i + 5);
att._x = 20 + random(300);
att._y = 20 + random(300);
att.setPaneTitle(arr[i]);
att.loadScrollContent("contents/" + cArr[i]);
att.disableShader();
att.setStyleProperty("titleBackground", 0xCCAACC);
}
}
}

//-----------------CODE END-----------------------------------------

So......have fun with it. Please write me if you have any query. A N D dont write me if you find any bug in the component.

Posted by delhens at 1:00 PM
Updated: Thursday, 11 August 2005 1:08 PM
Post Comment | Permalink

Newer | Latest | Older