Dynamic text formatting
Hi ... I have recently been using dynamic text quite
frequently, but it bothers me that browser user settings can
override the font I have specified in the Flash doc. How do I force
a Helvetica all the way through?
I have tried to surch the forum for solutions, but no
satisfactory answers. It is the intention that my client can edit
the text in MS Word.
Embed the font and embed the characters. Its not the browser
forcing a different font, but it is a system that doesn't have
helvetica (like most windows machines) that will need to map to a
system default font.
Similar Messages
-
Issues with dynamic text box formatting
I'm running into issues with using HTML formatting for a dymanic text field. I know these are quirky and I cannot figure out how to get the formatting proper.
I have on my stage a dynamic text box called "content_txt" inside of a movie clip instance "content_mc". When it enters the frame, I fade the "content_mc" from alpha 0 to 100 using a timeline animation. In order for this to work, I have to embed the font in my "content_txt" text field. However, the only way I get get the HTML formatting to work is if I do not embed the font.
The dymanic text field is set to render as HTML. In my actions layer, I set the text:
this.content_mc.content_txt.htmlText = "<b>Hello world,</b> it is me again."
In summary:
1. If I do not embed the font, the alpha fade does not work but the HTML formatting does.
2. If I embed the font, the alpha fade works but the HTML formatting does not.
How do I resolve this? It's driving me nuts!How do you embed just one style?
I've tried typing three words in the text field and formatting each (regular, bold, italic) but the text field just defaults to whichever format is first.
Also, I tried embeding the whole character list and did not have success. -
Hi,
in SmartForms I use dynamic texts to output information in the form. It works fine but I have to format some of them for a smaller or bigger font. SAP does not give any possibility to set the paragraph and/or character formats like in the case of text elements.
How can I format my texts ??
Thanks.Hi Jorge,
It is possible to create paragraph format and character formats in smartforms.
Go to tcode-SMARTSTYLES and create a style and then specify ur style in smartforms
Globalsettings->Formattributes->outputoptions->style
if ur copying predefined smartform the copy the used style into Zstyle and make further changes like ur own formata and use it...
Thanks&Regards,
Rama Krishna. -
How to use same dynamic text, multiple times in a Movie
FLASH CS5.5
How can a dynamic text field be used multiple times, on any
frame, in any new layer during a Movie?
~~
A number of unique dynamic text fields are being used.
The intent is to use them each, many times during a Movie.
(i.e. a users first name)
They are successfully being "ExternalInterfaced" from a PDF form field.
(the SWF is displayed within the PDF as a RMA)
This all works well, IF I only use one instance of the dynamic text field.
(one use of each unique text field)
If I try and use that same dynamic text field, again, in a new layer, later in the SWF,
all of that said, duplicate dynamic text fields do not display.
~~
Stumped!!!
Thanks in advance for your advice / comments!
D-Thanks Ned,
I always welcome learning something new.
I did not know creating a new keyframe,
creates a new instance.
Yes, I had used the same dynamic text field instance name in
numerous, new layers (great observation).
With the objective to display the User's name throughout
the timeline (on and off)...
I'll attempt to paraphrase your solution;
Use a single layer to display the dynamic text field.
Extend this layer's timeline throughout the movie, or end use of the dynamic text field.
Help with this one ??
Set the visible properties to true or false as need through out the timeline.
( Does require an AS3 ? )
I'll give that a try.....
~~
Side of effect of using the above solution;
The SWF in it's attempted state, uses the dynamic text field instance, in
different places, different text sizes, on the stage, throughout the Movie.
(i.e. the User's first name appears in different sentences...)
Per the solution above,
I believe I will be limited to One location, one format setting.
Is this assumption correct?
I can make this work from a display / Movie point of view.
However, your first VAR concept, noted above, might be
worth exploring should more flexibility be required.
Thanks for making the time to coach...
D- -
CS5 - Text format for classic text error
will now have to re-edit every part.
Clearly you can get around this by other formats but fact is if you have a document that has negative spacing dont open it in CS5 cause you
This may have been in recent update.
Flash now resets them when you open the file to 0, if you notice or not.
when you have negative (-20) set in spacing, usually used when you have margins.
Classic Text Error
Flash CS5Here's a workaround.
FixTextIndent is a class with static methods that
provides a workaround for the Flash CS5 text formatting
bug. The Flash CS5 IDE will not remember the text
indent setting for either static or dynamic text fields.
We can set the indent in Actionscript for dynamic fields,
so to use this class, convert your fields to dynamic,
then set the left margin.
When you call FixTextIndent methods, they will set
the indent to the negative of the left margin.
Gary Weinfurther, 12/17/2010
package com.keysoft.util
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.text.TextField;
import flash.text.TextFormat;
public class FixTextIndent
Fixes the line indent of all dynamic text fields
in a given display object container so that
the indent is the negative of their left margin.
public static function FixContainer(container:DisplayObjectContainer):void
for(var i:int = container.numChildren - 1; i >= 0; --i)
var obj:DisplayObject = container.getChildAt(i);
if (obj is TextField)
FixTextField(obj as TextField);
Fixes the line indent of a dynamic text field
to the negative of its left margin
public static function FixTextField(tf:TextField):void
var format:TextFormat = tf.getTextFormat();
if (format.leftMargin != null && format.leftMargin > 0)
format.indent = -(format.leftMargin as Number);
tf.setTextFormat(format); -
Linking a class to a dynamic text field to load XML data.
Hi,
I'm quite new to ActionScript and would be grateful for any help here.
I want to load text into a dynamic text field (called 'about_tab') using a class depending on the language selected (by clicking on a flag icon) by the user.
I managed to get this to work when the ActionScript was written directly in the timeline, but am having problems with doing the same thing via a class.
This is my class file:
package
import flash.display.SimpleButton;
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.net.URLRequest;
import flash.net.URLLoader;
import flash.events.Event;
public class ChangeLang extends SimpleButton
public function ChangeLang()
addEventListener(MouseEvent.CLICK, switchLang);
trace("ChangeLang class working");
public function switchLang(event:MouseEvent):void
var lang = event.target.name;
var req:URLRequest = new URLRequest("languages/"+lang+".xml");
var loader:URLLoader = new URLLoader();
var substance:XML;
function xmlLoaded(event:Event):void
trace("function xmlLoaded is running");
substance = new XML(loader.data);
about_tab.text = substance.about_lbl;
loader.addEventListener(Event.COMPLETE, xmlLoaded);
loader.load(req);
Here's one of my XML files (the other is the same except "About" is written in German):
<substance>
<about_lbl>About</about_lbl>
</substance>
When I run it, it returns my trace statements that the class ChangeLang and the function xmlLoaded are running, but no text appears in the dynamic text field (I should/want to see the word 'About'). I get this error message:
1120: Access of undefined property about_tab
The problem, I'm guessing, is in the part in red in my code. I think I need to target the text field in the display list by creating a reference to it. If so, could someonw point out how I do this, or perhaps a tutorial that would help. I've tried adding the word stage (i.e.,stage.about_tab.text = substance.about_lbl; ) but it still doesn't connect. I guess there's something really simple I'm missing, so I apologize if this comes across as a stupid question
Thanks for any help.Hello flashrocket!
I'm also new to AS3 and I've just started using external classes and I think I know what you should do to put your code to work.
Instead of using the text field you created inside your flash file, why don't you use the "TextField" class to create an instance of this object? It's the exact same thing as when you create and instantiate a new text field inside Flash.
First, import flash.text.*; (includes classes like TextField, TextFieldAutoSize, TextFormat, TextFormatAlign, etc)
Than you just have to create a var like
public var about_tab : TextField;
or
public var about_tab : TextField = new TextField();
then, to adjust the properties of this tab you use dotsyntax as if it where on your stage like:
about_tab.x = 50; about_tab.alpha = .5; etc...
you can even create a function to "config your textField"
private function createAndConfigTextField() : void {
about_tab = new TextField(); //you only need this line if you
// only typed something like "public var about_tab:TextField;
// if instead you used "public var about_tab:TextField = new TextField(); outside
// this function, just skip this first line because you already have an instance of
// text field named "about_tab"...
about_tab.autoSize = TextFieldAutoSize.CENTER;
about_tab.background = true;
about_tab.border = true;
var aboutTextFormat : TextFormat = new TextFormat();
format.font = "Arial";
format.color = 0x000000;
format.size = 11;
format.bold = true;
format.align = TextFormatAlign.CENTER;
about_tab.defaultTextFormat = aboutTextFormat;
addChild(about_tab);
This is just an example of what you can do... I hope you get it... let me know if you have any doubt... -
Passing Text Formatting Info. In and Out of Flash
Hi all,
We need to develop an application that involves formatted
text. We want to use dynamic text, where we pull in text from an
.as file at runtime. But when we do that we don't have the ability
to format the text. Are there ways (or tutorials that describe
them) to feed formatted text into Flash dynamically and still
preserve the formatting (bold, italics, text color, etc.). Our
ideal scenario is to have a web form (Flash or HTML-based) that
allows for formatting options (bold/italics/underline/text
color/size ,etc.), that we can store in a database, that we can
later connect to from Flash, where we pull in the formatted text in
at runtime.
Am I smoking crack? Can this be done? Any ideas on best
approaches? Tutorials?
Thanks!1. create a text file .
2. in the text file create a variable (e.g. info=)
3. follow the variable with the HTML formated text.(e.g.
<B>This is some formatted text in Bold
Type</B><P>This is a new paragraph with normal
text</P>)
4. in the flash action panel create a LoadVar. (e.g.
var myLv:LoadVars = new LoadVars();)
5. Load your variable: (e.g.
_level0.myLv.load(yourtext.txt);) -
Adobe form -- Issue in Displaying Dynamic text along with Static text
Hi All,
I am having an issue when i am displaying a dynamic text along with static text in adobeforms.
The dynamic text is slightly coming down and not aligned with the static text. i can see half row it is coming down.
how to align both texts to be printed in same format.
Request all of your expert advices in achieving this .
Thank you in advance.
Thanks&Regards,
Phani Miriyaila.Hi,
Select both dynamic and static text in the layout. Goto Object palette -> Layout. Give values to X,Y coordinates and Height & Width. Anchor properly and specify margins as well.
Select both dynamic and static text in the layout. Right click on it and goto palettes -> Paragraph. It gives you the text alignment options. Align the text and give similar font and size.
Thanks & Regards,
Sanoosh -
Using dynamic text in Flash Builder
Hi,
I'm trying to get some dynamic text to my web page. The text is readed from .txt file
I use AS script which i was using in a project I made with Flash Pro and now i try to implement it in Flash Builder project
The script look like this:
var req:URLRequest = new URLRequest("design_1.txt");
var loader:URLLoader = new URLLoader();
function textLoaded(event:Event):void
design.text = loader.data;
loader.addEventListener(Event.COMPLETE, textLoaded);
loader.load(req);
So first I made a project with Flash Catalyst and in there I created an area text element. Then I imported the project to Flash Builder and put the AS script in the <Script> section and gave the <RichText> an id="design". The text is just simple text and formatting happens in richtext element.
So, when i try to compile the FB project it give me and parse error "undefined property error req", "undefined property error loader" etc.
So should i alter the AS script for FB or is there something else wrong? I tried to google how to use dynamic text in FB but couldn't find any easytyutorials. I'm mostly a desginer so coding isn't my speciality. But thanks for help!Hi Amy,
You can customize 'New class' generation under Preferences->Editors->Flash
Builder->FileTemplates->Action Script->New ActionScript class.
Currently there are no template variables available constructors. But you
can customize it as following,
$
${import_declaration}
$ {
public function ${class_name}() { -
Hi all,
I am loading a dynamic text file into flash, rendering as
HTML, embedding fonts but cant get the French characters &
accents to appear... I have written in HTML univ.reference in the
txt file eg. É etc...
not sure what to do.... Any help would be great...
Thanks for you time in advance,
MartinNot sure exactly, but here is what I know.
Flash really likes to have externally loaded text files in
UTF-8 format. That fixes most problems.
Additionally if you use UTF-8 you don't need to use crazy
html codes. To my mind it is much easier to read "français"
than "fran%C3%A7ais" or "français." (Don't know if the
forum is going to mess any of those up!) -
Flash dynamic text in captivate errors
Hello all,
Has anyone experienced any issues when using a dynamic text
field in flash, then importing the swf file into captivate? I am
using actionscript to populate a few dynamic text fields in flash.
I am then publishing the swf and importing the swf into captivate.
Once I do this, none of my text appears! When I launch the swf in
explorer and the flash authoring environment, it works fine. I have
tried turning off the 508 compliance, eliminated all captivate
animations/transitions, made sure that the frame rates are matched
between flash / captivate (although not likely the prob), using a
basic arial font Nothing works!!! anyone have any possible
solutions? Here is a link to the swf that I am working with (tried
other flash files with 'dynamic' text, none of them work).
http://kplearning.com/project_testing/flashTesting/table1_wCanvas.swf
(swf file)
http://kplearning.com/project_testing/flashTesting/table1_wCanvas.zip
(working file)
Thanks in advance for any help!
MikeHi Deb
This falls into that "odd" or "grey area" category and is
likely the reason you haven't seen anyone reply. I say "odd" or
"grey area", because you are now beyond the realm of pure Captivate
behavior and have entered the realm of where you are now blending
Captivate with other Flash output in an effort to try and achieve
something unique. And there is absolutely nothing wrong with this.
Personally, I would encourage it, as you never know what you will
discover to create a neat effect.
However, having said that, you are now dabbling in something
that perhaps nobody else has yet tried. I'm no Flash expert just
yet, but I'm beginning to work on those skills. From what I DO
understand about blending Captivate with Flash, I believe Captivate
only likes and easily works with
Flash 6 output and
Actionscript 1. Anything newer and it likely won't work. I'm
unsure if Flash 6 output is even possible to create, where you can
call an external text file. For all I know at this stage, it could
be a Flash 7 or Flash 8 only feature.
Assuming this was something that was part of the feature set
for Flash 6, if you are using Flash 7 or 8 to create the Flash
file, perhaps try publishing in the earlier format?
Hopefully this helps... Rick -
Dynamic Text in Flash/Image
Hi All,
I cant find any simple tutorials, can anyone help me and
explain how to very simply, display one variable of text from a
database as flash format (or a type of dynamic image)?
Using CS3, and ColdFusion. I'm playing games with it and
think i'm just name the variable wrong either in a flash file or cf
page. But anyway, any simple method to dynamically display text as
an image will work.... please help.
Thx,
Mikeprobably the simplest way will be passing your text to your
flash movie
as the movie url's query string variable (in the
[object]/[embed] html
tags). inside the flash movie set a dynamic text box to
display the
passed variable:
if you google "pass variable to flash" you will see a lot of
examples of
code involved. just make sure your flash movie is large
enough to
display all passed text, and the passed text is url-encoded.
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com -
Auto scrolling dynamic text field(news ticker)
> This message is in MIME format. Since your mail reader
does not understand
this format, some or all of this message may not be legible.
--B_3272625483_2679871
Content-type: text/plain;
charset="US-ASCII"
Content-transfer-encoding: 7bit
Does anyone know how to make a scrollable dynamic text field
scroll on its
own and also with user interaction?
Thanks in advance for your help.
Bill
--B_3272625483_2679871
Content-type: text/html;
charset="US-ASCII"
Content-transfer-encoding: quoted-printable
<HTML>
<HEAD>
<TITLE>Auto scrolling dynamic text field(news
ticker)</TITLE>
</HEAD>
<BODY>
<FONT FACE=3D"Verdana, Helvetica, Arial"><SPAN
STYLE=3D'font-size:12.0px'>Does =
anyone know how to make a scrollable dynamic text field
scroll on its own an=
d also with user interaction?<BR>
<BR>
Thanks in advance for your help.<BR>
<BR>
Bill</SPAN></FONT>
</BODY>
</HTML>
--B_3272625483_2679871--I found this:
http://www.kirupa.com/developer/mx/dynamic_scroller.htm
I copied the actual scroller and put it in my .fla and it
worked! Now if I can only figure out links in XML... -
Dynamic Text to be displayed as Image in Adobe Forms
Hi ,
I have a requirment to display dynamic text in the image format in the Adobe Form.
I have tried using the Image field instead of text field.But could not solve the problem.
kindly help me.
Thanks.Hello,
if you send a text into a text field to the print form, it looks like a paper print, you cannot tell where there is a picture and where is the text. So you don´t care about the image/ text problem. If you need to make difference between two for the user, you can put the text (your image) into a rectangle, use a background or anything like this.
Why would the image make any difference?
Otto -
Dynamic text shifts when style changes
I have some dynamic text fields that are set up so that when
you rollover them (actually a button behind them), their formatting
changes. This is done with some basic actionscripting, setting up 2
different text format variables and attaching one or the other to
the text field when a button is rolled over. The only thing that
changes is color. When the text first appears all is well. But when
you rollover the text and the color changes, on certain browsers an
extra space can get inserted at the beginning of a new line, sort
of like the old bug where text wrapping messes up and moves a space
down to the beginning of a line. This happens on IE 6 and 7 and
Safari, not Firefox. The player is 9. THanks.Did not, I was happier with the browser's display than with
the embedded font version. May try it just to see if problem
remains. Seems like something I should be able to avoid without
having to embed though.
Maybe you are looking for
-
The itunes application icon on my dock does not bring up itunes. I have no problem accessing itunes from my iphone though, so I believe it is computer related rather than an itunes issue. Haven't had this problem before.
-
I am so upset with apple for not providing an easier way to transfer from mobile me gallery and iweb. I use iweb for my business for several years and I really don't have time to learn computer specifications but I guess I have to now. I want to know
-
Given a method declared as(ignore implementation): public static <E extends Number> List<? super E> process(List<E> nums) The above method is called as follows from some method in the same class:- ArrayList<Integer> input = null; List<Number> output
-
Listening to my favorite podcast just got harder
I love to listen to "Coast to Coast AM." If you don't know it's a late night AM radio show that focuses on the weird, conspiratorial, supernatural, and offbeat. I'm a paid subscriber. There is a C2C app for the iPhone that is horribly designed but wo
-
Want to connect internet mobile to another via blu...
Hellow fellows: Can any one tell me how i connect my other mobile phones of nokia with my 5530 Xm for internet via bluetooth i am using internet in 5530 via wifi plz tell me any application or any thing??