Dynamic text problem in flash cs5
Hi guys,
im building a flash website and the first page has dynamic text fields that load text via xml, that all works fine. But when i create a dynamic text field further up the time line for the second page ( i use the same code all at the fist frame of the timeline) and nothing loads. if i have an instance of the text on the first page at the start of the time line it will load on the next page (further up the time line). Ii have stop and click to go and play in the code to break up the pages.
I am a little lost, as i normally use static text.
any help would be greatly appreciated.
cheers
Ah found out myself the hard way that i need to put the text feild inside its own symbol!
only took me all morning
Similar Messages
-
Creating Dynamic Text Field for Flash CS3 in Illustrator CS3
I've created a series of buttons in an illustration and made
them into movie clip symbols in Illustrator. I then created some
text fields for the button labels and assigned them as dynamic text
in the Flash Text panel in Illustrator.
When I import the illustration into Flash and test the movie,
I get this error message:
TypeError: Error #1034: Type Coercion failed: cannot convert
flash.text::TextField@d18cef9 to flash.display.MovieClip.
at
flash.display::Sprite/flash.display:Sprite::constructChildren()
at flash.display::Sprite$iinit()
at flash.display::MovieClip$iinit()
at menu2_fla::MainTimeline$iinit()
It seems like Flash is misinterpreting the text fields
brought in from Illustrator as Movie Clips?Download the TinkSpark source from http://code.google.com/p/tink/source/checkout and add the package to your project:
Then write the following code:
import ws.tink.core.Library;
import ws.tink.events.LibraryEvent;
import ws.tink.managers.LibraryManager;
private function loadLibrary():void
var library:Library = LibraryManager.libraryManager.createLibrary( "assetsLibrary" );
library.addEventListener( LibraryEvent.LOAD_COMPLETE, onAssetsLibraryLoadCompleteHandler, false, 0, true );
library.loadSWF("board.swf" ); //provide the path of board.swf, pls note board.swf is alos exported as AS3.0
private function onAssetsLibraryLoadCompleteHandler( event:LibraryEvent ):void
EventDispatcher( event.currentTarget ).removeEventListener( event.type, arguments.callee );
var library:Library = LibraryManager.libraryManager.getLibrary( "assetsLibrary" );
var AssetScore:Class = library.getDefinition( "Score" );
var score:* = new AssetScore() as Sprite;
score.scoreDisplay.text = "100";
addChild( score );
Warm Regards
Deepanjan Das
http://deepanjandas.wordpress.com/ -
Problem launching flash cs5 and cs5.5 on windows vista
Hello Every Body. I have a problem launching flash cs5 and cs5.5 on windows vista home premium edition. When i launch it, the register screen appears(the one that tells the trial time left) but the flash main window always stays black (or white)and is not responding. I had it working about one week ago and i can't figure out what is the problem .It tried reinstalling couple of times without succes. I also tried deleting the left flash cs5 program files after uninstall but it didn't work . I would need your advice. Here is the screen as it appears:
BEFORE I CLICK IT IT IS BLACK9(notice that in the up bar it sais not responding)
Thanks
-jeremyskateboardhere is the black screen i get
-
How to display Dynamic text after adding flash file to html
Please help - I have a dynamic text field in a movieclip
inside a main movieclip - Within flash the dynamic text display
properly but once I load the file to an html page the dynamic text
no longer display - It loads undefined in text box. However when I
remove the movieclip from main movieclip text display no
problem.that's as2 code, not as3. please post in the correct forum
next time.
either about.txt is not in the same directory as the html
file that loads or embeds your swf or there's a case issue with
about.txt really being About.txt, for example. -
Connecting a CSS doc to an XML file, in a dynamic text field in Flash
Hi all,
I am trying to connect a CSS file such that it applies it
self to the content of an XML file, viewed inside a dynamic text
field. So far I have managed to gather the code that "calls" the
contents of the XML file and also the code that calls the CSS file.
However, when I test the flash movie I get "undefined" instead of
the actual copy.
Attached then is the the AS code, XML file, and CSS file. I
hope you could help me connect everything together.
And of course, THANKS!!
-----AC------
Scrolling Text XML by Digital Science |
www.digitalscience.za.org
/////////////Load XML Data/////////////
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
header = [];
txt = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
header
= xmlNode.childNodes.childNodes[0].firstChild.nodeValue;
txt
= xmlNode.childNodes.childNodes[1].firstChild.nodeValue;
gotoAndStop(11);
} else {
errorMsg.text = "Error loading XML";
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("ewmn_content.xml");
stop();
import TextField.StyleSheet;
var ss:StyleSheet = new StyleSheet();
ss.onLoad = function() {
txt_mc.styleSheet=this; // where yourTF is your textfield
ss.load("jokes.css"); // where yourSS.css is your css file.
-----XML----------
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="jokes.css"?>
<JOKES>
<ONE>Tirza Sapir</ONE>
<JOKE>Founder and choreographer of the RikudNetto dance
group, teacher and lecturer, researcher, documenter and
choreographer within the framework of Eshkol-Wachman Movement
Notation. She was Head of the School of the Arts of Dance at the
Seminar Hakibbutzim College of Education, 2000–2007, where
she established the Dance Theatre and the Practicing Teachers
courses, and specialized training in Teaching and Treatment of
Learning Disabilities by means of Eshkol-Wachman Movement Notation.
She has written three books containing the movement scores of dance
suites: Birds, Landscapes, and Hanukka Notebooks. Member of the
Movement Notation Society, 1968–2008. Student and colleague
of the late Professor Noa Eshkol who was the co-founder and
inventor of Eshkol-Wachman Movement Notation.</JOKE>
<ONE>Sharon Reshef-Armony</ONE>
<JOKE>Head of the School for the Arts of dance at the
Kibbutzim College of Education in Tel Aviv. Teaches EWMN,
dance-theatre and composition. Choreographer of theatre plays and
film. Selected works: Hunger (Tmuna Theatre 2003-09), Film - Live
(Haifa Theatre 2007-08), Yakish & Pupche (Gesher Theatre
2007-09), Children of a lesser God (Beer Sheva Theatre 2008-09).
M.Ed (1997) from Lesley College MA in Creative Arts in Learning.
Doctoral student at ResCen, Middlesex University/ London.
Dancing in Rikudnetto group since 1990.</JOKE>
<ONE>Tally Ronen</ONE>
<JOKE>M.Ed. at Lesley University in Integrating Arts in
Learning.
Educational instructor at Kibbutzim College of Education and
teaching dance in schools and at Clore Center, Upper Galilee. Dance
choreographer for children.
Dancing in Rikudnetto group since 1991.</JOKE>
<ONE>Nira Al-Dor, Ph.D</ONE>
<JOKE>20 years of Teaching EWMN at the School of the
Dance Arts in Kibbuzim College of Education and at the School of
Arts in Tel Aviv. Her study was focused on the impact of learning
EWMN on the development of coordination.
Dancing in Rikudnetto group since 1986.</JOKE>
<ONE>Henner Drewes</ONE>
<JOKE>Lectures at the Kibbutzim College of Education in
Tel Aviv on dance and notation related technology. In 2008 he
started working as a research assistant at Salzburg University in
the project Visualizing Dance Archives.
He was awarded the Tanzwissenschaftwpreis NRW, Germany 2006
for his research on 3D representation of movement and notation.
Ph.D. (2002) at the University of Leipzig. He is the author
of the software EW Notator, a 'word-processor' for creating EWMN
scores.</JOKE>
<ONE>Shlomit Ofer</ONE>
<JOKE>M.A. at Haifa University at the Faculty of
Education with distinction, and currently doctoral student there.
Educational instructor and teacher of EWMN at Kibbutzim
College of Education. Staging performances of dance theatre in the
community.
Dancing in Rikudnetto group since 1993.</JOKE>
<ONE>Lilach Shalit</ONE>
<JOKE>M.A. in Expressive Therapies with specialization
in dance-movement therapy at Lesley University.
Educational instructor and teacher of EWMN in the course for
Dance-Theatre at Kibbutzim College of Education. Also teaching EWMN
in the School for Advanced Studies of the college, course for
Learning Disabilities, and at Orot College.
Dance-movement therapist and team coordinator at 'Tom' school
for learning disabilities and owner of a private clinic for
dance-movement therapy.
Dancing in Rikudnetto group since 1998.</JOKE>
<ONE>Michal Manor-Amir</ONE>
<JOKE>M.A. at the University of Leeds (Bretton Hall
College and Israel Extention) in Arts Education specialization in
Dance. Doctoral student at the Hebrew University of Jerusalem, in
the Faculty of Humanities, the School of Education.
Teaching movement in the Kibbutzim College of Education
within preparatory courses of Dance, Dance-Theatre and within the
Preschool course.
A corrective teacher through movement and EWMN in elementary
and high schools, and a national teacher-instructor at the dance
supervisor's office in the Israeli ministry of education.
Dancing in Rikudnetto group since 1998.</JOKE>
<ONE>Amit Chesny-Bahari</ONE>
<JOKE>B.Ed. at Kibbutzim College of Education.
Teaching movement and dance to preschool and high school
children.
Dancing in Rikudnetto group since 2004.</JOKE>
<ONE>Orly Yaakov</ONE>
<JOKE>B.Ed. at Kibbutzim College of Education, and
graduating from the special education faculty.
Teaching EWMN and creative movement at elementary schools as
well as special education school for children ages 6-21 with medium
to deep retardation. Also teaching creative movement and
preparation for ballet to preschool children.
Dancing in Rikudnetto group since 2006.</JOKE>
</JOKES>
------CSS-----
JOKE
COLOR: #333333;
DISPLAY: block;
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif;
WHITE-SPACE: normal;
font-size: 11px;
MARGIN-BOTTOM: 15px;
BODYBLD
COLOR: #990000;
DISPLAY: block;
FONT-SIZE: 11pt;
FONT-WEIGHT: bold;
MARGIN-BOTTOM: 0px
BODYBOLDUN
COLOR: #00CCFF;
DISPLAY: block;
LINE-HEIGHT: normal;
MARGIN-BOTTOM: 10px;
TEXT-ALIGN: left;
font-size: 11px;
text-decoration: underline;
font-weight: bold;
ONE
COLOR: #00CCFF;
DISPLAY: block;
LINE-HEIGHT: normal;
TEXT-ALIGN: left;
font-size: 14px;
font-weight: bold;
white-space: normal;
QUESTION
COLOR: red;
DISPLAY: block;
FONT-FAMILY: Arial;
FONT-SIZE: larger;
FONT-VARIANT: normal
TITLE
COLOR: black;
DISPLAY: block;
FONT-FAMILY: 'Arial Black';
FONT-SIZE: 14pt
CATEGORY
FONT-FAMILY: Arial;
FONT-SIZE: 8pt;
FONT-VARIANT: small-caps;
TEXT-TRANSFORM: uppercaseIn essence you can just do:
TextField.text = XML.node1 + XML.node2; -
ScrollPane + Dynamic text problem.
Hi,
I use the ScrollPane component to display a movieclip which contains some text. Until now I have entered just a few paragraphs, with the text field set to "Static text"...but as I have wrote some more I noticed that the text field displays only half of my text. So I have switched to "Dynamic text", which solves the display issue and I get 100% of my text but now I have it always on the scene displayed, even if it is only available in the library...strange!
Could somone help me out please??
Regards,
vedtamOk, I try to make my self clear.
I have to display a really long text on this website. By default when I am typing anything the Text tool is set to "Static text" in that little drop down in the Text Properties window. So I have moved on whit this, but after more then 50-60 paragraph typed in I get only 30 displayed. Than I went to that little drop down and selected "Dynamic text" to see if this helps, and when I have tested the movie again the text was displayed with all its 60 paragraph, but it was overlapping all my other content without pressing its button (without calling it).
The movieclip which contains the text, sits in the library, and the ScrollPane component (which loads it externally) is in the scene on the 1st frame. Again, as I test the movie I get the text showing up in the background, so as I click any menu item it is overlapping any other content.
What I would like to achieve is to have the text displayed without an issue (not only a half of it). But this task is failed by the "Static text" option and setting it to "dynamic text" solves the first problem while rises a second (the sudden appearance of the text on the scene without calling it).
I hope this second explanation helps,
Vedtam -
Hi there,
I got a problem with my Flash IDE. When unticked "Automatically declare stage instance" for AS3 programming, I encounter an problem with my TLFTextField, debugger fire an Error #1009: Cannot access a property or method of a null object reference.
The object is very basic, containing two TLFTextField called respectively title and info, my as3 class is very basic as well:
package fr.lcclub.bubbles
import fl.text.TLFTextField;
import flash.display.Sprite;
public class FlyInfo extends Sprite
public var title:TLFTextField;
public var info:TLFTextField;
Let me know if I am doing something wrong but as it is very basic I don't really see what can be misunderstood.
Thanks for your help,
Regards
Sylvain LecoyEther-x,
I have used your example, and built a FLA file that uses it. There is a trick that isn't so obvious. When you make a document class, it gets instantiated before the objects on the stage. So, in the constructor, I added an eventListener for Event.ADDED_TO_STAGE for one of the TLF objects. Once that gets fired, you can use it as you would normally. I've uploaded my example here:
http://dl.dropbox.com/u/9110597/Ether-x.zip
Let me know if that doesn't answer your question. -
Hi,
I have some dynamic text within a scrolbar controlled box. I
need to link certain words of the text but, whenever I attempt to
do this, the entire text block becomes 'linked'. Does anyone know
how I can solve this?
Many thanks.Then you'll need to use html links for the words. So when you
assign the text to the textfield, you'll need to assign it as...
tField.htmlText = "text.... <a href='...>link
text</a>"... text;
where tField is whatever instance name you assigned to the
textfield -
Problem installing flash cs5,5
help ! i need help! im trying to download flash cs5.5
i get this :Exit Code: 24
Please see specific errors and warnings below for troubleshooting. For example, ERROR: DS003, DS013 ... WARNING: DS013, DW016 ...
-------------------------------------- Summary --------------------------------------
- 13 fatal error(s), 23 error(s), 49 warning(s)
how can i fix it?
thank youWithout exact system info and the full install logs nobody can tell you much.
Troubleshoot with install logs | CS5, CS5.5, CS6, CC
Mylenium -
Iv not used flash for a while so am just converting from AS2
to AS3 and am having problems with some simple actionscript
I have a dynamic textbox created through actionscript inside
a movieclip and im trying to change the content of this but save
the previous value.
Iv taken the previous value and saved it in a variable (a
string) called
oldTxt (witch is working when i use trace statements to
check)
and then assigning the new text with
theTextField.text = "some new text"; (again working
perfectly)
the problem is when i try to re-asign the old value stored in
oldTxt, nothing happens.
the code im using is
theTextField.text = oldTxt; but its just removing all the
text.
any suggestions?button.addEventListener(MouseEvent.ROLL_OUT, navOut);
function navOut(MouseEvent):void {
trace(oldTxt);
theTextField.text = oldTxt;
works fine when i replace oldTxt with "some new text" and the
value of oldTxt is coming up in the trace -
How Do I Edit Text in Adobe Flash CS5
I have a premade .fla file I purchased from a web development company. I works when I open it with IE or whatever but I just dont know how to change the dummy text with in the pre made flash template and I wonna change th ecolor from green to black. Can some one help me out?
Download the .fla file and well maybe one of you pros out there can do it for me
Here is the link
http://www.microunified.com/downloads/main.fla
If yoiu need other information related to the file, let me know.
ThanksOh Thank You so much Mr. Dillon, I was getting frustrated because I could not even find a way on Google. YES you are currect there is another file content.xml. Is the best way to edit .xml with Dreamweaver?
If you wanna look more into it:
http://www.microunified.com/downloads/Content.xml - Save Target As if u wanna download it
I was also wondering would you be able to show or maybe help me out changing the color? Instead of the green provided with in, I was wondering if we could change it to black? Like the background and such.
Thanks again Mr. Dillon, I really apprechiate the help. -
Text links in Flash CS5 - Am I doing something wrong?
Hi all, I tried searching for an answer but did'nt have much luck. I decided to finally learn how to do a web page in Flash and everything is progressing except for text links. I'm importing a .psd file and I keep the text as editable, the page has 5 text links plus a text logo, the logo text link works when tested (returning to the home page) but the links to the other pages do nothing. I have tried each one seperately, pointing to both the intended page as well as the home page with no luck, the only one that I can get to work is the logo text. I have also tried grouping the text for links seperate from static text in Photoshop. I'm sure it's something simple and I'm probably over thinking things but whatever the case I can't get it to work.
Thanks
PatIt figures 5 minutes after posting this question I was able to get the links working in the test window. What I did was I imported the .psd to the stage and after defining a url for the text link I DID NOT assign a target, wha la it worked.
-
Hello,
I work with a big FLA, more than 400 MB, although compiled SWF is just measly 2.5 MB or so. Recently I've reached a dead end with my project, because flash eats up to something like 1.2 GB RAM and pretty much stops performing: wouldn't let me add more items to the library and keeps throwing that "low memory" message, also keeps crashing numerous times just after SWF gets compiled with "test movie". Most of the space is used by imported to the library SWF files wich automatically generate sequence of bitmap files for every frame which takes all that memory obviously. This is a huge problem and I don't know how to solve it. Is there any solution for this kind of situation?Not sure if I'm understanding you correctly, but did you say you were importing SWF's to the library? Would it be possible to load the swf's externally instead using actionscript, for example create a movie clip the size of the swf file, then use the getURL function and place the name of the swf in the input field so it would read getURL("myswf");
NOTE: it would be easiest to create a copy of all the swf files you will be using and just dump them in the same folder as your current fla.
Been a while since I've loaded swfs like this so the AS2 syntax might be a bit off. if worst comes to worst use the script assist to find the exact syntax used for this kind of thing. Hope this helps. -
Externally Loaded Dynamic Text Problem
Hi,
Has anyone encountered problems loading in a % sign as part
of a string? For example I'm loading the following in from a
database through an asp page using sendAndLoad (this is just a
snippet of the results):
&AnswerEN1_1=8% &AnswerFR1_1=
The variable AnswerEN1_1 drops the % sign. The value for the
variable is just 8. if there's no space between the next variable
the value of AnswerEN1_1 becomes 8AnswerFR1_1= removing the &
as well
Any ideas, solutions?
Thanks,
SeanFlash is seeing % as the start of a URL code--or perhaps ASP
is when it serves it up. Either way, you should be able to avoid it
by pruposely URL encoding it. I don't know any ASP but I'm sure
there is a URL encode function somewhere. Otherewise, the code for
% is apparently, %25, according to here:
http://meyerweb.com/eric/tools/dencoder/ -
How to embed the Greek language Characters in flash dynamic text field
Hi,
I have a problem with dynamic text field in flash. I want ot embed Greek Language characters like ≤, ≥, ± etc through actionscript (embedFonts).
Plz help.
Rakesh KumarHi,
First u must create the new font in right click on library then choose the font.
Right click on the font add linkage name that name here is my font
import flash.text.TextFormat;
var my_fmt:TextFormat = new TextFormat();
my_fmt.font = "my font";
my_txt.embedFonts = true;
my_txt.text = "Hello world";
my_txt.setTextFormat(my_fmt);
Try this. i think it will help u.
Saransoft
Maybe you are looking for
-
The custm error page is not getting loaded in TomCat 5.0
Hi all, I am working on a JSF web application deployed in Tomcat 5.0.I was trying to redirect 404 and 500 error pages to custom error pages.But the error pages are not getting loaded and i am getting normal Tocat 404 status page. I am giving the web.
-
Hi All, I am trying to run payable open interface import program to upload 'STANDARD' invoice.Problem is that when i run 'PAYABLE OPEN INTERFACE IMPORT' program it fetch record from interface table, but does not create invoice in oracle and its also
-
Compiz: small patch for expo
Hello fellow compiz users, I've made a very small patch to the compiz expo plugin which may provide you with some correspondingly small amount of satisfaction. The patch adds an option to navigate through the view ports in expo mode using h,j,k,l, a
-
TM icon reverts to regular HD icon after drive disconnected/reconnected
This is a nit-pick, but... I have an external drive connected to a laptop. I took the laptop with me for the morning (which obviously required disconnecting the HD). When I came back and reconnected everything, Time Machine properly began backing up
-
HT201272 i did not get "fruit ninja HD" after i pay
order number:MHDYMFJTVF I did not get "fruit ninjaHD" after I paid on yesterday. fruit ninjaHD still ask me to pay$2.99 when I receive a recipt today. now,I don't want this app, can I apply a refund for this?