To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here


A Flash Developer Resource Site

Go Back   Flash Kit Community Forums > Product Support > Koolmoves

Reply
 
Thread Tools Search this Thread Display Modes
Old 12-16-2006, 07:02 PM   #1
gleninspain
Junior Member
 
Join Date: Dec 2006
Posts: 3
Dynamic Text marquee/scroll?

Hello there!

I was wondering if any of you savi people could help me with a little problem I have.....

I am making a Music player (By importing outside SWF's with the music imbedded).

I have made it so that when I press a button it plays a track and using ACTIONS-Set dynamic text control, the appropriate title is shown in my "txt1 box" . Eg "Placebo-Infrared".

That is all fine.

But i would like this text to marquee (much like the motion script ticker tape).

I tried this by accepting "yes" to the "Has html" contol in the txt1 propieties, and then putting "<marquee>placebo-infrared</marquee>" this didnt work.

I then tried putting in much more html code:

"<body>

<p>
<marquee>placebo-infrared</marquee>
</p>

</body>"

Still doesn´t work

I´m no expert at HTML coding.. so I can´t really understand why it doesnt work.


Do i have to use Javascript? Actionscricpt? or is my HTML coding just useless?

Or is it actually possible...if it isn´t sorry for wasting your time!!


Thanks glen
gleninspain is offline   Reply With Quote
Old 12-16-2006, 09:45 PM   #2
blanius
KoolMoves Moderator
 
blanius's Avatar
 
Join Date: Jul 2001
Location: Atlanta GA
Posts: 4,912
HTML in flash is limited, this is not the way to go at it.

You could script it in Actionscript. get the length of the string then use string slicing to take the part you want to see at that moment and show it in your textbox. I'll see if I can do an example.
blanius is offline   Reply With Quote
Old 12-16-2006, 10:40 PM   #3
blanius
KoolMoves Moderator
 
blanius's Avatar
 
Join Date: Jul 2001
Location: Atlanta GA
Posts: 4,912
turned out a little more complicated then I thought but here goes.

put a text field named txt1 on the stage and try this
code:

myText="Now is the time to show my text in a marquee way"

l=15 //Length of text we want to show
x=0 //where to start in the string

stringOf=function(c,l){//function to create a string of characters
var temp="" //This is a function I'm used to having in other languages.
for (var x=0;x<l;x++){
temp+=c
}
return temp
}

myText=stringOf(" ",l)+myText//add l number of spaces to the beginning of the string

display=function(){//Function to show text

var temp=myText.slice(x,l);//l=length you want to show
txt1.text=temp//put the text in the text box
x++//move up one in the text
l++//where to stop in the text see syntax for "slice" command
if (x==myText.length){//if we reach the end of the string
x=0 //reset the variables
l=15
}

}

setInterval(display,200)//setInterval runs a function on a continuous basis

stop()

blanius is offline   Reply With Quote
Old 12-17-2006, 07:28 AM   #4
gleninspain
Junior Member
 
Join Date: Dec 2006
Posts: 3
Wow thats great! Thank you ever so much !!

Just one more question...Is there a way to change the speed?

Don't worry if there isn't you've been a great help Mr Blanius

glen
gleninspain is offline   Reply With Quote
Old 12-17-2006, 07:58 AM   #5
gleninspain
Junior Member
 
Join Date: Dec 2006
Posts: 3
Oh don't worry i've found out how to do it!!!!

sorry!!

Thank you very very much!!

glen
gleninspain is offline   Reply With Quote
Reply

Go Back   Flash Kit Community Forums > Product Support > Koolmoves

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:48 PM.


internet.commerce
Be a Commerce Partner
 »  »  »  »  »  »  »
 »  »  »  »  »  »
 

    

Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.