Dynamic text wont show up in movie - as2
basically i have dynamic text fields that i have been trying to parse to an xml file. when i test the movie it does not work, all the fields are blank. but the info DOES show up in the output tab, so i know that it is making the connection.... it just doesnt show up in the movie. weird.
here is my actionscript:
var xml:XML=new XML();
xml.ignoreWhite=true;
xml.onLoad=parseXML;
xml.load("popup.xml");
function parseXML(){
trace(this);
if (success)
var diagramNode=this.firstChild;
var infoNode=diagramNode.childNodes[0];
var nameNode=infoNode.childNodes[1];
var ssnumberNode=infoNode.childNodes[2];
var descriptionNode=infoNode.childNodes[3];
var stockNode=infoNode.childNodes[4];
var priceNode=infoNode.childNodes[5];
var typeNode=infoNode.childNodes[6];
var qtyNode=infoNode.childNodes[7];
else {
content="oops, this stuff is confusing";
and here is my xml:
<?xml version="1.0" encoding="utf-8"?>
<diagram>
<config>
</config>
<info>
<name>
Pedal Set With Toe Cage and Straps
</name>
<ssnumber>
P01LEM14139
</ssnumber>
<description>
Pedal set comes complete with both left and right pedals, toe cages and straps. Pedals have 9/16” shaft diameter where pedal threads into the crank arm.
</description>
<stock>
Item is in stock
</stock>
<price>
$15.95
</price>
<type>
EA
</type>
<qty>
1
</qty>
</items>
</diagram>
thanks, -mitchell
ok, i must have been doing it wrong. i ended up following a different tutorial and i rewrote it this way and it works great now!
function processXMLData(success)
if (success)
var rootNode=this.firstChild;
var nameNode=findNode(rootNode, "name");
name=getValue(nameNode);
var ssnumberNode=findNode(rootNode, "ssnumber");
ssnumber=getValue(ssnumberNode);
var descriptionNode=findNode(rootNode, "description");
description=getValue(descriptionNode);
var stockNode=findNode(rootNode, "stock");
stock=getValue(stockNode);
var priceNode=findNode(rootNode, "price");
price=getValue(priceNode);
var typeNode=findNode(rootNode, "type");
type=getValue(typeNode);
var qtyNode=findNode(rootNode, "qty");
qty=getValue(qtyNode);
else
content="oops, this is hard";
function getValue(node)
if (node && node.firstChild)
return node.firstChild.nodeValue;
return "";
function findNode(node, nodeName)
if (node.nodeName==nodeName)
return node;
for (var i=0; node.childNodes && i<node.childNodes.length; i++)
var foundNode=findNode(node.childNodes[i], nodeName);
if (foundNode!=null)
return foundNode;
return null;
var xmlData=new XML();
xmlData.ignoreWhite=true;
xmlData.onLoad=processXMLData;
xmlData.load("popup.xml");
stop();
Similar Messages
-
Interactive pdf issue, text wont show up when playing the slidewshow
I am having a hard time trying to figure out how i can add text on top of am mp4 file and making it work once exported as an interactive pdf. For some reason the mo4 plays fine but the text will not show up. It seems like it will work fine when i look at the swf preview windon in indesign. I can add text a to a page with an im image in the back and that works fine. But not sure why the text wont show up if its an mp4 file instead. anyone have any sugestions?
havent really worked with buttons on Indesign. But I do recall converting the text into an swf file, and placing it on top of the mp4 file, the text is above but its simply a big white box, rather than it just being the text, but thanks for letting me know why it is that my text would never show up haha, It was getting on my last nerves, I may just simply go into my psd file and adding text over all the layers that made the video then using just the mp4 as the first slide without having to go in and adding text with indesing. Hopefully there is a way to work around it, I hate rendering videos with photohsop, takes foreve.
-
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- -
Please Help -- Dynamic Text Wont Load :-(
Hi Gang,
I've just written a quick mail form in Flash8Pro/PHP - the
user enters their contact details & a message, and it sends it
off to the specified email address.
The feature works fine for the most part, but there's one
little problem. The dynamic text field that confirms the message
has been sent successfully isn't working properly. I'm using the
following php code to send dynamic text back to the flash document
saying the message has gone through OK:
print "sendresult=Message Sent!";
where sendresult is the name of the dynamic text field's
variable.
The strange thing is that the code works fine if the
sendresult dynamic text field is inserted into the main flash
document. It's only when I put the sendresult field into the movie
clip that holds the flash mail form (including the button with the
loadvariablesnum command), that the text won't update at all. I've
tried:
print "_root.enquirypage.sendresult=Data Sent!"
and
print "enquirypage.sendresult=Data Sent!", but neither of
those make any difference.
Any suggestions? Anybody know what's causing this problem?
Any help would be very very appreciated - I know I could probably
get around this by just setting the visibility of the dynamic text
field on & off when necessary and keeping it in the main flash
doc, but I'll be using this feature quite a lot and I'd really like
a proper/versatile solution. In case it's necessary, the
actionscript that sends the message off to the php is just:
loadVariablesNum ("form.php", 0, "POST");
Many thanks in advance gang,
- JayYour code loadVariablesNum ("form.php", 0, "POST"); will load
your variable sendresult in level 0 - the main timeline. If you put
the text field inside a movie clip it expects a local variable in
that movie clip.
Use _level0.sendresult or _root.sendresult as the dynamic
field's variable.
Or, instead of loadVariablesNum you could use loadVariables,
like this:
_root.enquirypage.loadVariables("form.php", "POST");
or, if you make the call from a button inside the movie clip:
this.loadVariables("form.php", "POST");
/uamg -
how do i transfer my movie to my iphone. its showing up on itunes but it wont show up when i want to put it on my phone
I FIGURED IT OUT. THANK FREAKING GOD!
This is what I did:
I went to control panel and unistalled iTunes completely, then I installed 10.6.3
http://support.apple.com/downloads/#itunes which you can find here
It came up with an error saying that my library had beed used with a more updated verision, basically had to upgrade. I installed iTunes 10.7
After it had installed and iTunes was running I hooked up both my iPhone and my flash drive, I have more than 1 usb port I figure most computers do now, and by the time and date in the bottom right corner a small icon came up showing that I had devices hooked up. It showed both my iPhone (but did not know what it was) and my flash drive. If you right click on the iPhone it has the option to Troubleshoot it. I did it and my iPhone 5 now FINALLY SYNCS!
I'm sooo happy now. -
Dynamic text not showing up under a mask
Hi All,
So like many people, I've discovered the joy that you cannot display dynamic text boxes if they are masked.
After browsing the internet I found a few things to try, first embedding the font, which I have done, and that didn't work.
The other solution involves setting the mask to a display object, which I've done, sort of.
I create a Sprite() in code (I use Flex Develop, and never code on the time line), then use the Sprite.graphics to draw the mask, then set my main stage movieClip's .mask property to equal this layer.
That didn't work either.
Is there a third option?
Thanks in advance,
Tommask removed, the text still displayed, but I'm not sure what you meant by that, I can't see the field for the text itself, just the text, which is fine because it isn't an input box, the textfield itself is part of a movieClip, and I am able to adjust it no problems.
After some fiddling around and forehead banging against desk I found that if I just drew two boxes at the edges of my video on top of everything and the same color as my background, it would cover what I wanted to be covered and leave the rest visible. Not an elegant solution, admittedly, but the one that I found and that works in the time constraints I have.
Thanks for trying to help me once again kglad.
I'll learn to ask the right question one day, I think. -
I placed the SCROLLABLE text in a Dynamic Text box, labeled
the text, and set that same name as the Parameter on the UI
Scrollbar. When the timeline reaches that point in the Timeline,
the Scroll Bar appears, but not the text.
Click on the INTRO link and you can see what happens.
This is PROBABLY an easy fix for someone of intelligence.
http://warrencomm.com/fsbresume.html
I'm going crazy here.
I may need medication!!!
Thanks!!!mask removed, the text still displayed, but I'm not sure what you meant by that, I can't see the field for the text itself, just the text, which is fine because it isn't an input box, the textfield itself is part of a movieClip, and I am able to adjust it no problems.
After some fiddling around and forehead banging against desk I found that if I just drew two boxes at the edges of my video on top of everything and the same color as my background, it would cover what I wanted to be covered and leave the rest visible. Not an elegant solution, admittedly, but the one that I found and that works in the time constraints I have.
Thanks for trying to help me once again kglad.
I'll learn to ask the right question one day, I think. -
Text Wont Show And I cant drag and drop
ok well when I insert text it doesnt show but It shows what i written on the side. I have contact support their answer was they can't help me because I am trial verison. I am simply not going to buy a program if the trial verison is not working its that simple. Also When I try to drag and drop a picture a little circle apears with the line through it. I do have admin rights.
Usually when you can not see text is is one of the following.
1)Color of the text is the same color as the background
2)there is a layer over top of the text blocking the text
3)The opacity of the text layer is almost transparent (the opacity is less than 100%)
4)A blend mode is applied to the text layer
5)A layer style is applied to the text layer that either does 1, 2, or 4
As far as draging and dropping, just drag the file from your respective file viewer and drop it on the background of photoshop (it will open the file assuming it is a file that photoshop can read)
So verify that the file can be viewed in another app to make sure the file is not corrupt
Make sure the file extention is one that photoshop supports. (in photoshop go to the menu and select File>Open, then find the text that says file type and click on the box next to it. That will drop down a list of supported file types. If it is not listed, it will not open)
That being said there are time when it should work and don't, so if anything here does not work, post back and someone can help.
By the way, it best to post what version of photoshop you have, what operating system you have and a screen grab of photoshop so we can see what you see. For future reference... -
Iterate through all dynamic text variables
Hello,
I'd like to be able to iterate through all of the dynamic
text variables in my flash movie, and I'd like it so that if I add
new text to this movie, it will show up in the iteration.
Essentially, I want to do something like this:
for (i in _root) {
trace(i);
While this seems to print out all the variables in root, it
prints more than just the dynamic text variables, and also doesn't
iterate down through various objects to find the dynamic text
variable.
Is there any way I can accomplish this in action script?
Thanks!Great! That code helps me a lot.
There are still two weird issues.
1) the test for tl[obj].text seems to always turn out to be
false. However, if I trace the value of text, I'll see the text.
Example:
trace(tl[obj].text); // This will display the value in the
text field
if (tl[obj].text) // This is always returning false.
Any ideas?
The 2nd issue might be more difficult - some of my text
objects don't appear until later in the movie (i.e. frame 10). It
sort of looks like this looping doesn't see objects that appear in
the future. Do I need to advance the frame 1 by 1 and repeat this
looping process until the text appears? Maybe instead I can always
have the text in the first frame, but have it be invisible or
something? -
How do you get dynamic text to show up within a specific
movie clip instead of simply on the stage?
I've created a dynamic text field and given it an instance
name (banner_txt). I'd like to use a variable to hold the .text
info for this field, that way the banner's label can change when
people go to a new section of my website.
ThanksNot sure where the problem was - a combination of problems
with registration point and mucking around on multiple timelines .
. . but I just opened a new FLA file just to check the principle of
the thing, and everything's working as expected (no problem adding
dynamic text where it's supposed to go)
Thanks for your help kglad. -
Dynamic text not displaying when publishing for flash 8
This dynamic text works fine when the movie is published for
flash 7, but when i export for the flash 8 player it seems to be
invisible. Is there any obvious reason for this happenning?
thanks
jonOk, thanks, looks like you've pointed me in the right
direction. I havent fixed it yet though. Heres where i am at:
eval(theTarget+".buttonPrime").tex.embedFonts = false;
now i can see my text. of course its using a default font.
var my_fmt:TextFormat = new TextFormat();
my_fmt.font = "arial14b";
eval(theTarget+".buttonPrime").tex.embedFonts = true;
eval(theTarget+".buttonPrime").tex.text = "wasssup?";
eval(theTarget+".buttonPrime").tex.setTextFormat = my_fmt;
this isnt working. I have added a font object to the library
and linked it for actionscript using the monkier "arial14b".
however my text is quite invisible. i have checcked, 'export in
first frame' for the font object i even tried it with this
deselected. i have deselected the embed font option on the text
feild itself. that doesnt work either (unless i dont try to set the
text format, so long as i accept a default font, its fine).
so err, help?
confused
jon
ps further to this is have discovered more about this strange
behaviour. i can set the text to a different string, provided i do
not try to embed the font in any way. if i set the font to embed, i
can have the text display with the correct font, until i change the
text. then it dissappears. also i cannot seem to affect properties
like font size by means of my TextFormat object. the textFormat
object also does not seem to affect the font of the text.
in short, when exporting for flash 8, i cannot seem to
successfully embed fonts for dynamic text. the only thigs i have
gotten to work are: static text (or a dynamic text feild with
unchanged text) with an embedded font, or dynamic text with a
default font. -
i am loading the contents to a dynamic textbox using the xml
. I want the each line in the textbox to be acting as buttons ( or
even movieclip) so the i can give the onRelease event for each..
Does anyone knows how to do it ?Ok, here is the code.
/*below loads the document home.txt into the dynamic text box
content_txt when the movie starts*/
var home_req:URLRequest = new URLRequest("home.txt");
var home_ldr:URLLoader = new URLLoader(home_req);
home_ldr.addEventListener(Event.COMPLETE, onComplete);
function onComplete(event:Event):void
content_txt.text = event.target.data;
/*below starts the default email app when the contact button
is clicked*/
var contact_req:URLRequest = new
URLRequest("mailto:[email protected]");
function contact(event:MouseEvent):void
navigateToURL(contact_req, "_blank");
contact_btn.addEventListener(MouseEvent.CLICK, contact);
/*The below doesn't work*/
function goHome(event:MouseEvent):void
var home_req:URLRequest = new URLRequest("home.txt");
var home_ldr:URLLoader = new URLLoader(home_req);
content_txt.text = event.target.data;
home.addEventListener(MouseEvent.CLICK, goHome);
Thanks in advance -
How to link one scroll bar with two dynamic text boxes.
How to link one scroll bar with two dynamic text boxes.
If i move scroll bar in one text box,automatically text will
be moved in another text box.But scroll bar is not visible.
Can you please help me.
Thanks in advance.See the following article:
JavaScript - setFocus Method for tabbing to next form field
And see if iOS can even handle the sample form.
iOS and android devices are not a powerful as your desktop of laptop computer and have limited support for JavaScript within PDF forms. This limitation for specific apps ranges from none to quite a bit but not all JavaScript. -
Dynamic Text Field Wont Wrap Text
I have a Dynamic Text field in my movie clip. This text field has embedded fonts and Behavior is set to Multiline. When I add text to it, it wont display the text that wraps beyond the first line.
var textField:TextField = tip_txt; // text field inside my movie clip
trace("before textField.numLines = " + textField.numLines);
textField.text = "test a verrrrry looooooooong striiiinnnnnnnnnnnggggggg";
trace("after textField.numLines = " + textField.numLines);
The trace commands show that the number of lines are increasing but Flash doesn't display the text beyond the first line. Does anyone have any idea whats going on?
Thanks!textField.autoSize = TextFieldAutoSize.LEFT;
This fixed the issue : ) -
How can i set the dynamic text box to show variable value?
In AS2, I can make a dynamic text box set a var name, when i
use button set/change the var value, this textbox can show the
value also.
but In AS3, dynamic text box can't add var name. than how can
i do it now?Set an instance name for the dynamic textfield. Then, to
populate the textfield with the value of a variable, use:
textFieldInstanceName.text = variableName
Maybe you are looking for
-
Export - Import In ABAP ( for variables and internal table)
how can we pass value for the variable and internal table using Export and Import? data: var type sy-uzeit. var = sy-uzeit. EXPORT var TO MEMORY ID 'TIME'. data: var type sy-uzeit. IMPORT var FROM MEMORY ID 'TIME'. write:/ var,sy-subrc,sy-uzeit. i fo
-
Oracle Reports - Distributing Multiple Reports in a Management Report
Hi, I am new to Oracle Reports and would sincerely appreciate some guidance. Requirement. I plan on using Oracle Reports to write multiple reports containing Text, Graphs, Crosstabs, Tables etc. There are 3 developers and each will be developing a nu
-
How to create a Wide Panoramic PDF document?
Hey Folks, Here's 2 screenshots of the type of style & page layout I would like to create. 1. http://img26.picoodle.com/img/img26/4/4/8/fPicture1mc18db47.jpg 2. http://img36.picoodle.com/img/img36/4/4/8/fPicture2mb84219c.jpg And here's where I am sta
-
Image Viewer Plug-in 4.0
Hiya, I'm hoping that this is a simple Yes/No answer. Do I still require Adobe Image Viewer 4.0 for Adobe Acrobat Professional 7.0.9 Thanks in advance
-
Can a person determine if an Ipod was reregestered with same serial number
My son lost his Ipod 3 weeks ago. We did go online to find my Ipod, and did ask to have it lock, play a sound, and display a message that this ipod is lost and a reward is offered for the return. It still has not turned up, but we are still looking