C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.
Sign in
|
Join
|
Help
Home
Blogs
Forums
Forums
»
WinForms
»
Flash for .NET
»
Scrolling text
Scrolling text
rated by 0 users
This post has 9 Replies | 0 Followers
Posts
89,785
Reply
newsgroup_archive
Posted: Tue, Aug 2 2005 8:43 AM
rated by 0 users
Can you do scrolling text like the marquee in html?
TIA - Jeffrey.
Click here to view the original newsgroup article
(read only).
Posts
89,785
Reply
newsgroup_archive
replied on
Wed, Aug 3 2005 12:03 AM
rated by 0 users
Yes. Please check the AdBanner sample.
"UJ"
wrote in message
news:42ef6a70$1@vger5.componentone.com...
> Can you do scrolling text like the marquee in html?
>
> TIA - Jeffrey.
>
>
Click here to view the original newsgroup article
(read only).
Posts
89,785
Reply
newsgroup_archive
replied on
Thu, Aug 4 2005 4:27 PM
rated by 0 users
AdBanner appears to do this live and in front of you. Is there anyway to
save this to a SWF file to save for later use?
Thanks.
Jeffrey.
"AllenS[C1]"
wrote in message
news:42efbc65@vger5.componentone.com...
> Yes. Please check the AdBanner sample.
>
> "UJ"
wrote in message
> news:42ef6a70$1@vger5.componentone.com...
>> Can you do scrolling text like the marquee in html?
>>
>> TIA - Jeffrey.
>>
>>
>
>
Click here to view the original newsgroup article
(read only).
Posts
89,785
Reply
newsgroup_archive
replied on
Tue, Aug 9 2005 3:22 PM
rated by 0 users
I guess I sort of understand now how this works. But how would I scroll a
long, long text (text that's to big to fit on the frame) and then know when
it has ended. I guess I need to know how long the entire text would take and
then scroll through all of the text.
How can I figure out how long the text would be given a certain font size
and style and width?
"UJ"
wrote in message
news:42f27a3a$1@vger5.componentone.com...
> AdBanner appears to do this live and in front of you. Is there anyway to
> save this to a SWF file to save for later use?
>
> Thanks.
>
> Jeffrey.
> "AllenS[C1]"
wrote in message
> news:42efbc65@vger5.componentone.com...
>> Yes. Please check the AdBanner sample.
>>
>> "UJ"
wrote in message
>> news:42ef6a70$1@vger5.componentone.com...
>>> Can you do scrolling text like the marquee in html?
>>>
>>> TIA - Jeffrey.
>>>
>>>
>>
>>
>
>
Click here to view the original newsgroup article
(read only).
Posts
89,785
Reply
newsgroup_archive
replied on
Wed, Aug 10 2005 2:01 PM
rated by 0 users
Allen,
Thanks but I need to know the length that the text would be so I would know
how much to move the data.
For instance - if I know the data is going to be 400 pixels wide, I would
need to know that it will x pixels long so that I can cycle through the
whole thing on the screen. Short text may only be 300 pixels long, long
could be a couple of thousand.
Just need to be able to know how long the text would be so I can cycle
through the entire thing.
TIA - Jeffrey.
"AllenS[C1]"
wrote in message
news:42fa2c7c@vger5.componentone.com...
>I think you can use LineWidth property of that object to check the width.
>
> "UJ"
wrote in message
> news:42f90280$1@vger5.componentone.com...
>> I guess I sort of understand now how this works. But how would I scroll a
>> long, long text (text that's to big to fit on the frame) and then know
> when
>> it has ended. I guess I need to know how long the entire text would take
> and
>> then scroll through all of the text.
>>
>> How can I figure out how long the text would be given a certain font size
>> and style and width?
>>
>> "UJ"
wrote in message
>> news:42f27a3a$1@vger5.componentone.com...
>> > AdBanner appears to do this live and in front of you. Is there anyway
>> > to
>> > save this to a SWF file to save for later use?
>> >
>> > Thanks.
>> >
>> > Jeffrey.
>> > "AllenS[C1]"
wrote in message
>> > news:42efbc65@vger5.componentone.com...
>> >> Yes. Please check the AdBanner sample.
>> >>
>> >> "UJ"
wrote in message
>> >> news:42ef6a70$1@vger5.componentone.com...
>> >>> Can you do scrolling text like the marquee in html?
>> >>>
>> >>> TIA - Jeffrey.
>> >>>
>> >>>
>> >>
>> >>
>> >
>> >
>>
>>
>
>
Click here to view the original newsgroup article
(read only).
Posts
89,785
Reply
newsgroup_archive
replied on
Wed, Aug 10 2005 10:04 PM
rated by 0 users
I think you can use LineWidth property of that object to check the width.
"UJ"
wrote in message
news:42f90280$1@vger5.componentone.com...
> I guess I sort of understand now how this works. But how would I scroll a
> long, long text (text that's to big to fit on the frame) and then know
when
> it has ended. I guess I need to know how long the entire text would take
and
> then scroll through all of the text.
>
> How can I figure out how long the text would be given a certain font size
> and style and width?
>
> "UJ"
wrote in message
> news:42f27a3a$1@vger5.componentone.com...
> > AdBanner appears to do this live and in front of you. Is there anyway to
> > save this to a SWF file to save for later use?
> >
> > Thanks.
> >
> > Jeffrey.
> > "AllenS[C1]"
wrote in message
> > news:42efbc65@vger5.componentone.com...
> >> Yes. Please check the AdBanner sample.
> >>
> >> "UJ"
wrote in message
> >> news:42ef6a70$1@vger5.componentone.com...
> >>> Can you do scrolling text like the marquee in html?
> >>>
> >>> TIA - Jeffrey.
> >>>
> >>>
> >>
> >>
> >
> >
>
>
Click here to view the original newsgroup article
(read only).
Posts
89,785
Reply
newsgroup_archive
replied on
Fri, Aug 19 2005 11:00 AM
rated by 0 users
In C1FlashCanvas, there is a method MeasureString() which can return the
size of a string.
This method is only a simulation to the GDI method, Flash is mainly designed
for visual editing, not for program generating, so the text output is not
always same as what we image in GDI system.
-jason
"UJ"
wrote in message
news:42fa40e3@vger5.componentone.com...
> Allen,
> Thanks but I need to know the length that the text would be so I would
> know how much to move the data.
>
> For instance - if I know the data is going to be 400 pixels wide, I would
> need to know that it will x pixels long so that I can cycle through the
> whole thing on the screen. Short text may only be 300 pixels long, long
> could be a couple of thousand.
>
> Just need to be able to know how long the text would be so I can cycle
> through the entire thing.
>
> TIA - Jeffrey.
>
> "AllenS[C1]"
wrote in message
> news:42fa2c7c@vger5.componentone.com...
>>I think you can use LineWidth property of that object to check the width.
>>
>> "UJ"
wrote in message
>> news:42f90280$1@vger5.componentone.com...
>>> I guess I sort of understand now how this works. But how would I scroll
>>> a
>>> long, long text (text that's to big to fit on the frame) and then know
>> when
>>> it has ended. I guess I need to know how long the entire text would take
>> and
>>> then scroll through all of the text.
>>>
>>> How can I figure out how long the text would be given a certain font
>>> size
>>> and style and width?
>>>
>>> "UJ"
wrote in message
>>> news:42f27a3a$1@vger5.componentone.com...
>>> > AdBanner appears to do this live and in front of you. Is there anyway
>>> > to
>>> > save this to a SWF file to save for later use?
>>> >
>>> > Thanks.
>>> >
>>> > Jeffrey.
>>> > "AllenS[C1]"
wrote in message
>>> > news:42efbc65@vger5.componentone.com...
>>> >> Yes. Please check the AdBanner sample.
>>> >>
>>> >> "UJ"
wrote in message
>>> >> news:42ef6a70$1@vger5.componentone.com...
>>> >>> Can you do scrolling text like the marquee in html?
>>> >>>
>>> >>> TIA - Jeffrey.
>>> >>>
>>> >>>
>>> >>
>>> >>
>>> >
>>> >
>>>
>>>
>>
>>
>
>
Click here to view the original newsgroup article
(read only).
Posts
89,785
Reply
newsgroup_archive
replied on
Fri, Aug 19 2005 3:13 PM
rated by 0 users
OK. I'm thoroughly confused.
MeasureString returns a structure of type SizeF. But I'm not sure that
helps. That gave me a width of 23 by a height of 1316. Doesn't it really
need to know how wide or tall the rectangle is that I'm going to be putting
this in to and then it calculates the other dimension?
Plus what are those units of? Pixels?
Let me re-iterate what it is I'm trying to do - I have some text, that can
be of varying length, that I want to put into a flash (mostly because I want
it to grow/shrink in size if the window gets bigger/smaller. The text is
going to be length, longer than will fit on the screen at once so I want to
scroll it. Once all of the text has been displayed, I want to start over
again.
Do you have any suggestions of what I can do to make all of this happen?
TIA - Jeffrey.
"JS"
wrote in message
news:43054b40@vger5.componentone.com...
> In C1FlashCanvas, there is a method MeasureString() which can return the
> size of a string.
>
> This method is only a simulation to the GDI method, Flash is mainly
> designed for visual editing, not for program generating, so the text
> output is not always same as what we image in GDI system.
>
>
>
> -jason
>
>
>
> "UJ"
wrote in message
> news:42fa40e3@vger5.componentone.com...
>> Allen,
>> Thanks but I need to know the length that the text would be so I would
>> know how much to move the data.
>>
>> For instance - if I know the data is going to be 400 pixels wide, I would
>> need to know that it will x pixels long so that I can cycle through the
>> whole thing on the screen. Short text may only be 300 pixels long, long
>> could be a couple of thousand.
>>
>> Just need to be able to know how long the text would be so I can cycle
>> through the entire thing.
>>
>> TIA - Jeffrey.
>>
>> "AllenS[C1]"
wrote in message
>> news:42fa2c7c@vger5.componentone.com...
>>>I think you can use LineWidth property of that object to check the width.
>>>
>>> "UJ"
wrote in message
>>> news:42f90280$1@vger5.componentone.com...
>>>> I guess I sort of understand now how this works. But how would I scroll
>>>> a
>>>> long, long text (text that's to big to fit on the frame) and then know
>>> when
>>>> it has ended. I guess I need to know how long the entire text would
>>>> take
>>> and
>>>> then scroll through all of the text.
>>>>
>>>> How can I figure out how long the text would be given a certain font
>>>> size
>>>> and style and width?
>>>>
>>>> "UJ"
wrote in message
>>>> news:42f27a3a$1@vger5.componentone.com...
>>>> > AdBanner appears to do this live and in front of you. Is there anyway
>>>> > to
>>>> > save this to a SWF file to save for later use?
>>>> >
>>>> > Thanks.
>>>> >
>>>> > Jeffrey.
>>>> > "AllenS[C1]"
wrote in message
>>>> > news:42efbc65@vger5.componentone.com...
>>>> >> Yes. Please check the AdBanner sample.
>>>> >>
>>>> >> "UJ"
wrote in message
>>>> >> news:42ef6a70$1@vger5.componentone.com...
>>>> >>> Can you do scrolling text like the marquee in html?
>>>> >>>
>>>> >>> TIA - Jeffrey.
>>>> >>>
>>>> >>>
>>>> >>
>>>> >>
>>>> >
>>>> >
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Click here to view the original newsgroup article
(read only).
Posts
89,785
Reply
newsgroup_archive
replied on
Sun, Aug 28 2005 1:32 PM
rated by 0 users
I created a sample showing how to make a slide text.
Hope this helps.
Private Sub CreateSlideMovie(ByVal str As String, ByVal f As Font)
Dim size As SizeF = Me.C1FlashCanvas1.MeasureString(str, f)
size.Width = size.Width * 1.1 ' here we adjust the width a little
bit
Dim txt As FEditText = New FEditText(New Rectangle(0, 0, size.Width
* Constants.TWIPS, size.Height * Constants.TWIPS), str, f.FontFamily.Name,
f.Style.Italic, f.Style.Bold)
txt.ReadOnly = True
txt.NoSelect = True
txt.Height = f.Height * Constants.TWIPS
txt.AutoSize = True
txt.ForeColor = Color.Red
Dim movie As New C1FlashMovie(600 * Constants.TWIPS, 400 *
Constants.TWIPS)
Dim steps As Integer
steps = size.Width / 10
Dim i As Integer
For i = 2 To steps
txt.Translate(-i * 10 * Constants.TWIPS, 0)
txt.Depth = i
movie(i).AddObject(txt)
movie(i + 1).RemoveObject(txt)
Next i
Call movie.RenderToFile("c:\slide.swf")
System.Diagnostics.Process.Start("c:\slide.swf")
End Sub
-jason
"UJ"
wrote in message
news:43062f5f$1@vger5.componentone.com...
> OK. I'm thoroughly confused.
>
> MeasureString returns a structure of type SizeF. But I'm not sure that
> helps. That gave me a width of 23 by a height of 1316. Doesn't it really
> need to know how wide or tall the rectangle is that I'm going to be
> putting this in to and then it calculates the other dimension?
>
> Plus what are those units of? Pixels?
>
> Let me re-iterate what it is I'm trying to do - I have some text, that can
> be of varying length, that I want to put into a flash (mostly because I
> want it to grow/shrink in size if the window gets bigger/smaller. The text
> is going to be length, longer than will fit on the screen at once so I
> want to scroll it. Once all of the text has been displayed, I want to
> start over again.
>
> Do you have any suggestions of what I can do to make all of this happen?
>
> TIA - Jeffrey.
>
> "JS"
wrote in message
> news:43054b40@vger5.componentone.com...
>> In C1FlashCanvas, there is a method MeasureString() which can return the
>> size of a string.
>>
>> This method is only a simulation to the GDI method, Flash is mainly
>> designed for visual editing, not for program generating, so the text
>> output is not always same as what we image in GDI system.
>>
>>
>>
>> -jason
>>
>>
>>
>> "UJ"
wrote in message
>> news:42fa40e3@vger5.componentone.com...
>>> Allen,
>>> Thanks but I need to know the length that the text would be so I would
>>> know how much to move the data.
>>>
>>> For instance - if I know the data is going to be 400 pixels wide, I
>>> would need to know that it will x pixels long so that I can cycle
>>> through the whole thing on the screen. Short text may only be 300 pixels
>>> long, long could be a couple of thousand.
>>>
>>> Just need to be able to know how long the text would be so I can cycle
>>> through the entire thing.
>>>
>>> TIA - Jeffrey.
>>>
>>> "AllenS[C1]"
wrote in message
>>> news:42fa2c7c@vger5.componentone.com...
>>>>I think you can use LineWidth property of that object to check the
>>>>width.
>>>>
>>>> "UJ"
wrote in message
>>>> news:42f90280$1@vger5.componentone.com...
>>>>> I guess I sort of understand now how this works. But how would I
>>>>> scroll a
>>>>> long, long text (text that's to big to fit on the frame) and then know
>>>> when
>>>>> it has ended. I guess I need to know how long the entire text would
>>>>> take
>>>> and
>>>>> then scroll through all of the text.
>>>>>
>>>>> How can I figure out how long the text would be given a certain font
>>>>> size
>>>>> and style and width?
>>>>>
>>>>> "UJ"
wrote in message
>>>>> news:42f27a3a$1@vger5.componentone.com...
>>>>> > AdBanner appears to do this live and in front of you. Is there
>>>>> > anyway to
>>>>> > save this to a SWF file to save for later use?
>>>>> >
>>>>> > Thanks.
>>>>> >
>>>>> > Jeffrey.
>>>>> > "AllenS[C1]"
wrote in message
>>>>> > news:42efbc65@vger5.componentone.com...
>>>>> >> Yes. Please check the AdBanner sample.
>>>>> >>
>>>>> >> "UJ"
wrote in message
>>>>> >> news:42ef6a70$1@vger5.componentone.com...
>>>>> >>> Can you do scrolling text like the marquee in html?
>>>>> >>>
>>>>> >>> TIA - Jeffrey.
>>>>> >>>
>>>>> >>>
>>>>> >>
>>>>> >>
>>>>> >
>>>>> >
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Click here to view the original newsgroup article
(read only).
Posts
89,785
Reply
newsgroup_archive
replied on
Fri, Sep 30 2005 8:41 AM
rated by 0 users
Jason,
Thanks for getting back to me on. Sorry it took me so long to get around to
it. When I try this, a couple of things happen.
1. The text wraps. I have my string defined and my font set up - but when I
create the swf, the text wraps to 2 lines.
2. The text starts to scroll left, gets to close to the end of the string
and then it disappears and sits there. Then it starts up
again.
Any help of these would be appreciated. This is code is a great start for
what I need to do.
And now - just to add more complications - any ideas on how to get text to
scroll up instead of left? I need to do that also.
Thanks again.
Jeffrey.
"JS"
wrote in message
news:433a877b@vger5.componentone.com...
>I created a sample showing how to make a slide text.
> Hope this helps.
>
>
> Private Sub CreateSlideMovie(ByVal str As String, ByVal f As Font)
>
> Dim size As SizeF = Me.C1FlashCanvas1.MeasureString(str, f)
> size.Width = size.Width * 1.1 ' here we adjust the width a little
> bit
> Dim txt As FEditText = New FEditText(New Rectangle(0, 0, size.Width
> * Constants.TWIPS, size.Height * Constants.TWIPS), str, f.FontFamily.Name,
> f.Style.Italic, f.Style.Bold)
>
> txt.ReadOnly = True
> txt.NoSelect = True
> txt.Height = f.Height * Constants.TWIPS
> txt.AutoSize = True
> txt.ForeColor = Color.Red
>
> Dim movie As New C1FlashMovie(600 * Constants.TWIPS, 400 *
> Constants.TWIPS)
> Dim steps As Integer
> steps = size.Width / 10
>
> Dim i As Integer
> For i = 2 To steps
> txt.Translate(-i * 10 * Constants.TWIPS, 0)
> txt.Depth = i
> movie(i).AddObject(txt)
> movie(i + 1).RemoveObject(txt)
> Next i
>
> Call movie.RenderToFile("c:\slide.swf")
> System.Diagnostics.Process.Start("c:\slide.swf")
>
> End Sub
>
>
> -jason
>
>
> "UJ"
wrote in message
> news:43062f5f$1@vger5.componentone.com...
>> OK. I'm thoroughly confused.
>>
>> MeasureString returns a structure of type SizeF. But I'm not sure that
>> helps. That gave me a width of 23 by a height of 1316. Doesn't it really
>> need to know how wide or tall the rectangle is that I'm going to be
>> putting this in to and then it calculates the other dimension?
>>
>> Plus what are those units of? Pixels?
>>
>> Let me re-iterate what it is I'm trying to do - I have some text, that
>> can be of varying length, that I want to put into a flash (mostly because
>> I want it to grow/shrink in size if the window gets bigger/smaller. The
>> text is going to be length, longer than will fit on the screen at once so
>> I want to scroll it. Once all of the text has been displayed, I want to
>> start over again.
>>
>> Do you have any suggestions of what I can do to make all of this happen?
>>
>> TIA - Jeffrey.
>>
>> "JS"
wrote in message
>> news:43054b40@vger5.componentone.com...
>>> In C1FlashCanvas, there is a method MeasureString() which can return the
>>> size of a string.
>>>
>>> This method is only a simulation to the GDI method, Flash is mainly
>>> designed for visual editing, not for program generating, so the text
>>> output is not always same as what we image in GDI system.
>>>
>>>
>>>
>>> -jason
>>>
>>>
>>>
>>> "UJ"
wrote in message
>>> news:42fa40e3@vger5.componentone.com...
>>>> Allen,
>>>> Thanks but I need to know the length that the text would be so I would
>>>> know how much to move the data.
>>>>
>>>> For instance - if I know the data is going to be 400 pixels wide, I
>>>> would need to know that it will x pixels long so that I can cycle
>>>> through the whole thing on the screen. Short text may only be 300
>>>> pixels long, long could be a couple of thousand.
>>>>
>>>> Just need to be able to know how long the text would be so I can cycle
>>>> through the entire thing.
>>>>
>>>> TIA - Jeffrey.
>>>>
>>>> "AllenS[C1]"
wrote in message
>>>> news:42fa2c7c@vger5.componentone.com...
>>>>>I think you can use LineWidth property of that object to check the
>>>>>width.
>>>>>
>>>>> "UJ"
wrote in message
>>>>> news:42f90280$1@vger5.componentone.com...
>>>>>> I guess I sort of understand now how this works. But how would I
>>>>>> scroll a
>>>>>> long, long text (text that's to big to fit on the frame) and then
>>>>>> know
>>>>> when
>>>>>> it has ended. I guess I need to know how long the entire text would
>>>>>> take
>>>>> and
>>>>>> then scroll through all of the text.
>>>>>>
>>>>>> How can I figure out how long the text would be given a certain font
>>>>>> size
>>>>>> and style and width?
>>>>>>
>>>>>> "UJ"
wrote in message
>>>>>> news:42f27a3a$1@vger5.componentone.com...
>>>>>> > AdBanner appears to do this live and in front of you. Is there
>>>>>> > anyway to
>>>>>> > save this to a SWF file to save for later use?
>>>>>> >
>>>>>> > Thanks.
>>>>>> >
>>>>>> > Jeffrey.
>>>>>> > "AllenS[C1]"
wrote in message
>>>>>> > news:42efbc65@vger5.componentone.com...
>>>>>> >> Yes. Please check the AdBanner sample.
>>>>>> >>
>>>>>> >> "UJ"
wrote in message
>>>>>> >> news:42ef6a70$1@vger5.componentone.com...
>>>>>> >>> Can you do scrolling text like the marquee in html?
>>>>>> >>>
>>>>>> >>> TIA - Jeffrey.
>>>>>> >>>
>>>>>> >>>
>>>>>> >>
>>>>>> >>
>>>>>> >
>>>>>> >
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
Click here to view the original newsgroup article
(read only).
Previous
|
Next
Page 1 of 1 (10 items) |
RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.