How load text into dynamic text boxes from external file?
hi all,
my animation is very simple - a background image and 2 text boxes. one of the textboxes shows a large word, which crossfades to another word, with a total of about 12 words (showing one at a time in different text boxes fading in & out in the same spot).
i need a way to have the text be imported dynamically via xml or json (xml preferred). this article is a good start, but i noticed he's putting all of the text into one box - i need separate strings put into separate boxes from the xml.
Chris Gannon - Loading XML via AJAX into Adobe Edge
he uses
var outputField = $(this.lookupSelector(“xmlOutput”));
for his text box. what would be the best way to revise this code to include all my individual strings to be loaded into my individual text boxes? thinking an array might work, but my js skills are limited.
any other suggestions or tutorials you could point me to would be appreciated.
thanks!!
thanks joel_pau !
this is helpful in seeing how the array is created, but after giving it a go I became a little confused.
i wound up trying it again based on the example i linked out to previously, but it's not adding the text from my xml file when previewing.
here's the code i'm using in edge animate on my stage. something must be wrong somewhere. let me know if you have any suggestions on this.
// insert code to be run when the composition is fully loaded here
// here i'm assigning a variable to each one of my textboxes at they're named in my edge animate comp
var outputField1 = $(this.lookupSelector("helps2"));
var outputField2 = $(this.lookupSelector("communicate"));
var outputField3 = $(this.lookupSelector("experience"));
var outputField4 = $(this.lookupSelector("interact"));
var outputField5 = $(this.lookupSelector("understand"));
var outputField6 = $(this.lookupSelector("overcome"));
var outputField7 = $(this.lookupSelector("flourish"));
var outputField8 = $(this.lookupSelector("collab"));
var outputField9 = $(this.lookupSelector("trust"));
var outputField10 = $(this.lookupSelector("grow"));
var outputField11 = $(this.lookupSelector("engage"));
var outputField12 = $(this.lookupSelector("survive"));
var outputField13 = $(this.lookupSelector("thrive"));
var outputField14 = $(this.lookupSelector("evolve"));
var outputField15 = $(this.lookupSelector("connect"));
var outputField16 = $(this.lookupSelector("achieve"));
$.ajax({
type: "GET",
url: "myxmlfile.xml",
dataType: "xml",
success: function(xml) {
//here i'm trying to load the the text in my xml file into my textboxes in edge animate. 'txt1, txt2, txt3' are the tags in my xml file
outputField1 = $(xml).find('txt1').text();
outputField2 = $(xml).find('txt2').text();
outputField3 = $(xml).find('txt3').text();
outputField4 = $(xml).find('txt4').text();
outputField5 = $(xml).find('txt5').text();
outputField6 = $(xml).find('txt6').text();
outputField7 = $(xml).find('txt7').text();
outputField8 = $(xml).find('txt8').text();
outputField9 = $(xml).find('txt9').text();
outputField10 = $(xml).find('txt10').text();
outputField11 = $(xml).find('txt11').text();
outputField12 = $(xml).find('txt12').text();
outputField13 = $(xml).find('txt13').text();
outputField14 = $(xml).find('txt14').text();
outputField15 = $(xml).find('txt15').text();
outputField16 = $(xml).find('txt16').text();
but nothing happens on preview. my textboxes still contain the original text that lives in my comp.
Similar Messages
-
Putting variable text into dynamic text field
How can I make var text input into a dynamic text field that
appears within another timeline (movieclip) on a different
frame?How can I make var text input into a dynamic text field that
appears within another timeline (movieclip) on a different
frame? -
How to display data in combo box from xml file.
Hi All,
I have the data in xml file.
<jukebox>
<song>
<title>When the Levee Breaks</title>
<artist>Kansas Joe and Memphis Minnie</artist>
<url>delhi601(www.songs.pk).mp3</url>
</song>
<song>
<title>Better Leave that Stuff Alone</title>
<artist>Will Shade</artist>
<url>delhi601(www.songs.pk).mp3</url>
</song>
<song>
<title>Walk Right In</title>
<artist>Cannon's Jug Stompers</artist>
<url>delhi601(www.songs.pk).mp3</url>
</song>
</jukebox>
and i want to display the only url in combo box list. for that how can load this xml file and how can i show.
Can any one help me.
thanks
Raghu.Raghuvasa,
Get the XML file data into an XML variable in your code, say var jukebox: xml. Then do
combo.dataProvider = jukebox.song.url
or as a shortcut
combo.dataProvider = jukebox.descendants("url")
The latter will pull out elements with tag name url at any depth in the xml structure, so sometimes you have to be careful, but in your case there should be no problem.
Richard -
Why can't I create a document in my Facebook group on my iPad. It won't let me input any text into the text box field after I create a new document. Thanks.
Just thought I'd add my solution, I decided to go with WebDAV and I think it actually works better than the iTunes way, the steps are pretty much the same but avoiding the iTunes interface just makes things easier and faster.
I followed this guide but it does have a small mistake in the httpd-dav.conf file, on line 2, where it's WebServer/WebDAV">, it should be <Directory "/Library/WebServer/WebDAV">.
The tricky part is setting permissions which if wrong will give you errors when connecting with the iPad, I opted to set all to Read&Write since my home network has a hardware firewall. Another convenience was to add an alias to the webdav share on the Desktop.
I'm still expecting the call from Apple but even if they fix the iTunes I'm sticking with WebDAV, atleast until I see what's new with iOS5 and iCloud this fall which should bring true sync for documents (I'm hoping that they will offer encryption with my own keys, if not, then I'll probably keep using WebDAV). -
How do I make dynamic text look static while the HMTL tagging is enabled?
Hi all,
I am using flash 8 with AS 2.0.
I have a dynamic text field where I am setting it's text value through a variable. Now, I need this dynamic text field content to look like static font on runtime. I tried embedding the text field but that makes my file so heavy and most importantly, it disables the HTML tagging on the text field.
Please suggest me on how to make a dynamic text field content look static on runtime while the HTML tagging is enabled and working fine.
Thanks.I am sorry. But the attachment was not intended for what you
thought my friend.
It was there so that there are no confusions for what I mean by look of dynamic and static text fields. -
How to make a dynamic text be SMS by fl2.1
Now ,I know use " getURL("sms:"+telnumber) "to send sms to a
specified no.,but how to make a dynamic text be the sms content.?
Many thx!:Ciao,
this should work:
smstxt = "ciao, happy holidays";
telnum = "1234567890";
getURL("sms:"+telnum+"?body="+smstext);
body is a keyword.
Alessandro -
Feature Request: overflow text (threading text into another text box) as in InDesign
I would like to see overflow text (threading text into another text box) as in InDesign
Brilliant. Thanks for the reply. The file I'm using is the same one I've been using as a emplate for about 3 years now, but I've recently upgraded to Windows 8 and re-installed my copy of InDesign onto that, so I could have inadvertantly flicked one of these settings on during setup.
I'll look through the properties or something and see if I can find the language settings.
Thanks Steve, I appreciate your help. :-) -
Copying a standard text into another text in so10
Hello Gurus,
I have an issue where i need to track offer letter,i have a standard text which is been automatically used in pb40 while generating offer letter and that is ww-offer-contract in which i need to change the code ( in textid palt )but it is read only document. i need to copy the text into another text.So that i can do the changes required in that.
If i go with Utilities-->copy from client then it is allowing me to copy but not allowing me to change into it.it is giving me the dump.Since it is asking for the permission,i went for stop protection.but still it is giving me the dump.
Any one plzz help me out with this.
Thank you all.
Edited by: BHAVANI MADIREDDY on Feb 12, 2008 12:34 PMThere is a selection screen parameter
parameters: par_bi like rfpdo1-f100buch default ' '.
Comment this and declare a variable and pass 'X' or space into that as per the requirement. -
When inserting a checkbox, how can I prevent the note box from appearing?
To all,
After -reluctantly- "upgrading" from Acrobat Pro 7 to Pro X I find this new version absolutely maddening.
Pro 7's features were easy to find in the tool bar. Now in Pro X everything is "dumbed down" with everything "nested" into each other...
But I whine and digress from my problem:
QUESTION:
When inserting a checkbox, how can I prevent the note box from appearing?
With every insertion of a checkbox onto a form, a "notebox" appears.
Thank you,
MattAs you can see, when I add a checkmark to a page/form, a "note" is automatically added also. In my old Acrobat v. 7, this did not happen.
Any ideas on how I can set Acrobat Pro X to NOT include this note?
Thank you,
Matt -
Change Text Color Dynamically Depending on Which MP3 File is Playing
Change Text Color Dynamically Depending on Which MP3 File is
Playing
Hi,
Can anyone help with this problem.
I am trying to change a text cast member's color dynamically
based on which audio file is currently playing.
I have 4 Text Cast member buttons named
Play Song 1
Play Song 2
Play Song 3
Play Song 4
I am successfully playing the 4 songs in a queue like this
(ie. If "Play Song 1" sprite text member is pressed then...
sound(1).queue(member "Song1")
sound(1).queue(member "Song2")
sound(1).queue(member "Song3")
sound(1).queue(member "Song4")
sound(1).play
What I would like to do is to have the currently playing song
text color changed to a different value, say Green.
So if "Song2" in the queue starts to play then the text "Play
Song 2" would become Green. When done it would then turn back to
black then "Song3" starts to play and "Play Song 3" text script
button would then turn from black to Green an so on.
These are the codes I've tried in the frame script and none
seem to work...
on enterFrame me
if sound(1).status = 3 then member("Play Song 1").foreColor=5
(This works but only for the first song because "Play Song 1"
is directly named and clicked on.)
else member("Play Song 1").foreColor=255
end if
I have tried to make a reference to the playing song and so
far each of these doesn't work...
--if sound(1).status = 3 then
sprite(me.sound.member).foreColor=5
--if sound(1).status = 3 then
sprite(me.spriteNum).member.color=rgb(0,255,0)
--if sound(1).status = 3 then member
(sound(1).member).foreColor=5
--text = member(whichMember).scriptText
end
Is there any way to reference the song name text cast
member??
I thought I had it when I discovered sound(1).member but
sound(1).showProps returns the playing sound.member as
member: (member 28 of castLib 1) nothing there I can use?
It doesn't show the member name and
It doesn't show the song name "Song1" which I could then
match up to the "Play Song 1" text
I'm pretty new to lingo so specific code examples would be
appreciated.
Can anyone help??? Thanks!!!did you get anywhere with this?
When applying a styleClass to a af:showDetailItem, it doesnt seem to have any effect whatsoever. -
How can I input read a line from a file and output it into the screen?
How can I input read a line from a file and output it into the screen?
If I have a file contains html code and I only want the URL, for example, www24.brinkster.com how can I read that into the buffer and write the output into the screen that using Java?
Any help will be appreciate!
======START FILE default.html ========
<html>
<body>
<br><br>
<center>
<font size=4 face=arial color=#336699>
<b>Welcome to a DerekTran's Website!</b><br>
Underconstructions.... <br>
</font> </center>
<font size=3 face=arial color=black> <br>
Hello,<br>
<br>
I've been using the PWS to run the website on NT workstation 4.0. It was working
fine. <br>
The URL should be as below: <br>
http://127.0.0.1/index.htm or http://localhost/index.htm
<p>And suddently, it stops working, it can't find the connection. I tried to figure
out what's going on, but still <font color="#FF0000">NO CLUES</font>. Does anyone
know what's going on? Please see the link for more.... I believe that I setup
everything correctly and the bugs still flying in the server.... <br>
Thank you for your help.</P>
</font>
<p><font size=3 face=arial color=black>PeerWebServer.doc
<br>
<p><font size=3 face=arial color=black>CannotFindServer.doc
<br>
<p><font size=3 face=arial color=black>HOSTS file is not found
<br>
<p><font size=3 face=arial color=black>LMHOSTS file
<br>
<p><font size=3 face=arial color=black>How to Setup PWS on NT
<BR>
<p><font size=3 face=arial color=black>Issdmin doc</BR>
Please be patient while the document is download....</font>
<font size=3 face=arial color=black><br>If you have any ideas please drop me a
few words at [email protected] </font><br>
<br>
<br>
</p>
<p><!--#include file="Hits.asp"--> </p>
</body>
</html>
========= END OF FILE ===============Hi!
This is a possible solution to your problem.
import java.io.*;
class AddressExtractor {
public static void main(String args[]) throws IOException{
//retrieve the commandline parameters
String fileName = "default.html";
if (args.length != 0) fileName =args[0];
else {
System.out.println("Usage : java AddressExtractor <htmlfile>");
System.exit(0);
BufferedReader in = new BufferedReader(new FileReader(new File(fileName)));
StreamTokenizer st = new StreamTokenizer(in);
st.lowerCaseMode(true);
st.wordChars('/','/'); //include '/' chars as part of token
st.wordChars(':',':'); //include ':' chars as part of token
st.quoteChar('\"'); //set the " quote char
int i;
while (st.ttype != StreamTokenizer.TT_EOF) {
i = st.nextToken();
if (st.ttype == StreamTokenizer.TT_WORD) {
if (st.sval.equals("href")) {
i = st.nextToken(); //the next token (assumed) is the '=' sign
i = st.nextToken(); //then after it is the href value.
getURL(st.sval); //retrieve address
in.close();
static void getURL(String s) {
//Check string if it has http:// and truncate if it does
if (s.indexOf("http://") > -1) {
s = s.substring(s.indexOf("http://") + 7, s.length());
//check if not mailto: do not print otherwise
if (s.indexOf("mailto:") != -1) return;
//printout anything after http:// and the next '/'
//if no '/' then print all
if (s.indexOf('/') > -1) {
System.out.println(s.substring(0, s.indexOf('/')));
} else System.out.println(s);
}Hope this helps. I used static methods instead of encapsulating everyting into a class. -
Error encountered while loading data into an Essbase cube from oracle DB
Hi All,
I am trying to load data into an Essbase cube from Oracle db. Essbase is installed in an 64 bit HP-UX machine and oracle database on HP -UX 11.23 B server. While performing the above I am getting the below error messages:
K/INFO - 1021013 - ODBC Layer Error: [08001] ==> [[DataDirect][ODBC Oracle Wire Protocol driver][Oracle]ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
HP-UX Error: 2: No such file or directory].
OK/INFO - 1021014 - ODBC Layer Error: Native Error code [1034] .
ERROR - 1021001 - Failed to Establish Connection With SQL Database Server. See log for more information.
Can you please help me out in identifying the issue, as why it could have occured , because of network problem or is there anything related to databse?
Regards,
PriyaThe error is related to Oracle, I would check that it is all up and running
ORA-01034: ORACLE not available
Cheers
John
http://john-goodwin.blogspot.com/ -
Best to load preloader from external file or place it directly into existing movie?
Is it best to load the preloader from external file or place it directly into an already existing movie?
there's no one answer for everyone.
but for an inexperienced coder that's already completed their main project and is adding a preloader as an after-thought, it's usually easiest to create a stand-alone preloader.
and even for experienced coder's, that's usually the easiest way to preceed. -
How can i stop the download box from viewing evertime i download something?
how can i stop the download box from viewing everytime i download something?
Open Firefox, choose Tools on the menu bar, then Options, General, and there's a tickbox option to deactivate the Downlaods window.
-
How to read and write a data from extrenal file
Hi..
How to read and write a data from extrenal file using Pl/sql?
Is it possible from Dyanamic Sql or any other way?
Reagards
Rajuutl_file
Re: How to Create text(dat) file.
Message was edited by:
jeneesh
Maybe you are looking for
-
How to get the MIME type of the given file in R/3
Dear Experts, Please tell me the FM or Class to get the given file MIME type in R/3 . I am using GUI_upload Function module to upload the file in R/3 . Edited by: balaji ramadas on Jan 16, 2009 5:39 AM
-
Final cut pro x not sending audio to compressor
I have a project on FCP X and when I send it to compressor, the audio does not show up in the preview or in the actual exported video. The audio works fine one the FCP X timeline. Is there any way to fix this issue without having to reinstall FCP X a
-
Know this is a repeat of an already answered question regarding Oracle BPM 11g Certification (certification for oracle BPM 11G but would like to see if there might be an update on when this might be available. Thanks, Dan Edited by: Daniel Atwood on
-
Help regarding VARI() function
Hi All, I need more information, and if possible some example on how to use VARI() function. Thanks for your help. Regards, Shankar
-
10.4.11 update issues
Last night, I got my automatic software update on my iBook G4 and downloaded a few different upgrades, including the newest Mac OS-X update for Tiger. After restarting my computer, I simply got the blue screen with the apple and the little wheel icon