Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 23rd, 2009, 02:09 AM
NXInteractif NXInteractif is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2009
Posts: 34 NXInteractif User rank is Sergeant Major (2000 - 5000 Reputation Level)NXInteractif User rank is Sergeant Major (2000 - 5000 Reputation Level)NXInteractif User rank is Sergeant Major (2000 - 5000 Reputation Level)NXInteractif User rank is Sergeant Major (2000 - 5000 Reputation Level)NXInteractif User rank is Sergeant Major (2000 - 5000 Reputation Level)NXInteractif User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 9 h 13 m 7 sec
Reputation Power: 47
Send a message via AIM to NXInteractif
Lightbulb ActionScript 3 - Papervision3d/vectorvision button creation and/or textfields

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.

Reply With Quote
  #2  
Old August 13th, 2009, 09:26 AM
ntheorist ntheorist is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2009
Posts: 1 ntheorist User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 38 m 45 sec
Reputation Power: 0
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:
Original - actionscript Code
  1. function textField3D( tf:TextField, font:Font3D, fontMat:Letter3DMaterial )
  2. {
  3.     var t:String = '';
  4.     var lineCount:int = tf.numLines;
  5.     for( var i:uint = 0; i<lineCount; i++)    
  6.     {        
  7.         t+= tf.getLineText(i)+"\n";                
  8.     }           
  9.  
  10.     return new Text3D( t, font, fontMat );   
  11. }


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

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > ActionScript 3 - Papervision3d/vectorvision button creation and/or textfields


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
Stay green...Green IT