Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 01-25-2005, 12:29 PM   #1
cortomaltese
Registered User
 
Join Date: Jan 2005
Posts: 5
Default textEffect

has anyone got an idea why this code only runs on the 1. frame???

// by tommywizbang/Xenozip
// Enjoy!
this.onLoad = function() {
tf = "";
text = "your text comes here... ncvdkjsbnvcjkabdfnvjnbaljbnjdalnbvjanvnvjkdsanvkln asjlv";
_root.tf_max = text.length;
// Set whatever speed you like! The function below takes care of any problems. If the speed wacks it out, the tf is set to the text string without error.
// you don't notice anything becuase the text is moving fast anyway.
speed=1;
};
this.onEnterFrame = function() {
if (_root.tf_max<=1) {
// This sets the tf to the text string. This is the fix for it wacking out the first words in the text becuase of the max length.
output = substring(text, 1);
tf = output;
break;
} else {
tfLength = _root.tf_max-speed;
_root.tf_max = tfLength;
output = substring(text, tfLength, speed);
tf = output+tf;
}
};
MovieClip.prototype.reset = function () {
tf = "";
// Reset the tf_max to allow it to "retype" the text
_root.tf_max = text.length;
}


help!!
cortomaltese is offline   Reply With Quote
Old 01-25-2005, 12:40 PM   #2
cortomaltese
Registered User
 
Join Date: Jan 2005
Posts: 5
Default txtEffect

ok, i figured it out..
"onLoad" part of the code goes to the first frame, anything else goes wherever you want to start your ani..
cortomaltese is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:26 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.