Friday, September 30, 2011
Sharepoint 2010 - Left Navigation CSS
/* ========| TOP NAVIGATION STYLES |======== */
/* item style */
.LeftNav {
width:200px;
}
/* item style */
.LeftNav li.static > .menu-item {
padding:5px 5px 5px 10px ; color:black; font-weight:bold;
border-bottom:1px solid #ccc; font-size:12px; background:#DADAE9 !important;
}
/* item style */
.LeftNav li.static > ul.static > li.static > .menu-item {
padding-left:20px; font-weight:normal; font-size:11px; background:#EAEAF2!important;
}
/* item style hover */
.LeftNav li.static > a:hover, .LeftNav li.static > ul.static > li.static > a:hover { background:#38424E !important; color:white;
}
/* flyout holder */
.LeftNav ul.dynamic {
}
/* flyout item */
.LeftNav li.dynamic > .menu-item {
background:blue;
}
/* flyout item hover */
.LeftNav li.dynamic > a:hover {
}
/* hide arrows for top level items with flyouts
.menu-horizontal a.dynamic-children span.additional-background,
.menu-horizontal span.dynamic-children span.additional-background{
padding-right:0px;
background-image:none;
}
*/
/* ==========| LEFT NAVIGATION STYLES |=========== */
/* item style */
.LeftNav {
width:200px;
}
/* item style */
.LeftNav li.static > .menu-item {
padding:5px 5px 5px 10px ; color:black; font-weight:bold;
border-bottom:1px solid #ccc; font-size:12px; background:#DADAE9 !important;
}
/* item style */
.LeftNav li.static > ul.static > li.static > .menu-item {
padding-left:20px; font-weight:normal; font-size:11px; background:#EAEAF2!important;
}
/* item style hover */
.LeftNav li.static > a:hover, .LeftNav li.static > ul.static > li.static > a:hover { background:#38424E !important; color:white;
}
/* flyout holder */
.LeftNav ul.dynamic {
}
/* flyout item */
.LeftNav li.dynamic > .menu-item {
background:blue;
}
/* flyout item hover */
.LeftNav li.dynamic > a:hover {
}
/* hide arrows for top level items with flyouts
.menu-horizontal a.dynamic-children span.additional-background,
.menu-horizontal span.dynamic-children span.additional-background{
padding-right:0px;
background-image:none;
}
*/
/* ==========| LEFT NAVIGATION STYLES |=========== */
Sharepoint 2010 - Top Navigation CSS
/* ==========| TOP NAVIGATION STYLES |============ */
/* item style */
.s4-tn li.static > .menu-item { color:white; padding:10px 10px 10px 10px; font-size:12px; font-family:Verdana !important;
}
/* item style hover */
.s4-tn li.static > a:hover { background:#38424E; color:white; text-decoration:none;
}
/* flyout holder */
.s4-tn ul.dynamic {
}
/* flyout item */
.s4-tn li.dynamic > .menu-item {
background:#38424E; color:white;
padding:4px 10px; border-bottom:1px solid #526172; font-family:Verdana !important;}
/* flyout item hover */
.s4-tn li.dynamic > a:hover { background:#2D3238;
}
/* hide arrows for top level items with flyouts
.menu-horizontal a.dynamic-children span.additional-background,
.menu-horizontal span.dynamic-children span.additional-background{
padding-right:0px;
background-image:none;
}*/
/* ===========| TOP NAVIGATION STYLES |============= */
/* item style */
.s4-tn li.static > .menu-item { color:white; padding:10px 10px 10px 10px; font-size:12px; font-family:Verdana !important;
}
/* item style hover */
.s4-tn li.static > a:hover { background:#38424E; color:white; text-decoration:none;
}
/* flyout holder */
.s4-tn ul.dynamic {
}
/* flyout item */
.s4-tn li.dynamic > .menu-item {
background:#38424E; color:white;
padding:4px 10px; border-bottom:1px solid #526172; font-family:Verdana !important;}
/* flyout item hover */
.s4-tn li.dynamic > a:hover { background:#2D3238;
}
/* hide arrows for top level items with flyouts
.menu-horizontal a.dynamic-children span.additional-background,
.menu-horizontal span.dynamic-children span.additional-background{
padding-right:0px;
background-image:none;
}*/
/* ===========| TOP NAVIGATION STYLES |============= */
Monday, December 21, 2009
Reverse Play
btn.addEventListener(MouseEvent.CLICK, ply)
function ply(e:MouseEvent) {
addEventListener(Event.ENTER_FRAME,function () {
if (rmv.currentFrame>1) {
rmv.gotoAndStop(rmv.currentFrame-1);
} else {
rmv.play();
}
}
)
}
function ply(e:MouseEvent) {
addEventListener(Event.ENTER_FRAME,function () {
if (rmv.currentFrame>1) {
rmv.gotoAndStop(rmv.currentFrame-1);
} else {
rmv.play();
}
}
)
}
Tuesday, November 24, 2009
Excellent Text Randomizer
var randomChars:String = "a b c d e f g h i j k l m n o p q r s t u v 1 2 3 4 5 6 7 8 9 0 ! @ # $ % ^ & * ( ) { } < > / ?"
var charArray:Array = randomChars.split(" ");
function randText(len:int = 6):String
{
var tempArray:Array = new Array(len);
for (var z:int = 0; z < len; z++)
{
tempArray[z] = charArray[int(Math.random() * charArray.length)];
}
return tempArray.join("");
}
function revealText(toReveal:String, target:TextField, speed:int = 30, inc:int = 1):void
{
var count:int = 0;
var curS:String = new String()
var t:Timer = new Timer(speed, toReveal.length);
t.addEventListener(TimerEvent.TIMER, revInc);
t.start()
function revInc(e:Event):void
{
curS += toReveal.substring(count, count + inc);
count += inc;
target.text = (curS + randText(toReveal.length - curS.length))
}
}
revealText("This is a String | Eranda Ekanayake", textBox)
Put this code on the 1st frame and create dynamic text box on the stage and name it "textbox". Enjoy!!!!!!!!
--------------------------------------------------------------
Download source files
var charArray:Array = randomChars.split(" ");
function randText(len:int = 6):String
{
var tempArray:Array = new Array(len);
for (var z:int = 0; z < len; z++)
{
tempArray[z] = charArray[int(Math.random() * charArray.length)];
}
return tempArray.join("");
}
function revealText(toReveal:String, target:TextField, speed:int = 30, inc:int = 1):void
{
var count:int = 0;
var curS:String = new String()
var t:Timer = new Timer(speed, toReveal.length);
t.addEventListener(TimerEvent.TIMER, revInc);
t.start()
function revInc(e:Event):void
{
curS += toReveal.substring(count, count + inc);
count += inc;
target.text = (curS + randText(toReveal.length - curS.length))
}
}
revealText("This is a String | Eranda Ekanayake", textBox)
Put this code on the 1st frame and create dynamic text box on the stage and name it "textbox". Enjoy!!!!!!!!
--------------------------------------------------------------
Download source files
Wednesday, August 26, 2009
Dynamic content preloader
Put this code into ur first frame of the animation.
-------------------------------------------------------------------------
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;
var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
l.load(new URLRequest("img1.jpg"));
function loop(e:ProgressEvent):void {
var perc:Number = e.bytesLoaded / e.bytesTotal;
percent.text = Math.ceil(perc*100).toString();
}
function done(e:Event):void {
var mytween:Tween = new Tween(l, "scaleX",Strong.easeOut,0,1,3,true);
var mytween2:Tween = new Tween(l,
"scaleY",Elastic.easeOut,0,1,3,true);
removeChildAt(0);
percent = null;
addChild(l);
}
-------------------------------------------------------------------------
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;
var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
l.load(new URLRequest("img1.jpg"));
function loop(e:ProgressEvent):void {
var perc:Number = e.bytesLoaded / e.bytesTotal;
percent.text = Math.ceil(perc*100).toString();
}
function done(e:Event):void {
var mytween:Tween = new Tween(l, "scaleX",Strong.easeOut,0,1,3,true);
var mytween2:Tween = new Tween(l,
"scaleY",Elastic.easeOut,0,1,3,true);
removeChildAt(0);
percent = null;
addChild(l);
}
AS3 Normal Preloader
You just need to put this code into ur first frame of flash animation and start the animation on 2nd frame.That's all.
------------------------------------------------------------------------------------
stop();
addEventListener(Event.ENTER_FRAME, loadProgress);
function loadProgress(event:Event):void {
var bytes_loaded:int = this.root.loaderInfo.bytesLoaded;
var bytes_total:int = this.root.loaderInfo.bytesTotal;
var bytes_percent:int = Math.round((bytes_loaded/bytes_total)*100);
per.text = bytes_percent + " %";
trace((bytes_loaded/bytes_total)*100);
if (bytes_loaded >= bytes_total) {
trace("This movie is loaded");
removeEventListener(Event.ENTER_FRAME, loadProgress);
gotoAndPlay(1);
per.text = "";
gotoAndPlay(2)
//where ur animation starts
}
}
------------------------------------------------------------------------------------
stop();
addEventListener(Event.ENTER_FRAME, loadProgress);
function loadProgress(event:Event):void {
var bytes_loaded:int = this.root.loaderInfo.bytesLoaded;
var bytes_total:int = this.root.loaderInfo.bytesTotal;
var bytes_percent:int = Math.round((bytes_loaded/bytes_total)*100);
per.text = bytes_percent + " %";
trace((bytes_loaded/bytes_total)*100);
if (bytes_loaded >= bytes_total) {
trace("This movie is loaded");
removeEventListener(Event.ENTER_FRAME, loadProgress);
gotoAndPlay(1);
per.text = "";
gotoAndPlay(2)
//where ur animation starts
}
}
Subscribe to:
Posts (Atom)