|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
So I'm fairly new to papervision (latest version which includes vectorvision) and I have some basic questions:
First off, I'm quite thankful for the vector-enabled text enhancements which comes with vectorvision however, I find that it's implementation of the class Text3D is rather impractical. Now, being that I am quite new to this all, I'm moreso under the impression that I'm not doing things correctly here. So I'd like to know if/how it is possible to create practical multiline text. So far, I've been using the Text3D class and manually formatting the wordwrap. This works fine and all, however, as I've mentioned, it plainly is quite impractical. By default, this class seems to simply spit out each letter horizontally. In addition, given that displayobject3ds do not have access to their own width and height properties, text3d inherits this lack of geometry properties (therefore, there seems to be no real hope for word-wrap). Justification alignment, therefore, is also out the window. Secondly involves the implementation of the interactivity events with regard to text3d objects. Apparently, the only true way to let text3d objects clickable is to simply loop through each letter of the text and add the event listener to each letter. The only faux-solution I've actually come up with is to create a textfield instance and apply the textfield as a moviematerial on an empty plane. Then I can add the event listener to the plane. This works alright, however, the smoothing functions and speed of the render graphics are pitiful in lieu of vectors. So I'd like to know if there is also a more practical way to apply these event listeners (ie enabling text-clicking/hovering) to full text3d objects rather than its individual letters. Any help, links, etc would be greatly appreciated. Thank you! -J. |
|
#2
|
|||||
|
|||||
|
I just started out trying to use text with papervision. I wanted to be able to use existing textfields for my text content. I started with using the moviematerial method, which works fine because you can embed whatever font you like, but stretching, pixelation and performance were at issue.
Text3D is great for its sharpness and ability to manipulate/animate on a line or character basis (i will be playing with this for sure) To get word wrapping you simply have to type "\n" in your string that you pass to the constructor or set through the text property. This can be a pain if you need to resize your text-container width, so i wrote a little function in my test project for taking a textField and applying it's text to a Text3D object : actionscript Code:
this way you can just edit the original textField's size (with multiline set to true) and your Text3D object should reflect the word-wraps. However, this wont translate the font/color so I'm using techniques outlined here to use my own fonts - labs.zavoo.com/?p=105 as for creating interaction on a whole Text3D, i haven't gotten there yet really, but looping through the characters can't be THAT much hassle. You could even create a few functions within the Text3D class such as addClickHandler('fucntionname') etc, which would provide a single line interface to do just that. -n |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > ActionScript 3 - Papervision3d/vectorvision button creation and/or textfields |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|