What's the code for applying CSS to an XML file, in a dynamic text feild

Hi all,
Very simply put, just like in the title.
If you have a CSS ready, an XML file that already appears
inside a dynamic text field, what AS2 code would you use to connect
the CSS so it applies to the XML file which is now unstyled?
thanks!!!

...sorry for thaking a while to get back to you. I pluged the
code you provided and the exported flash does not deplay the text.
instead it says "undefined" which to me means something in the xml
files is work, which is strage since I tested the xml file in a
browser and it works find. so i am providing both the AS code
(below) and the xml and css file (attached). my hope is that you
can direct me to what the problem is.
THANK YOU AGAING FOR ALL YOU HELP!!!
AS code:
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("member_content_test.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.

Similar Messages

  • In BSP-HTMLB what is the code for auto refresh.?

    Hi friends,
    In BSP-HTMLB what is the code for auto refresh.?
    Means i gave the input every 2 minutes once my output should get refresh.
    So what is the code in bsp-htmpb?
    Moosa

    Hi Moosa,
    Many threads on this topic...
    [Auto Refresh - I|Auto refresh]
    [Auto Refresh - II|Auto-Refresh for BSP page]
    [Auto Refresh - III|Page refresh.....]
    Search the forum for more information.
    Regards,
    Anubhav

  • What is the code for a proscan tv-dvd for a sony rmt-d197a remote control

    trying to program a sony dvd remote to turn on and off my proscan tv-dvd combo. the dvd no longer works. is that possible and what is the code for e proscan tv dvd combo?

    Unfortunately, the RMT-D197A remote control is not programmable. It only works with the DVD player it comes with.
    If my post answers your question, please mark it as "Accept as Solution"
    http://bit.ly/Win-4K

  • What is the code for a reset button that puts the program to start?

    What is the code?
    reset_btn.addEventListener(MouseEvent.CLICK, reset);
    function reset(event:MouseEvent):void
         //Reset all variables and send the playhead to the appropriate frame
    doesn't work!

    Hi,
    I think you are using the pre-defined keyword (RESET), thats why you are facing the problem, try the other word and your problem will be solved, i have tried it in FLASH CS5.
    reset_btn.addEventListener(MouseEvent.CLICK, resetHandler);
    function resetHandler(e:MouseEvent):void
         //Put code reset logic here.
    It will work, as it is properly working.
    VIPUL

  • What is the code for updating a table of content?

    I'm looking online and not finding a command list or something helpful. I'm also on a government computer so a bunch of sites are blocked for security or something. I am making a script that does a few things and one needs to be updating the TOC but I cant find the command.
    I wish this software had something simular to a program called MAYA has. "echo all commands" in the script editor so anything you do shows all code being exicuted.

    Theoretically, if you are using Adobe's own ESTK to write your scripts, all commands can be found in the Help menu. Then again, searching in there is needlessly made difficult (i.e., you have to know exactly what you are searching for before you can find it). So (modest cough) ... Adobe InDesign CS6 (8.0) Object Model JS: Table of Contents
    The command you are looking for is not in the "Table of Content Suite" since that only describes the format of the contents. It is a Document method: Adobe InDesign CS6 (8.0) Object Model JS: Document -- look for createTOC (this stupid editor doesn't show it but the link already points to the correct place -- perhaps this editor was written by "We Also Brought You The ESTK").
    Searching through the thousands of pages is easier if you download the CHM version and use a good CHM viewer. Check out
    http://www.jongware.com/idjshelp.html

  • What's the code for Scaling a MovieClip at Runtime?

    I can't believe how difficult it's been to find an answer for such a simple question.  I found a thread in this forum titled "How to Resize a MovieClip at Runtime?", but the code that was posted as an answer has been removed from the post.  WHY?!?!  Is it a highly guarded secret?!?!
    Anyway...I just want to know how to scale a movieclip at runtime with a drag function...and also while the parent movieclip already has a drag function active.
    Any help would be much appreciated.
    BTW...I've found a cure for death that also instantly makes you the richest person in the world with all the knowlege of the universe...
    It can be found here:

    onMouseUp and onRelease is usually (but not always) the same.
    you can use a scaling factor:
    var scaleFactor:Number = .3;
    mc.onPress=function(){
    resize_mc = this;
    startX =_xmouse;
    startY = _ymouse;
    this.onEnterFrame=resizeF;
    mc.onRelease=function(){
    delete this.onEnterFrame;
    function resizeF():Void{
    resize_mc._width+=(_xmouse-startX)*scaleFactor;
    resize_mc._height+=(_ymouse-startY)*scaleFactor;

  • What is the code for a rating scale?

    I can't seem to find the coding for a simple 1-5 point/star rating scale. Can someone help me?
    Thanks,

    http://speckyboy.com/2010/04/21/15-javascript-and-plugins-and-tutorials-for-adding-ratings /

  • What is the commands for SQL server job to ftp file to remote server?

    I created the job to bcp data out and create file on file system. after that, I need to ftp the file over to another box. how can I do it from sql server job?
    JulieShop

    I would like to suggest a SSIS package with a
    FTP Task instead.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Pseudo code for DOM parsing a local XMl file

    HI all,
    1)     Can any body please provide me the JAVA pseudo code for parsing xml document from local mcahine and create another xml document in another location in loca machine with small transofrmations ? (JAVA mapping using DOM parsing tehnique using an xml file in loca machine using NWDS).
    2) Provide me with the links that can help me out to work with
    JAVA mapping using DOM
    Thanks,
    Ram.

    Hi,
    Have a Search in SDN with Keywords JAVA Mapping, & will get lot of stuff
    Implermenting JAVA Mapping in PI
    Implementing a Java Mapping in SAP PI
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10dd67dd-a42b-2a10-2785-91c40ee56c0b
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/400ee77e-f9d6-2a10-2b8c-99281a4dcf6b
    Regards
    Seshagiri

  • How to define the style for JTextArea using synth style xml file.

    Hi all,
    How can we align the text inside the JTextArea using synth style xml file.
    We defined a style for the TextArea. But the text is displayed immediately after the border. So we want to provide some space between the border and the text.We specified the insets as given below. But it is not reflecting during runtime.
    <insets top="3" left="3" bottom="3" right="3"/>
    Please help me if any one knows

    Hi Anju,
    This may help you.
    http://www.xenta.nl/blog/2009/10/28/oracle-soa-suite-11g-setting-and-getting-preferences/
    Preferrence Variable can be updated either thorugh EM console or ConfigPlan
    Regards,
    Richa

  • 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 &amp; 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: uppercase

    In essence you can just do:
    TextField.text = XML.node1 + XML.node2;

  • What is the code for entering data in tablecontrol as in smartform....?

    Hi
    1.I create 2 tabs in Modulepool Programming.
    2.In First Tab, I enter the data and when i click the SAVE button the data should be saved in my custom table ZDILEEP.
    3.In Second Tab,I put an Tablecontrol and DISPLAY the data what i have to save in first tab and i do 3 operations as DELETE,UPDATE,ADD A RECORD.
    4. I Create a button in Application Toolbar as FORM,whenever i click this button the SMARTFORM will be triggered.
    5.In SmartForm, I put an TableControl and display the data and i put SUM of SALARY.
    6.Now My Requirement is At run time, if i add a record or update a record that should be displayed in smartform,
       without clicking the pushbuttons UPDATE,ADD A RECORD i.e. without using custom table ZDILEEP the data
       should be displayed in smartform as of Tablecontrol.
    where I want to write these code....? and what code i want 2 write...?
    can anybody help me

    >
    dileepbandla wrote:
    > Hi
    >

    > 1.I create 2 tabs in Modulepool Programming.
    > 2.In First Tab, I enter the data and when i click the SAVE button the data should be saved in my custom table ZDILEEP.
    > 3.In Second Tab,I put an Tablecontrol and DISPLAY the data what i have to save in first tab and i do 3 operations as DELETE,UPDATE,ADD A RECORD.
    > 4. I Create a button in Application Toolbar as FORM,whenever i click this button the SMARTFORM will be triggered.
    > 5.In SmartForm, I put an TableControl and display the data and i put SUM of SALARY.
    > 6.Now My Requirement is At run time, if i add a record or update a record that should be displayed in smartform,
    >    without clicking the pushbuttons UPDATE,ADD A RECORD i.e. without using custom table ZDILEEP the data
    >    should be displayed in smartform as of Tablecontrol.
    You need to read the table control data along with Custom table data before you call the smartform and passing data to smartform.
    > where I want to write these code....? and what code i want 2 write...?
    >
    In PAI. What code? - Probably, loop at table control and get the data into another internal table then pass this data into smartform interface.
    >
    >  can anybody help me

  • What is the snippet for a symbol's XY position?

    I am animating a drag drop game and when all 4 pieces are in the right locations, I need another action to happen.
    But what is the code for the location of a symbol?
    I know it's not getPosition (as that relates to the timeline), and if you put in .css({"position": "absolute", "left": "Xpx", "top": "Ypx"}) then it positions the different symbols top begin with... but still doesn't start the consequent action.
    Anyone know?
    Here is the code I am using currently:
    if(
        (sym.$("Slide").css({"position": "absolute", "left": "45px", "top": "117px"})),
        (sym.$("Rightleg").css({"position":"absolute", "left": "260px", "top": "21px"})),
        (sym.$("Leftleg").css({"position":"absolute", "left": "105px", "top": "30px"})),
        (sym.$("Ladder").css({"position": "absolute", "left": "360px", "top": "16px"}))
           alert("correct");

    There are several ways to find the position of an object.
    with top() and left()
        var symTop = sym.$('Rectangle').css('top');
        var symLeft = sym.$('Rectangle').css('left');
    with offset()
        var x = sym.$("elementName").offset();
        alert("Top: " + x.top + " Left: " + x.left);
        Note: you will need jquery
    with position()
        var position = sym.$("Rectangle").position();
        console.log( "x or left: " + position.left + ", y or top: " + position.top );
              or
        var x = sym.$("Rectangle").position().left;
        var y = sym.$("Rectangle").position().top;

  • What is the process for SQL Server 2005 patch update

    hi,
    i have 2 production SQL Server2005  Database servers in cluster ,
    what is the process for applying patches.
    Saidireddy

    In 2005 you can do it in two ways...
    Method 1 :
    With SQL Server 2005,
    when you start installing cluster service pack (or hotfix), it must be launched on the active node(node
    that hosts the instance). When installing the Setup will launch simultaneously  "remote silence" on all passive nodes. All nodes in the cluster containing the SQL Server instance are updated in the same time.
    Method 2: First you can install in passive node then you can install in the active node, In this way you can save your down time ( If you start in the active node it will check in the passive, and if its installed already then it skips that
    and start applying in the active node ), but most of the DBA's follows only first method because they may not aware of this or just they follows Microsoft common method. 
    SQL 2008 and Later....
    1.  Apply the hotfix on pasive node N2
    2.  Reboot the passive node N2
    3.  Failover on SQL resource : the passive node become the active node
    4.  Apply the hotfix on the passive node N1
    5.  Reboot the passive node N1
    Raju Rasagounder Sr MSSQL DBA

  • HT201195 I entered the code for my gift card but I never used it,now I'm trying to use it but it's no there and doesn't let me redeem the code again. What can I do?

    I entered the code for my gift card but I never used it,now I'm trying to use it but it's no there and doesn't let me redeem the code again. What can I do?

    An iTunes gift card can only be redeemed once, you can't enter and redeem its code again. Since you redeemed the card you haven't bought anything (including IAPs and auto-renewing subscriptions), and your account doesn't show a balance ? You've tried logging out and back into your account and seeing if it shows then ?
    My account's balance shows at the top left of the store's page on my computer's iTunes, and by logging in to view my account via the Store > View Account menu option. On my iOS devices it shows at the bottom of, for example, the Featured tab in the App Store app under my account id (or you can view your account via Settings > iTunes & App Stores and it should show on the screen that you are taken to). If the balance is zero then it might not be shown.

Maybe you are looking for

  • IPod not recognized by iTunes - Possible Solution for Networked Users

    My shuffle was recognized by my PC, but not by iTunes. After much trial and error I stumbled onto an answer. My computer is part of a network with a local server. If I leave the iPod in the USB port and reboot, my computer won't be connected to the l

  • Create sales order with reference to archived billing

    Hello, Is it possible to create sales order with reference to archived billing? Thanks in advance and kind regards

  • Problem In miro

    Dear All, i am facing a problem time of miro. I was purchase a material  of 800 PC from my vendor.  when i was make Purchase order for this material  i took rate  1000 rs per PC, but after making GRN Somebody else change material rate with 500rs per

  • Using Printers and scanners with mac book

    Hello, Ive just got a new mac book and need to scan images to use in word. My printer is a hewlett packard combined printer and scanner i can get it to print but cant get it to work as a scanner? ive tried using image director but the mac dosnt seem

  • Flash  & Database connectivity

    How can sql server 2000 data is retrived on Flash (say to dispaly sql server data on Flash Text Area)