Monday, December 24, 2007
RSS feeds links
What is an RSS feed? Some example links that show how to use RSS feeds.
http://www.xml.com/pub/a/2002/12/18/dive-into-xml.html
This is a good example of a Flash RSS feed reader.
http://www.thegoldenmean.com/technique/rssReader01.html
http://www.xml.com/pub/a/2002/12/18/dive-into-xml.html
This is a good example of a Flash RSS feed reader.
http://www.thegoldenmean.com/technique/rssReader01.html
Friday, December 21, 2007
Tuesday, December 18, 2007
remove all movieclips from a container in actionscript
Container = _root;
for (obj in Container)
{
trace("Type:" + typeof(Container[obj]));
if (typeof(Container[obj])=="movieclip")
{
trace("Name:" + Container[obj]._name);
Container[obj].removeMovieClip();//for attached instances
unloadMovie(Container[obj]);//for loaded instances
if(Container == _root)
MC.removeMovieClip();
}
}
Labels:
actionscript,
data type,
Flash,
removemovieclip,
unloadmovie
Friday, December 14, 2007
Flash Tween Class
Here is a great link for using the tween and ease object class.
http://www.kirupa.com/developer/actionscript/tween.htm
http://www.kirupa.com/developer/actionscript/tween.htm
Thursday, December 13, 2007
Flash Actionscript Math Util
function distance(x1,y1,x2,y2,rounded)
{
var distanceX = x2-x1;
var distanceY = y2-y1;
if(rounded == false)
{
return(Math.sqrt(distanceX * distanceX + distanceY * distanceY));
}
else
{
return(Math.round(Math.sqrt(distanceX * distanceX + distanceY * distanceY)));
}
}
function random_numberGen(minimumNumberAllowed,maximumNumberAllowed)
{
do
{
randomX = (Math.round(Math.random()*maximumNumberAllowed));
}
while(randomX < minimumNumberAllowed)
return(randomX);
}
Flash dynamic Fade actionscript
slides_array = new Array
(
"swf/automated.swf",
"swf/buyNow.swf",
"swf/easy1.swf",
"swf/money.swf"
)
random_effects = new Array
(
"zoomin",
"zoomout",
"pan_right",
"pan_left"
)
trace(slides_array[0]);
slideNum = 0;
change_out_time = 5000;
fade_speed = 50;
slideLoaded = false;
trace( slides_array.length )
loadSlide();
function loadSlide()
{
loadMovie(slides_array[slideNum], window);
//call_changeout();
}
call_changeout();
function call_changeout()
{
fade_out_interval = setInterval(call_fade_out_Slide, change_out_time);
}
function call_fade_out_Slide()
{
fade_out_interval = setInterval(fade_out_Slide, fade_speed);
trace("call_fade_out called");
}
function fade_out_Slide()
{
trace(slideNum + " should fade");
if(window._alpha > 0)
{
window._alpha -= 5;
}
else
{
clearInterval(fade_out_interval);
call_nextSlide();
}
}
function call_nextSlide()
{
trace("call_nextSlide working");
if(slideNum < slides_array.length -1)
{
slideNum++;
}
else
{
slideNum = 0;
}
loadSlide();
window._alpha = 100;
}
class test
class Paginate
{
function displayObjects()
{
//echo "displsay ";
echo $this->containerStartTag;//usually starts the table;
echo "\n".$this->rowStartTag."\n";
while($this->nDisplay < ($this->nRowsMax*$this->nColumnsMax)&& $this->nObjects < $this->nObjectsTotal)
{
if($this->nColumns == $this->nColumnsMax)
{
echo $this->rowEndTag."\n".$this->rowStartTag."\n";
$this->nColumns=0;//reset columns;
}
echo "\t".$this->divisionStartTag.$this->ObjectOpenTag. " id='".$this->ObjectIDprefix.$this->nObjects."'" .$this->ObjectCloseTag.$this->nObjects.$this->divisionEndTag."\n";
$this->nColumns++;
$this->nObjects++;
$this->nDisplay++;
}
echo $this->rowEndTag."\n";
echo $this->containerEndTag."\n";//usually starts the table;
}//end function displayObjects
}
?>
Paginate class php
class Paginate
{
function displayObjects()
{
//echo "displsay ";
echo $this->containerStartTag;//usually starts the table;
echo "\n".$this->rowStartTag."\n";
while($this->nDisplay < ($this->nRowsMax*$this->nColumnsMax)&& $this->nObjects < $this->nObjectsTotal)
{
if($this->nColumns == $this->nColumnsMax)
{
echo $this->rowEndTag."\n".$this->rowStartTag."\n";
$this->nColumns=0;//reset columns;
}
echo "\t".$this->divisionStartTag.$this->ObjectOpenTag. " id='".$this->ObjectIDprefix.$this->nObjects."'" .$this->ObjectCloseTag.$this->nObjects.$this->divisionEndTag."\n";
$this->nColumns++;
$this->nObjects++;
$this->nDisplay++;
}
echo $this->rowEndTag."\n";
echo $this->containerEndTag."\n";//usually starts the table;
}//end function displayObjects
}
?>
changes
{
function displayObjects()
{
//echo "
echo $this->containerStartTag;//usually starts the table;
echo "\n".$this->rowStartTag."\n";
while($this->nDisplay < ($this->nRowsMax*$this->nColumnsMax)&& $this->nObjects < $this->nObjectsTotal)
{
if($this->nColumns == $this->nColumnsMax)
{
echo $this->rowEndTag."\n".$this->rowStartTag."\n";
$this->nColumns=0;//reset columns;
}
echo "\t".$this->divisionStartTag.$this->ObjectOpenTag. " id='".$this->ObjectIDprefix.$this->nObjects."'" .$this->ObjectCloseTag.$this->nObjects.$this->divisionEndTag."\n";
$this->nColumns++;
$this->nObjects++;
$this->nDisplay++;
}
echo $this->rowEndTag."\n";
echo $this->containerEndTag."\n";//usually starts the table;
}//end function displayObjects
}
?>
changes
Subscribe to:
Posts (Atom)