image and text change when you click sublink

Dear Sir

I would like to know how I can show a picture when I clicked sublink?

I have 3 MCs: sub_bg, ImgMc and bg.

sub_bg of the code is:

function linkF(s:String):Void

{

_root. S = BG.txt.htmlText;

}

BG of the code is:

Stop();

var styles = new TextField.StyleSheet ();

styles. Load("CSS/main.css");

_root. BG.txt.html = true;

_root. BG.txt.StyleSheet = styles;

_root.sub_bg.subTXT.html = true;

_root.sub_bg.subTXT.stylesheet = styles;

var newsXML:XML = new XML();

newsXML.ignoreWhite = true;

newsXML.onLoad = {function (success)}

If (success) {}

var defaultp:String = newsXML.childNodes [0] Sublst.ChildNodes(1).ChildNodes(0) [1] Sublst.ChildNodes(1).ChildNodes(0) [0].firstChild.nodeValue;

_root. BG.txt.Text = defaultp;

for (var i: Number = 0; i < newsXML.firstChild.childNodes [1].childNodes.length; i ++) {}

var tlink:String = newsXML.childNodes [0] Sublst.ChildNodes(1).ChildNodes(0) [1] .attributes. Name;

var links: String = newsXML.childNodes [0] Sublst.ChildNodes(1).ChildNodes(0) [1] Sublst.ChildNodes(1).ChildNodes(0) [i].attributes.name;

imageS of the var: String = newsXML.childNodes [0] Sublst.ChildNodes(1).ChildNodes(0) [1] Sublst.ChildNodes(1).ChildNodes(0) [i] .attributes. ImgUrl;

The var text: String = newsXML.childNodes [0] Sublst.ChildNodes(1).ChildNodes(0) [1] Sublst.ChildNodes(1).ChildNodes(0) [i] Sublst.ChildNodes(1).ChildNodes(0);

_root.sub_bg.subTXT.htmlText += ' < a href = "asfunction:linkF," + text + "" > "+ links + '< /a > < br / >';".

_root.sub_bg. LinkTitle.htmlText = tlink;

}

}

}

newsXML.load("xml/homes.xml");

I'd appreciate your help.

Kind regards

MELAS

Post edited by: melas076

use:

function linkF(s:String,s2:String):Void

{

_root. S = BG.txt.htmlText;

_root. ImgMC.loadMovie(s2');

}

Stop();

var styles = new TextField.StyleSheet ();

styles. Load("CSS/main.css");

_root. BG.txt.html = true;

_root. BG.txt.StyleSheet = styles;

_root.sub_bg.subTXT.html = true;

_root.sub_bg.subTXT.stylesheet = styles;

var newsXML:XML = new XML();

newsXML.ignoreWhite = true;

newsXML.onLoad = {function (success)}

If (success) {}

var defaultp:String = newsXML.childNodes [0] Sublst.ChildNodes(1).ChildNodes(0) [1] Sublst.ChildNodes(1).ChildNodes(0) [0].firstChild.nodeValu e;

_root. BG.txt.Text = defaultp;

for (var i: Number = 0; i<>

var tlink:String = newsXML.childNodes [0] Sublst.ChildNodes(1).ChildNodes(0) [1] .attributes. Name;

var links: String = newsXML.childNodes [0] Sublst.ChildNodes(1).ChildNodes(0) [1] Sublst.ChildNodes(1).ChildNodes(0) [i].attributes.name;

imageS of the var: String = newsXML.childNodes [0] Sublst.ChildNodes(1).ChildNodes(0) [1] Sublst.ChildNodes(1).ChildNodes(0) [i] .attributes. ImgUrl;

The var text: String = newsXML.childNodes [0] Sublst.ChildNodes(1).ChildNodes(0) [1] Sublst.ChildNodes(1).ChildNodes(0) [i] Sublst.ChildNodes(1).ChildNodes(0);

_root.sub_bg.subTXT.htmlText += "" + links + " ."
";

_root.sub_bg. LinkTitle.htmlText = tlink;

}

}

}

newsXML.load("xml/homes.xml");

Tags: Adobe Animate

