|
-
dynamic Text effect!
Hi
I've got a textfiled in my movie named text and different buttons; Home, News, Audio etc etc. Check the link below:
www.vmgcomputers.com/cicero/main.html
I use this command to load text from the external .txt files named after the buttons. For the home button (who is in a mc by the way) i use this command:
Code:
on (release) {
loadVariables("home.txt","_root");
}
Now i want to ad some kind of cool animation to my dynamic text. Is there anyway how to do this? It would be cool the fade in the text for example when i load the external text into the dynamic textfiled.
Thanks in advance.
Please tell me what u think about my page so far
-
KoolMoves Moderator
If you use a Contentpane instead of the textfield you can use transistions when loading content.
-
ehhh... ok... how do i do that?
-
Polak Maly
-
Last edited by xzerox_xzerox; 08-19-2006 at 12:58 PM.
-
Polak Maly
you welcome. pleasure was all mine :]
BTW: http://e.domaindlx.com/xzerox/v4/ this is not working...
-
what???!?!?! it works fine for me! But the server has ads now that destroys my layout.
Please check my new site made in koolmoves and do a review 
www.vmgcomputers.com/cicero/main.html
-
damn! This Contentpane destroys my layout... isn't there a way to do this effect on textfileds?
-
Polak Maly
i dont know, but you can freely custiomize contentpanes. Search this forum for contentpane :] there are tens of posts about it.
-
 Originally Posted by xzerox_xzerox
damn! This Contentpane destroys my layout... isn't there a way to do this effect on textfileds?
In what way does it destroy your layout ?
The contentpane internally uses a dynamic textfield so yes, it's possible to do this on textfields with some scripting. Depending on what effect you want it can be a bit complicated to create.
-
hi... thanks for all the relpepys... If i'm gonna use a Contentpane i want it to look as my textfiled does... Look at www.vmgcomputers.com/cicero/main.html
I fade in effect would be nice... I guess it could be done with alpha? The problem is that i want every new text fade in and that is maybe a bit complicated because i use
Code:
on (release) {
loadVariables("home.txt","_root");
}
in my buttons inside my movieclips.
-
That text shouldn't be a problem for a contentpane if you don't mind the fact that a contentpane normally has a solid color background.
Setting _alpha for a dynamic textfield only works if you are using embedded fonts otherwise you have to control the alpha with the ColorMatrixFilter class.
-
ok... brants... and how can i contral the alpha with ColorMatrixFiler class?
I'm a noob u see
-
up to my .as in code
His name is Wilbert BTW. If you choose "About Koolmoves" in your help menu...this is who he is:
Last edited by Chris_Seahorn; 08-20-2006 at 02:25 PM.
-
That's right Chris 
Anyway, here's a flash 8 code example of a crossfade every time you load a new text.
Code:
// create a new LoadVars object
lv = new LoadVars();
// assign the textfield we want to load the text into
lv.textField = txt1;
// crossfade function
lv.crossFade = function(){
this.alpha += this.step;
this.textField.filters = [new flash.filters.ColorMatrixFilter([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,this.alpha,0])];
if (this.alpha <= 0){
this.step *= -1;
this.textField.text = this.newText;
} else if (this.alpha >= 1){
clearInterval(this.intervalID);
this.intervalID = 0;
}
}
// onData handler
lv.onData = function(v){
if (v != undefined ){
this.newText = v;
if (!this.intervalID) this.intervalID = setInterval(this,'crossFade',50);
this.alpha = 1;
this.step = -0.1;
}
}
// load the external text
lv.load('myText.txt');
Edit:
What I meant was a fade out and in again. I used the word crossfade in the wrong way since it's not fading out the old one while fading in the new one. That would require two dynamic textfields.
Last edited by w.brants; 08-20-2006 at 03:16 PM.
-
thank you so much Wilbert. I didn't know u have programed koolmoves. Nice work!!!!
-
 Originally Posted by xzerox_xzerox
I didn't know u have programed koolmoves.
I haven't. Bob it the programmer.
I'm just a registered user who contributed some actionscript code just like some other users like for example Hilary or Joe who contributed code or fun files.
-
up to my .as in code
I meant no disrespect to the amazing work of Bob Hartzell or the Lucky Monkey team. I just wanted xzerox_xzerox to understand who he was addressing and your importance to the KM team.
-
aha i see... My name is Richard by the way, Chris... I'm gonna test the code now...
-
up to my .as in code
Nice to meet your Richard!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|