Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 300
  • Last Modified:

Fading Text Control

I'm looking for a simple way to perform text transitions.

Like

"Hello Welcome" fades to background color.
"Fading is simple" fades up from background color

Any ideas ?
0
OhNowISee
Asked:
OhNowISee
  • 9
  • 3
  • 2
  • +1
1 Solution
 
rpkhareCommented:
I see that you are using Visual Web Developer 2008. Why not experiment this using Silverlight? Have a look at these links:

http://www.codeproject.com/KB/silverlight/AgDynAnimations.aspx
http://www.primaryobjects.com/CMS/Article71.aspx
0
 
rpkhareCommented:
If you want to do without using Silverlight, then:
http://www.codeproject.com/KB/scripting/jsfadetext.aspx
0
 
smokingspacemanCommented:
There are so many ways you can do this.
A really easy way to do this along with so many other effects is to use a javascript library like mootools.
http://demos.mootools.net/Effects#

You download the mootools.js file and create a reference to it in your HTML.

and then in the <head> section of your document put this javascript code
(assuming
1.you have two spans (span1, span2)  positioned on top of each other with the text "hello welcome" and "Fading is simple" respectively.
2.background color is black and initial font color is white)

<script type="text/javascript">
window.addEvent('onload', function() {
       
        //span1
        var myEffect = new Fx.Tween(span1);
	// We change the font-color of the element
	myEffect.start('color', '#000');
 
        //span2
        var myEffect = new Fx.Tween(span2);
	// We change the font-color of the element
	myEffect.start('color', '#fff');
 
});
</script>

Open in new window

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
OhNowISeeAuthor Commented:
I'm using express.

Is that a problem ?
0
 
OhNowISeeAuthor Commented:
And not c# !
0
 
OhNowISeeAuthor Commented:
The moo stuff looks good.  Is it free ?

How do I 'create a reference' ?

Can it be used to run continuously ? (A bit like an AdRotator but just fading from one line of text to another)?

0
 
smokingspacemanCommented:
Yes its free and distributed on MIT license as far as i remember.
This is how you create a reference to an external javascript document in your HTML.
<script type="text/javascript" src="mootools.js"></script>

Well you can't run the script i gave you to make it run continuously. Instead you can use something like this.
http://smoothgallery.jondesign.net/
0
 
OhNowISeeAuthor Commented:
Hmm now it seems to be getting compilicated !

Is there a webcontrol that will do what I want ?
0
 
smokingspacemanCommented:
This is not free but will suit your needs.
http://www.telerik.com/products/aspnet-ajax/controls/rotator/overview.aspx

If not you can always look at silverlight.
0
 
OhNowISeeAuthor Commented:
I've seen a demo for the AJAX Animation extender that looks promising but the code is v2 and I have asp.net 3.5.

Could someone write me a code block ?
Can't find any resources on amination setup.
0
 
OhNowISeeAuthor Commented:
Hellllllllllllllllllllllllllp !
0
 
OhNowISeeAuthor Commented:
Ahhh (pulls more hair out) !

Can anyone give me a page with SilverLightMooJavaWhatEver that can solve my problem ?

Maybe I can get away without continuous cycling.  Is there a way to set the fade speed in Moo?
0
 
OhNowISeeAuthor Commented:
OK back to SmokingSpaceMan !

How do I place spans on top of each other ?

Can you rustle me up a demo page ?

0
 
OhNowISeeAuthor Commented:
Finally I used JavaScript from this site

http://www.greywyvern.com/code/js/fade
0
 
Computer101Commented:
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 9
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now