Similar Questions

  • Text changes when you click with the text tool before editing

    I have a big file and think that there not saved properly or something. I tried quiting and relaunch Photoshop, but this does not help. Editing the text of other Photoshop files normally works.

    As soon as I click on any text with the text tool, as if I'm going to change or style of the text, the text changes instantly. The content and style of the text shall be replaced as soon as the cursor is placed anywhere in the string.

    The really weird thing is the updated text is text that appears elsewhere on the page. If I click on another text that she is now to who will also get automatically replaced by another text on the page. And it goes on and on. It is impossible to edit or any text style unless I have create a new text.

    I think that the file has arranged miss references to items that becomes apparent that I am editing.

    A way to fix this?

    Out of curiosity, do you have a Mac or a PC, Dan?

    And no, there is no known solution for the corruption in the PSD.

    -Christmas

  • Cannot find the function edit that was on my old computer and firefox. When you click the Firefox icon, you can collect the text that has been deleted.

    Cannot find the function edit that was on my old computer and firefox. When you click the Firefox icon you can extract the text that was deleted by accident.

    Hello, you can press the alt key to display the menu bar with the Edit menu temporarily. or you can press ctrl + z which is the shortcut for "undo"...

  • Result has changed when you click on the PDF attachments

    Result has changed when you click on the PDF attachments.

    It's recent, possibly after updates, I use Adobe Reader 10.0.10, Firefox 35.0.1 on a computer that is running Windows 7

    I no longer get the open/save dialog box when I click a pdf attachment, how do I get that back please?

    I have other problems, but they may be related to the above, so I would like to sort first if possible.

    ,

    In Firefox, go to Tools - Options - Applications and enter "pdf" in the filter field. Then select the action you want from the list.

  • How to clear the cache and page reset when you click on tab

    Hello
    I use two level model tab and its Apex 40.
    I would like to clear the cache and reset pagination when you click level 2nd tab
    Is anyway to do this?
    Thank you.

    hlthanh wrote:
    Hello
    I use two level model tab and its Apex 40.
    I would like to clear the cache and reset pagination when you click level 2nd tab
    Is anyway to do this?

    Can stick us to the standard terminology of APEX: do you mean Parent (level 2) tab or the tab Standard (level 2)?

    Parent tabs this is done directly using the box Erase the Cache property and reset pagination for this page of the tab target.

    For the Standard tabs, create processes from before header tab target:

  • Session state > clear Cache...

  • Reset the Pagination

  • How to change the image of a line when you click on it from the waterfall cookbook sample application

    Hi, I have a few sql data. And I'm showing them with qlistdatamodel. I used the ListItemProvider and implementing customControl for each line in the sample application cascade cookbook. Which can be found in here. I want to change an image of the line when it is selected. I modified the method 'select' of 'recipeItem.cpp'

    void RecipeItem::select(bool select)
    {
      // When an item is selected, show the colored highlight Container
      if (select)
      {
    
          mHighlighContainer->setOpacity(0.9f);
          mItemImage->setImage(Image(QString("app/native/assets/btn_a.png")));
    
      }
      else
      {
        mHighlighContainer->setOpacity(0.0f);
    
      }
    }
    

    It should have changed the image btn_a.png. But what it does is removes the image and the text remains. Thank you.

    I just found out another of my post that my uri of the image is incorrect. The format of the url I was using was valid only in a Beta SDK. It should be like "asset:///btn_a.png". Now it works perfectly

  • When I install Itunes, all my icons change the icon of Itunes and open Itunes when you click it. any ideas why and what I can do about it?

    I installed Itunes and when I did, all my desktop icons changed to the Itunes icon. and when I click on one of them, even though it says "Œuvres", Itunes opens instead. then I deleted Itunes, all icons back to original ones. I installed Itunes several times and each time the same thing happens.

    Hello

    This problem may occur if you install ITunes, then all the files of music that is supported by ITunes will open i tunes.

    You can change this setting by changing the default program to open different types of files.

    To set default programs focus on the link below.

    http://Windows.Microsoft.com/en-us/Windows-Vista/change-default-programs-using-set-program-access-and-computer-defaults

    I hope that helps!

  • How to make a picture to zoom in and zoom out when you click them in WebHelp?

    Is it possible to add image zooming in and out feature on the release of WebHelp of RoboHelp? something like in this page:

    http://docs.Oracle.com/cloud/latest/marketingcs_gs/OMCBD/index.HTML#help/administration/Ta sks/AddingUsers.htm%3FTocPath%3DAdministration%7C___1

    When users click on an image, the zoomed image to provide a better view. Is it possible to do something like this using RoboHelp 8? If so, please explain the steps.

    Thanks in advance.

    Hello

    This is easily done using a standard popup link RoboHelp.

    See you soon... Rick

  • How to show the BLOB (file pdf, image) as pop up when you click on a link

    Hi all

    I have a requirement that, when, clicks on a commandlink in a page, I need to show the BLOB (pdf, image in my case) in the pop-up window.

    I am therefore able to get the BLOB when link clicks on command.

    Please help me on this aspect, how can I show this BLOB in pdf or image format in the pop-up window

    Thank you very much

    Krishna

    Hello

    Have you seen this? https://technology.AMIS.nl/2011/07/28/ADF-11g-show-PDF-in-a-popup/

    Concerning

  • Custom list item changes when you click

    I'm having a strange problem.

    When my list of messages is filled first, she checks a property in the json data to see if the message is 'read' or 'unread '. If it is "no read", it will be a different color than those who are already "read" to indicate to the user.

    It works very well, however I added an action context to the list, and when this action is triggered, I'm changing the message "unread". If the color of the list item to change. This works.

    However, after I changed the color of a single item in the listwhen I do scroll down and down, many elements change color. I think it has to do with the rendering of the list of recycling.

    This behavior does not occur after that list first initializes. Regardless of the colors have been queued to initialize their place. Only after that I have an amendment to one of the elements in the list, things go crazy when I scroll. I hope I'm being clear.

    How can I stop this from happening?  This is the code that changes the color of the label in my custom list item.

     listItemComponents: [
                                ListItemComponent {
                                    MessageListItem {
                                        id: messagesListItem
                                        contextActions: ActionSet {
                                            ActionItem {
                                                title: "Mark Unread"
                                                onTriggered: {
                                                    if (messagesListItem.isNew == false) {
                                                        var selectedItem = ListItemData;
                                                        messagesListItem.isNew = true; //property of list item is changed to unread
                                                    }
                                                }
                                            }
                                        }
    

    And inside the MessageListItem.qml

    property bool isNew: ListItemData.data.new
    
       onIsNewChanged: {
            if (isNew == true) {
                subjectLabel.textStyle.color = Color.create("#FF4500");
            } else {
                subjectLabel.textStyle.color = Color.create("#000000");
            }
        }
    

    Please let me know if you have any questions, any help or suggestion is appreciated. Thank you!

    Hello!

    I think that it doesn't because you are not changing 'new' dataModel element variable. In addition, assigning directly control isNew breaks property DataModel is bound to it.

    It should work if you change the dataModel instead.

    An important point to note, however, that it is not possible to change the individual variables of dataModel point. You need to replace the entire item. The code example for GroupDataModel: (not tested, so may require tweaks, tell me please if you need help in getting this work):

    onTriggered: {
      var selectedItem = ListItemData  // get a copy of dataModel's item
      selectedItem.new = !selectedItem.new  // modify it's property
      messagesListItem.ListItem.view.dataModel.updateItem(indexPath, selectedItem) // update the model
    }
    

    For ArrayDataModel, the function is named differently.

    In addition, this line seems suspicious:

    property bool isNew: ListItemData.data.new
    

    Probably, it should be replaced by this one:

    property bool isNew: ListItemData.new
    
  • How to listen to your audio files, image by image and not only when you listen to the sequence? Help!

    When I edit audio I can't hear it when I play the edit, not when I use the arrows or an advance frame by frame. When I go frame-by-frame audio measures is not even appear on the screen on the right side of my calendar. What should do? I don't remember changing any connection there, but clearly I must have. Used to be very good. Tips for a poor sucker, at several levels? It is not a crisis, but it makes this process

    slow.

    Setting preferred.

    Audio while Scrubbing.

  • Photo not added to the quick Collection when you click marker

    Recently I have not been able to add photos to a quick collection, when you click on the marker. The marker provides information, but the photo does not appear in the quick collection. This problem occurred at the same time, I couldn't remove the photos in the quick collection that had been added. I had to remove these photos using the menu system. I've upgraded to the new version of Lightroom 5 yesterday thinking that would solve the problem. I still have the problem so I wonder if this is a setting that I missed. Quick collection markers button is enabled in the display options and the button and change when you click them... The thumbnail of the photo is not added to the quick collection.

    It seems that you no longer have the quick Collection, referred to as a collection of target. Is there a small symbol '+' next to the name of the collection? If this isn't the case, you have another collection in your designated collection list.

    To fix, right-click the name of the quick Collection and click the option "set as target Collection.

  • How to change the highlight color, click the button image and text and sound.  are there packages of buttons for use in my project?

    How to change the highlight color, click the button image and text and sound. are there packages of buttons for use in my project?

    Hello

    Even if the point of things based Web links buttons created using them is of simple images. Captivate uses simple images. If you need to put your creative hat and not to let the fact that you see the word 'web' scared you somehow. An image is an image. Use on the web, use Captivate. Same case!

    If you change the properties of the button, you can activate the legend of success. Fix any sound that you like with the legend of success and it will play when you click the button. If you do not want to see the legend of success, delete the text and configure it as transparent.

    See you soon... Rick

    Useful and practical links

  • Size of the image changes when you move an image between Lightroom and CC.

    Size of the image changes when you move an image between Lightroom and CC.

    I opened a .dng image in LR and then opened it in the develop module.  I clicked on Crop Overlay and then on the "As Shot" (the lock is closed) menu drop-down and cropped to 11 x 17 and click 'Done '-.

    I click Ctrl-E and the image opens in the CC.  I click on the Image > Image size and the size of the Image is 13,288 inches on 20,533.

    Why change the size of the image?

    I believe that there is a menu to control the size of the image, and I've looked everywhere I see in LR and CC, I have googled various descriptions and I checked both Kelby books, but I can't understand not just how to keep the image at a uniform height when moving between LR and CC.

    Help!... Please?

    The size of the image has not changed. The number of pixels has not changed. Let me tell you. The number of pixels has not changed to a single pixel.

    The numbers relatively meaningless displayed by your software have changed.

    The image is always format 11 x 17 (17 divided by 11 = 1.545 and 20.533 divided by 13.288 = 1.545)

  • Change the color of the text to the previous button when you click on a button

    Hi all

    If I said 7 buttons, each with text that changes color on turnover by using 'Up' 'Over' and 'Down' of the keyframes in the timeline buttons.  Is there a simple way to get the text of the button changes color when you click on it, stay that way, and then back to the original color once one of the other 6 buttons are engaged?

    The only thing I can get to prepare code pages for each button that changes the color of every other button regardless of whether it was active.

    See the code example would help a lot!

    Thank you!

    use:

    var previouslyClickedBtn:MovieClip
    var buttonA:Array = [content_mc.work_btn, next button and the rest of your buttons];
    var targetA:Array = [work_mc, etc.];

    for (var i: uint = 0; i<>
    .Ivar Button [i] = i;
    buttonA [i] .addEventListener (MouseEvent.CLICK, clickF);
    buttonA [i] .addEventListener (MouseEvent.MOUSE_OVER, overF);
    buttonA [i] .addEventListener (MouseEvent.MOUSE_OVER, overF);
    }

    function workOver(e:MouseEvent):void {}
    e.currentTarget.gotoAndStop ("over");
    }

    function workClick(e:MouseEvent):void {}

    {if(previouslyClickedBtn!=null)}

    previouslyClickedBtn.gotoAndStop ("up");

    }

    e.currentTarget.gotoAndStop ("down");

    previouslyClickedBtn = e.currentTarget;

    targetA [e.currentTarget.ivar] .gotoAndPlay ("enter");
    }

    function workOut(e:MouseEvent):void {}
    content_mc.work_btn.gotoAndStop ("up");
    }

Maybe you are looking for

  • Drivers XP VGC-RT150Y

    Hi all I need drivers XP for VGC-RT150Y. The only one that I'm currently missing is the TV tuner driver/application. Any help would be really appreciated

  • B210a: printer

    Printer HP MT was connected to my laptop running on Windows 7 lap top is dead, now my new upper Tower running on Windows 8.1 will not connect the Hp Printer it does not accept the CD because it's windows 7, how can I connect my Hp Printer to my new l

  • Is there a totally free utility to free up space on my computer?

    I am trying to find a way to clean old unnecessary files to free up space without using disk cleanup. I used it and it does not all at the same time.

  • Error of the bad image when opening certain programs such as iTunes and Avast

    I have a computer that is running Windows XP and I recently had this problem occurs: when I try to open certain programs I installed (itunes, Avast, etc.) and a message appears saying 'bad image' followed by the name of the program. He also says to c

  • CD-ROM/DVD-ROM missing from Device Manager, FRUSTRATED!

    I jumped on my computer today, to copy a disc in iTunes and found that Windows is for some reason, do not recognize my DVD/CD drive.  Now, the drive is very good; This works.  I put in a disc and it runs.  But that's all.  I go to Device Manager to s