GetEntryImageFilename(entryIndex, 1);

Purpose

Retrieves the file path of the image for a given RSS entry from an RSS Node.

Syntax

string GetEntryImageFilename(int entryIndex, int imageIndex);

  • entryIndex : The index of the entry, where 0 is the top of the list.
  • imageIndex : The index of the image to retrieve. RSS entries can have multiple images.

Example

function Update()  { 
    t = UpdateContext.LocalTime;
    numLayers = Document.GetNumLayers();  
    layer = Document.GetLayer(0);
    layerEndTime = layer.GetEndTime();

    rssNode = layer.FindNode("RSSFeed").AsRSSFeedNode();
    textNode = layer.FindNode("MainText");
    imageLoaderNode = layer.FindNode("MainImageLoader");

    numRssEntries = rssNode.GetNumEntries();
    entryIndex = 0;

    entryImageFilename = rssNode.GetEntryImageFilename(entryIndex, 0);
    entryText =  rssNode.GetEntryTitle(entryIndex);

    imageLoaderNode.SetString("Attributes.Filename", entryImageFilename);
    textNode.SetText(entryText);
}