Dynamic Captions

Hello,
I have a text field that I want to display a caption with some built in scripting. For the Caption of the field I want to display part of the text that displays as static text in a regular format, while populating the second part of the caption with the value of a variable. For this second part of the caption I want to give the text an italic look. I can see how this is done when everything is static in the caption (going through the field/caption/value/exData/body tags in the XML for my form. Is there a way to set this up dynamically though through scripting.
I know for a work around I could just have two fields. One without a caption (that would represent my current text field, just remove the caption), and a second that would have my static caption, and have the field be the value that I display in italics. I was just wondering if there was a way to dynamically edit the caption of a field.

My testing is complete.....you have to create a variable that will hold the rich text formatting (in html format) that you will set in the caption. Then you need to load that variable into the appropriate property. It will look like this:
rt = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><body xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:xfa=\"http://www.xfa.org/schema/xfa-data/1.0/\" xfa:APIVersion=\"2.8.8028.0\"><p style=\"letter-spacing:0in\">Kyle <span style=\"xfa-spacerun:yes\"></span><span style=\"font-weight:bold;text-decoration:underline\">Black</span></p></body>"
FFRichField2_JS.caption.value.exData.loadXML(rt,0)
A couple of things to keep in mind:
- The form needs to be dynamic
- You need to escape (\) the double-quotes () in the script in order for it to work
- I dont know how much of the namespace stuff you need, I just copy and pasted it from the XML source.....so set up a caption the way you want and copy and paste the exData segment so you can see how the attributes are set.

Similar Messages

  • Using dynamic captions with checkboxes

    Hello.
    I want to create a list of checkboxes, according to a table I get from the context, meaning there would be as much checkboxes as the lines in the table, and their caption would be one of the table's fields.
    I turned on Show Dynamic Properties.
    First I tried it with one checkbox, with it's caption related directly to the table's field, and it worked - but with only one checkbox displaying the first line's value, of course.
    Next I put the checkbox in a subform. The subform is related to the table line, and is repeated for every row, and now the caption is only bound to the field's name, relatively.
    So the subform is repeated, but the caption doesn't change at all.
    How can it be done?
    And can I set the checkbox's caption by code? I tried, but it didn't work.
    Best regards,
    Udi.

    Hi,
    try using table control (supported in ALC 8.0) and add the checkboxe in the row.
    You can then map your data node (structure) with the table.
    Ashutosh

  • Need to create a dynamic caption(column name) in a dynamic table

    Hi All,
    I have created dynamic table .But the dynamic column is not showing.I have created two column name that is name and empId .I have tried with following code
    IWDCaption nameCap=(IWDCaption)view.createElement(IWDCaption.class,"nameCap");
    nameCap.setText("Name");
    tabColumn1.setHeader((IWDCaption)nameCap);
    IWDCaption addCap=(IWDCaption)view.createElement(IWDCaption.class,"addCap");
    addCap.setText("Address");
    tabColumn2.setHeader((IWDCaption)addCap);
    I m getting internal server error...But When i  m comented the above code i can able to see tha dynamic table withput column name..Can anyone help me
    Suman

    Hi
    IWDTableColumn tabColumn1 = (IWDTableColumn)view.createElement(IWDTableColumn.class,"N_Co");
              IWDTableColumn tabColumn2 = (IWDTableColumn)view.createElement(IWDTableColumn.class,"A_Co");
              IWDInputField nameText = (IWDInputField)view.createElement(IWDInputField.class,"N_Text");
              nameText.bindValue(attrib1);
              tabColumn1.setTableCellEditor((IWDTableCellEditor)nameText);
              IWDInputField addText = (IWDInputField)view.createElement(IWDInputField.class,"A_Text");
              addText.bindValue(attrib2);
              tabColumn2.setTableCellEditor((IWDTableCellEditor)addText);
    <b>I need to see the column name.....</b>
    for that i have written the following code...
    while writting the following code i m getting internal server error
    IWDCaption nameCap = (IWDCaption)view.createElement(IWDCaption.class,"nameCap");
    nameCap.setText("contribution_area");
    tabColumn1.setHeader((IWDCaption)nameCap);
    IWDCaption addCap=(IWDCaption)view.createElement(IWDCaption.class,"addCap");
    addCap.setText("SUM");
    tabColumn2.setHeader((IWDCaption)addCap);

  • Can you generate a static caption for video in InDesign?

    I set up my caption in the metadata description area in Bridge. I am trying to generate the static caption in InDesign and it goes through the motion but gives me a blank box. It works correctly for my images, but not for my video. Can this be done or does it just not work for videos?

    Seems like this is not possible for videos. I tried static and dynamic captions with MOV and FLV. No chance.

  • Adding Caption to Spry Demo Photo Gallery

    Guys,
    Can someone please help... I'm trying to add a dynamic
    caption to the following photo gallery:
    http://www.stevenbeverage.com/gallery.html
    Right now, I'm just using the image path for the caption, but
    it doesn't change with when a new image is loaded. I started with
    the demo files provided in the spry frameworks download.
    Here is my code (the important parts anyhow):
    <link href="spry/screen.css" rel="stylesheet"
    type="text/css" />
    <script type="text/javascript"
    src="spry/SpryEffects.js"></script>
    <script type="text/javascript"
    src="spry/SpryDOMUtils.js"></script>
    <script type="text/javascript"
    src="spry/SpryImageLoader.js"></script>
    <script type="text/javascript"
    src="spry/SpryNotifier.js"></script>
    <script type="text/javascript"
    src="spry/SpryThumbViewer.js"></script>
    <script type="text/javascript"
    src="spry/SpryImageViewer.js"></script>
    <script type="text/javascript"
    src="spry/SprySlideShowControl.js"></script>
    <script type="text/javascript"
    src="spry/gallery_init.js"></script>
    <script type="text/javascript"
    src="spry/xpath.js"></script>
    <script type="text/javascript"
    src="spry/SpryData.js"></script>
    <script type="text/javascript"
    src="spry/gallery_xds.js"></script>
    <script src="SpryAssets/SpryTabbedPanels.js"
    type="text/javascript"></script>
    <link href="SpryAssets/SpryTabbedPanels.css"
    rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    var dsPhotos = new
    Spry.Data.XMLDataSet("gallery/sculptures.xml", "/gallery", {
    subPaths: "photos/photo", filterDataFunc: PhotosFilter });
    var dsData = new
    Spry.Data.XMLDataSet("gallery/sculptures.xml", "/gallery", {
    subPaths: "photos/photo", filterDataFunc: PhotosFilter });
    </script>
    <div id="galleryLinks" align="left"
    style="position:relative; width:100%; height:28px;
    border-bottom-style:solid; border-bottom-color:#333333;
    border-bottom-width:1px; margin:0px; top:0px; left:0px;">
    <ul class="TabbedPanelsTabGroup">
    <li class="TabbedPanelsTab"><a
    href="gallery/sculptures.xml">Sculptures</a></li>
    <li class="TabbedPanelsTab"><a
    href="gallery/paintings.xml">Paintings</a></li>
    </ul>
    </div>
    <!-- Begin Gallery -->
    <div id="wrap">
    <div id="gallery" class="gallery">
    <div id="previews">
    <div id="controls">
    <ul class="style1" id="transport">
    <li><a href="#" class="playBtn" title="Play/Pause"
    id="playLabel"><span
    class="playLabel">Play</span><span
    class="pauseLabel">Pause</span></a></li>
    </ul>
    </div>
    <div id="thumbnails" spry:region="dsPhotos dsData">
    <div class="thumbnail" spry:repeat="dsPhotos">
    <div>
    <a href="{path}"><img alt="" src="{thumbpath}"
    spry:setrow="dsData" /></a> <br />
    </div>
    </div>
    <p class="ClearAll"></p>
    </div>
    </div>
    <div spry:detailregion="dsPhotos dsData">
    Caption:{path}{caption}
    </div>
    <div id="picture">
    <div id="mainImageOutline">
    <img id="mainImage" alt="main image" src=""/>
    </div>
    </div>
    <p class="clear"></p>
    </div>
    </div>
    Any help would be greatly appreciated!
    - Omar

    add additional field : caption1 to the xml file with the
    slideshow album information in each image line. this caption1 field
    will have the
    http:// address of the caption
    then modify the caption display to read -
    <a href="{@caption1}">{@caption}</a>
    see how this works here
    http://jugalbandi.info/wp-content/uploads/2008/click02/index.html

  • Batch placing images with filename as an editable caption?

    Howdy! Does anyone know if there is an easy way to place about 300 screenshots into ID CC on a multi-page document (obviously) AND capture each filename associated with the image as a text frame above it (or close to it)? I named my files as reminders for the copy I need to write to describe the screenshot and - boy - would this help a lot to avoid back and forth to refer to file names. I need to edit the copy associated with each image, which is why I need the text (filename) in a text frame. The file names are long. I know - not an ideal way to name files, but I had to do screenshots on the fly on someone else's computer and it's what popped into my head at the time. Thank you kindly!

    You're in luck. You can use the Object > Captions > Caption Setup to pick Name as the metadata. Then when you place the file turn on Import Options and check Create Static Captions.
    You also can create dynamic captions which pull other metadata from the images but it doesn't sound like that's what you need.
    Also you can read more about Captions in InDesign Help.

  • Translation of interactive Forms - (multilangual, international)

    Hi there,
    Is there a better way to translate a interactive form than copy it and translate it separately?
    I tried to use dynamic caption, but there is no effect if I map the caption of a text element to a data connection.
    (If I do the same with a button, it works perfect)
    Is there another way to fill the label of a text field dynamically?
    What's the best way to translate Interactive Forms (not in SAP)?
    Use NWDS 2004 SP18 and Adobe LiveCycle Designer 7.1
    Thanks
    cheers dome

    Hi Hanoz,
    In the interface linked with my layout i add a parameter name RECIPIENT_LANGUAGE typing SYLANGU .
    Line: -
    For SMARTFORM Text process as follow
    In the context of the layout i define field as Text Module with thoses attributes :
    - text name value 'ZTOTO' ( it's a sample name )
    - text language value field RECIPIENT_LANGUAGE
    - No error if text not available set to TRUE
    - Copy style from Text Module set to TRUE
    In the layout i put this text element in a sub-windows.
    Then you have to create your smartforms text and populate it in the different language you want thru transaction SE63 for translation .
    Line: -
    For SAPSCRIPT Text process as for SMARTFORMS text except for the field define in the context, it should be define as Include Text .
    Line: -
    When you call your form populate the attribute RECPIENT_LANGUAGE with the value you want . If none text of your forms exist in the language you want the system process the text with the default language of the forms ( creation language ) .
    If at least one text exist in the language requested all text will be process with it even if some translation are missing ( in this case you will got empty value ) .
    Hope this help you.
    Best regards.

  • Proof prints with filename, batch, automate? help!!

    I am 'action' and 'script' challenged...trying to find a way to automate batch processing of printing 4x6 inch proofs (jpegs to local print lab) with the filename from the EXIF info on them in the lower right corner.  I can get exactly what I want with a  'picture package' action, but once flatted, it won't save to another folder, just sits on the desktop....   I have Win XP, CS2 and 4, and LR2 - Thank you!!
    (just about to escape to the Himalayas and meditate for the duration....so any help is greatly appreciated!!)

    You're in luck. You can use the Object > Captions > Caption Setup to pick Name as the metadata. Then when you place the file turn on Import Options and check Create Static Captions.
    You also can create dynamic captions which pull other metadata from the images but it doesn't sound like that's what you need.
    Also you can read more about Captions in InDesign Help.

  • Dynamically changing a UI caption.text

    Hi!
    I have a Caption in a View's Layout and i'd like to change its text properties when a user click on a button.
    Now i have created the OnAction Event for the button, but i don't know how to point to that Caption!
    How can i navigate through ROOTUIELEMENTCONTAINER to this Caption ID ?
    Thanks.

    Hi Fabio,
    The best way for you would be to bind your Captions "text" property to an context attribute & specify your original value over there. By using this approach you can then simply code within your buttons action handler to modify the text by modifying the context attribute using a simple set_attribute( ). This would be the suggested & easy manner.
    However am just explaining for your reference as to how you can achieve the same using the dynamic class methods. First obtain & save the reference of your caption into a view level attribute of type ref to CL_WD_CAPTION.
    So withing your WDDOMODIFYVIEW you pass your Captions id & obtain its reference:
    wd_this->lr_caption = view->get_element( id = 'CAP1' ).
    So now within your buttons action handler you can change the text by saying as:
    wd_this->lr_caption->set_text( value = 'My new text!' ).
    However just please keep it in mind that we are not supposed to save & use the reference of ui elements like in the 2nd approach. We are supposed to modify our layout only within WDDOMODIFYVIEW & SAP wouldn't support any problems that we might run into while following this latter approach.
    Regards,
    Uday

  • Dynamic UI set vAlign for Caption UI

    Hello everybody,
    I create dynamic UI-Elements.
    I have a GroupUI which nests a transparentContainer.
    The layout of the Group is GridLayout with 3 columns.
    For each cell of GroupUI I nest a captionUI. I want to set the vAlign-property to the caption.
    How can I achieve this?
    There is NO method:  caption.setValign!!!
    Thanks a lot, regards Mario

    Mario,
    Try this:
    IWDCaption caption
      = (IWDCaption)view.createElement(IWDCaption.class, null);
    IWDGridData cell
      = (IWDGridData)caption.createLayoutData(IWDGridData.class);
    cell.setVAlign(WDCellVAlign.TOP);
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • Dynamically add a fade in/out transition to a caption when "showing" it from an Action?

    I have a conditional action set up where if things are not correct (text input in two entry fields), I show feedback in a caption box. I figured out how to set the caption box to be initially invisible (via unchecking the Visible checkbox for the caption's properties), and how to show it when this condition occurs. But I 'd like it to also do the traditionall transition of fade in & out when I show it fromt he action. My Advanced Action is executed when the user clicks an "OK" button.
    Any thoughts or advice?

    Yes. Plenty of media on either end. The good news is that trashing the permissions and repairing worked.
    BUT I have a question while these great minds are assembled...When repairing disk permissions the Utility says that to repair permissions on startup disk, start using my OSX install disk, which in my case is the the CD that came with my powerbook. When I tried to startup using that CD, holding down the "c" key on startup, it went into install mode. I told it I did not want to install, set the startup disk as the CD again, and kept looping around in this manner. I am probably missing a step...First question:
    1) Is it in fact necessary to start up from this CD in order to properly repair permissions?
    2) If yes, how do I get away from the install mode and to the disk utility, once the installer pops up.
    Thanks in advance. You guys are lifesavers once again.

  • Actionscript to load captions from array to dynamic text when thumb is clicked

    i have this code below that i made using a tutorial....it loads vars from txt file splits it then puts it into an array....once in an array it the brings the pics in from the array to create thumbnails and a larger image. my problem is i have captions to go with it and when i try to load the captions nothing happens or can be seen to be happening.
    i dont know where i am going wrong as i have no output or compiled errors
    var locVar = new Array();
    locVar = imgLoc.split(",");
    trace ( locVar );
    var tmbVar = new Array();
    tmbVar = tmbLoc.split(",");
    trace ( tmbVar );
    var capVar = new Array();
    capVar = imgCap.split(",");
    trace ( capVar );
    var NPICS:Number = locVar.length;     // number of pictures to load
    var PICX:Number = 32.8;               // x loc of big picture
    var PICY:Number = 24.9;               // y loc
    var THUMBHOLDERX:Number = 50;        // x location of thumbnail holder movieclip
    var THUMBHOLDERY:Number = 457;      // y location
    var THUMBW:Number = 100;             // width of each thumbnail
    var THUMBH:Number = 75;             // height
    var MARGIN:Number = 10;             // margin between thumbnails
    var TOTALBYTES:Number = 212000;     // approx sum of bytes in all jpgs (x 2)
    var MAXPIXELS:Number = 12;          // max number of pixels to move slider per frame
    // mask definition; mask is assumed to cover some part of the thumbnail slider (here the numbers
    // were chosen so that there are margins between the mask and the right and left edges of the movie
    // (which is 420 x 290), and enough space above and below the thumbs to show them when they 'grow'
    // on mouseover
    var MASKX:Number = 0;                    // start x location of mask
    var MASKW:Number = 600;                    // mask width
    var MASKY:Number = 447.9;                    // start y location of mask
    var MASKH:Number = 92;                    // mask height
    var totalloaded:Number = 0;         // running tally of bytes loaded from all pics
    // index into pictures array, used for loading
    var ipic:Number;
    // set up loader, an instance of MovieClipLoader
    var loader:MovieClipLoader = new MovieClipLoader();
    // use the main timeline to listen to and respond to loader's broadcast events
    loader.addListener(this);
    // function to move thumbnail slider ("this" = thumbs_mc)
    function sliderControl() {
       var w:Number = this._width/2;
       var hw:Number = mask_mc._width/2;
       var npixels:Number;
       // only do when mouse over slider mask
       if (_ymouse > mask_mc._y && _ymouse < mask_mc._y + mask_mc._height) {
          // mouse over left half of slider:
          if (_xmouse > mask_mc._x && _xmouse < mask_mc._x + hw) {
             npixels = (hw - _xmouse) / hw * MAXPIXELS;
             this._x += npixels;
             if (this._x >= 0) this._x = this._x - w;
          // mouse over right half of slider:
          } else if (_xmouse > mask_mc._x + hw && _xmouse < mask_mc._x + mask_mc._width) {
             npixels = (_xmouse - hw) / hw * MAXPIXELS;
             this._x -= npixels;
             if (this._x <= -w) this._x = this._x + w;
    // thumbnail click (onrelease) handler
    function openPic() {
       pic_mc.loadMovie(locVar[this.i]);
    function brightON(){
         this._alpha = 300;
    function brightOFF(){
         this._alpha = 30;
    function captionTXT(){
         _root.cap_txt = capVar;
    // assign event handlers (called when all jpgs are loaded)
    function setupHandlers() {
       pct_txt.removeTextField();          // don't need loading indicator any more
       thumbs_mc.onEnterFrame = sliderControl;
       for (var i:Number = 0; i < NPICS*2; i++) {
          thumbs_mc["mc"+i].onRollOver = brightON;
          thumbs_mc["mc"+i].onRollOut = brightOFF;
          thumbs_mc["mc"+i].onMouseDown = captionTXT;
          thumbs_mc["mc"+i].onRelease = openPic;
    // listener function for broadcast 'done' message (for each pic)
    // onLoadInit gets executed when the movieclip has been loaded into _mc AND
    //   its width and height data are available.
    //   (_mc = the movieclip being loaded into)
    // this routine sets the size and position of each thumbnail clip as its jpg
    //   is loaded and starts the next one loading.  When all have been loaded,
    //   a random picture is loaded into pic_mc and setupHandlers is called to
    //   assign handlers to each thumbnail movieclip
    function onLoadInit(_mc:MovieClip) {
       // this gets done when the jpg is completely loaded:
       _mc._width = THUMBW;
       _mc._height = THUMBH;
       _mc._alpha = 30;          // for image clarity
       // give the movieclip a property to remind it who it is
       // (used by openPic to know which big picture to open)
       _mc.i = (ipic >= NPICS ? ipic-NPICS : ipic);
       // add picture size to totalloaded variable
       totalloaded += loader.getProgress(_mc).bytesTotal;
       // now load the next one (if there are more) or set up handlers if done
       ipic++;
       if (ipic == NPICS * 2) {
          // start with a random photo displayed when all thumbs loaded
          pic_mc.loadMovie(locVar[Math.floor(Math.random()*NPICS)]);
          setupHandlers();
       } else if (ipic >= NPICS) {
          // load jpg into duplicate thumbnail (will already be cached)
          loader.loadClip(tmbVar[ipic-NPICS],  thumbs_mc["mc"+ipic]);
       } else {
          // load jpg into thumbnail
          loader.loadClip(tmbVar[ipic],  thumbs_mc["mc"+ipic]);
    // listener function to handle broadcast progress messages
    // make pct_txt show cumulative loading progress
    function onLoadProgress(_mc:MovieClip, loaded:Number) {
       var loadedsofar:Number = totalloaded + loaded;    
       pct_txt.text = Math.floor(loadedsofar / TOTALBYTES * 100) + "%";
    function init() {
       // create holder for pictures
       createEmptyMovieClip("pic_mc", 1);
       pic_mc._x = PICX;
       pic_mc._y = PICY;
       // create (and draw) holder for thumbnails
       createEmptyMovieClip("thumbs_mc", 2);
       thumbs_mc.beginFill(0, 100);     // black
       thumbs_mc.moveTo(0, 0);
          thumbs_mc.lineTo(2 * (MARGIN + THUMBW) * NPICS, 0);
       thumbs_mc.lineTo(2 * (MARGIN + THUMBW) * NPICS, THUMBH);
       thumbs_mc.lineTo(0, THUMBH);
       thumbs_mc.endFill();
       // drawing the thumb holder at 0, 0 and then moving it makes its reg point = upper left
       thumbs_mc._x = THUMBHOLDERX;
       thumbs_mc._y = THUMBHOLDERY;
       // create, draw and enable mask over thumbs (could use different variables to define mask
       // if desired)
       createEmptyMovieClip("mask_mc", 3);
       mask_mc.beginFill(0x0000cc, 100);
       mask_mc.moveTo(0, 0);
       mask_mc.lineTo(MASKW, 0);
       mask_mc.lineTo(MASKW, MASKH);
       mask_mc.lineTo(0, MASKH);
       mask_mc.endFill();
       mask_mc._x = MASKX;
       mask_mc._y = MASKY;
       thumbs_mc.setMask(mask_mc);
       // create loading textfield indicator
       createTextField("pct_txt", 4, 200, 100, 40, 100);
       var tf:TextFormat = new TextFormat();
       tf.align = "center";
       tf.size = 12;
       tf.font = "Verdana";
       tf.color = 0xFFFF00;
       pct_txt.setNewTextFormat(tf);
       // create loading textfield indicator
       createTextField("cap_txt", 0, 400, 200, 40, 100);
       var cf:TextFormat = new TextFormat();
       cf.align = "center";
       cf.size = 12;
       cf.font = "Verdana";
       cf.color = 0xFFFF00;
       cap_txt.setNewTextFormat(cf);
       // make empty movieclips in thumbs_mc for each pic to go into
       // make double the number so the slider can move continuously and show content
       for (var i:Number = 0; i < NPICS * 2; i++) {
          var mc:MovieClip = thumbs_mc.createEmptyMovieClip("mc"+i, i+1);
          mc._x = i*(MARGIN + THUMBW);
          mc._y = 0;
       // set the pointer to the first jpg in the array picnames
       ipic = 0;
       // start loading jpgs (ipic is initialized to 0)
       loader.loadClip(locVar[ipic], thumbs_mc["mc"+ipic]);
    init();
    stop();

    ok here is my code so far.....i've set a movieclip where i want the captions and set the dyn text box above the clip....i've given the movieclip a background n faded so images can still be seen behind.
    im just having a problem with the loop.....each one i tried resulted in the caption staying the same no matter what thumbnail is clicked.
    are there any suggestions as to how this can be done......(please bare in mind im a newbie to actionscript)
    var locVar = new Array();
    locVar = imgLoc.split(",");
    var tmbVar = new Array();
    tmbVar = tmbLoc.split(",");
    var capVar = new Array();
    capVar = imgCap.split(",");
    var NPICS:Number = locVar.length;     // number of pictures to load
    var PICX:Number = 32.8;               // x loc of big picture
    var PICY:Number = 24.9;               // y loc
    var THUMBHOLDERX:Number = 50;        // x location of thumbnail holder movieclip
    var THUMBHOLDERY:Number = 457;      // y location
    var THUMBW:Number = 100;             // width of each thumbnail
    var THUMBH:Number = 75;             // height
    var MARGIN:Number = 10;             // margin between thumbnails
    var TOTALBYTES:Number = 212000;     // approx sum of bytes in all jpgs (x 2)
    var MAXPIXELS:Number = 12;                    // max number of pixels to move slider per frame
    var CAPSW:Number = 525;                    
    var CAPSH:Number = 28;     
    var CAPSX:Number = 38;            //caption text x position
    var CAPSY:Number = 391;            //caption text y position
    // mask definition; mask is assumed to cover some part of the thumbnail slider (here the numbers
    // were chosen so that there are margins between the mask and the right and left edges of the movie
    // (which is 420 x 290), and enough space above and below the thumbs to show them when they 'grow'
    // on mouseover
    var MASKX:Number = 0;                    // start x location of mask
    var MASKW:Number = 600;                    // mask width
    var MASKY:Number = 447.9;                    // start y location of mask
    var MASKH:Number = 92;                    // mask height
    var totalloaded:Number = 0;         // running tally of bytes loaded from all pics
    // index into pictures array, used for loading
    var ipic:Number;
    // set up loader, an instance of MovieClipLoader
    var loader:MovieClipLoader = new MovieClipLoader();
    // use the main timeline to listen to and respond to loader's broadcast events
    loader.addListener(this);
    // function to move thumbnail slider ("this" = thumbs_mc)
    function sliderControl() {
       var w:Number = this._width/2;
       var hw:Number = mask_mc._width/2;
       var npixels:Number;
       // only do when mouse over slider mask
       if (_ymouse > mask_mc._y && _ymouse < mask_mc._y + mask_mc._height) {
          // mouse over left half of slider:
          if (_xmouse > mask_mc._x && _xmouse < mask_mc._x + hw) {
             npixels = (hw - _xmouse) / hw * MAXPIXELS;
             this._x += npixels;
             if (this._x >= 0) this._x = this._x - w;
          // mouse over right half of slider:
          } else if (_xmouse > mask_mc._x + hw && _xmouse < mask_mc._x + mask_mc._width) {
             npixels = (_xmouse - hw) / hw * MAXPIXELS;
             this._x -= npixels;
             if (this._x <= -w) this._x = this._x + w;
    // thumbnail click (onrelease) handler
    function openPic() {
            pic_mc.loadMovie(locVar[this.i]);
    function brightON(){
         this._alpha = 300;
    function brightOFF(){
         this._alpha = 30;
    function captionTXT(){
         cap_txt.text = capVar[this.i];
    // assign event handlers (called when all jpgs are loaded)
    function setupHandlers() {
       pct_txt.removeTextField();          // don't need loading indicator any more
       thumbs_mc.onEnterFrame = sliderControl;
       for (var i:Number = 0; i < NPICS*2; i++) {
          thumbs_mc["mc"+i].onRollOver = brightON;
          thumbs_mc["mc"+i].onRollOut = brightOFF;
          thumbs_mc["mc"+i].onMouseDown = captionTXT;
          thumbs_mc["mc"+i].onRelease = openPic;
    // listener function for broadcast 'done' message (for each pic)
    // onLoadInit gets executed when the movieclip has been loaded into _mc AND
    //   its width and height data are available.
    //   (_mc = the movieclip being loaded into)
    // this routine sets the size and position of each thumbnail clip as its jpg
    //   is loaded and starts the next one loading.  When all have been loaded,
    //   a random picture is loaded into pic_mc and setupHandlers is called to
    //   assign handlers to each thumbnail movieclip
    function onLoadInit(_mc:MovieClip) {
       // this gets done when the jpg is completely loaded:
       _mc._width = THUMBW;
       _mc._height = THUMBH;
       _mc._alpha = 30;          // for image clarity
       // give the movieclip a property to remind it who it is
       // (used by openPic to know which big picture to open)
       _mc.i = (ipic >= NPICS ? ipic-NPICS : ipic);
       // add picture size to totalloaded variable
       totalloaded += loader.getProgress(_mc).bytesTotal;
       // now load the next one (if there are more) or set up handlers if done
       ipic++;
       if (ipic == NPICS * 2) {
          // start with a random photo displayed when all thumbs loaded
           var calc:Number = Math.floor(Math.random()*NPICS);
          pic_mc.loadMovie(locVar[0]);
           cap_txt.text = capVar[0];
          setupHandlers();
       } else if (ipic >= NPICS) {
          // load jpg into duplicate thumbnail (will already be cached)
          loader.loadClip(tmbVar[ipic-NPICS],  thumbs_mc["mc"+ipic]);
       } else {
          // load jpg into thumbnail
          loader.loadClip(tmbVar[ipic],  thumbs_mc["mc"+ipic]);
    // listener function to handle broadcast progress messages
    // make pct_txt show cumulative loading progress
    function onLoadProgress(_mc:MovieClip, loaded:Number) {
       var loadedsofar:Number = totalloaded + loaded;     
       pct_txt.text = Math.floor(loadedsofar / TOTALBYTES * 100) + "%";
    function init() {
       // create holder for pictures
       createEmptyMovieClip("pic_mc", 1);
       pic_mc._x = PICX;
       pic_mc._y = PICY;
       // create (and draw) holder for thumbnails
       createEmptyMovieClip("thumbs_mc", 2);
       thumbs_mc.beginFill(0, 100);     // black
       thumbs_mc.moveTo(0, 0);
       thumbs_mc.lineTo(2 * (MARGIN + THUMBW) * NPICS, 0);
       thumbs_mc.lineTo(2 * (MARGIN + THUMBW) * NPICS, THUMBH);
       thumbs_mc.lineTo(0, THUMBH);
       thumbs_mc.endFill();
       // drawing the thumb holder at 0, 0 and then moving it makes its reg point = upper left
       thumbs_mc._x = THUMBHOLDERX;
       thumbs_mc._y = THUMBHOLDERY;
       // create, draw and enable mask over thumbs (could use different variables to define mask
       // if desired)
       createEmptyMovieClip("mask_mc", 3);
       mask_mc.beginFill(0x0000cc, 100);
       mask_mc.moveTo(0, 0);
       mask_mc.lineTo(MASKW, 0);
       mask_mc.lineTo(MASKW, MASKH);
       mask_mc.lineTo(0, MASKH);
       mask_mc.endFill();
       mask_mc._x = MASKX;
       mask_mc._y = MASKY;
       thumbs_mc.setMask(mask_mc);
       // create loading textfield indicator
       createTextField("pct_txt", 4, 200, 100, 40, 100);
       var tf:TextFormat = new TextFormat();
       tf.align = "center";
       tf.size = 12;
       tf.font = "Verdana";
       tf.color = 0xFFFF00;
       pct_txt.setNewTextFormat(tf);
       createEmptyMovieClip("caps_mc", 5);
       caps_mc.beginFill(0x000000, 50);
       caps_mc.moveTo(0, 0);
       caps_mc.lineTo(CAPSW, 0);
       caps_mc.lineTo(CAPSW, CAPSH);
       caps_mc.lineTo(0, CAPSH);
       caps_mc.endFill();
       caps_mc._x = CAPSX;
       caps_mc._y = CAPSY;
       // create loading textfield indicator
       createTextField("cap_txt", 6, 38, 380, 525, 25);
       var cf:TextFormat = new TextFormat();
       cf.align = "center";
       cf.size = 16;
       cf.font = "Arial Black";
       cf.color = 0xFFFFFF;
       cap_txt.setNewTextFormat(cf);
       cap_txt._x = CAPSX;
       cap_txt._y = CAPSY;
       // make empty movieclips in thumbs_mc for each pic to go into
       // make double the number so the slider can move continuously and show content
       for (var i:Number = 0; i < NPICS * 2; i++) {
          var mc:MovieClip = thumbs_mc.createEmptyMovieClip("mc"+i, i+1);
          mc._x = i*(MARGIN + THUMBW);
          mc._y = 0;
       // set the pointer to the first jpg in the array locVar
       ipic = 0;
       // start loading jpgs (ipic is initialized to 0)
       loader.loadClip(locVar[ipic], thumbs_mc["mc"+ipic]);
       cap_txt.text = capVar[2];
    init();
    stop();

  • Query with dynamic variables and customised caption

    How to change the Field label when the query asking dynamic values during the execution?
    for example:  in where condition i want to give a country name during the query execution, but in the small window it will display as 'Name' which is a country name.  i want to display it as 'Country Name' which should be more readable for the end user. How can we achieve this?
    Thanks
    SV Reddy

    Hi,
    Unfortunately, it is not possible to change the system field description.
    Refer to this thread
    Re: Parameter Display Name Reg.
    Regards,
    Vijay Kumar
    SAP Business One Forums Team

  • What is the best way to create a dynamic photo and caption viewer?

    Hello
    I am fairly new to working with Dreamweaver and Flash. I am
    trying to create some pages where the user can click on one of many
    thumbnail images on a page and then see a larger image and some
    corresponding text on the same page in a viewer.
    Is it possible to do this in Dreamweaver cs3 by;
    creating an xml data sheet for an album
    then making a placeholder for image and text viewing on the
    web page (which the Dreamweaver cs3 tutorials suggest)
    finally, make a 'spry menu table' to place my thumbnail
    images.
    I want to create something rather than download pre-made
    flash viewers and try to customise them.
    Thanks

    Have you seen this?
    http://www.adobe.com/devnet/dreamweaver/articles/spry_photo_album.html

  • Dynamic image is not being displayed in Adobe Reader 8.1

    Hi,
    In interactive form, we have followed below required steps to show a dynamic image.
    For the left image, drag and drop an Image Field element from the standard Library tab to the Body Pages pane. Select this image field and edit the following properties:
    • Click on the Layout tab and choose None for the Caption position.
    • Click on the Object, then the Binding tab and choose None for Default Binding.
    • Click on the Field tab, enter $record.SapOnlineShopUrl for the URL entry, and select Use Image Size for the Sizing field.
    • Click on the script editor and enter the following FormCalc script statement, which enables the dynamic integration of the image. Show: initialize Script: this.value.image.href = xfa.resolveNode(this.value.image.href).value;
    Language: FormCalc Run At: Client
    Image is displayed properly in Adobe reader 7.1 but it's not being displayed in Adobe reader 8.1.
    I was going through some forums and understand that Adobe 8.1 blocks href URL. If this is indeed true, what's the alternative way to show a dynamic image?
    Regards
    Chandra
    Edited by: Chandrashekhar Singh on Apr 24, 2008 7:28 AM

    Soory, I thought its static image....
    Regards,
    Vaibhav Tiwari.
    Edited by: Vaibhav Tiwari on Apr 24, 2008 11:45 AM

Maybe you are looking for

  • Netweaver Java Edition SP16 installation hangs on MS Windows Server 2003

    Hi! - Downloaded the 4 files of netweaver java edition sp16 - Extracted them in one folder on HDD - Executed installer (sapinst.exe) from local SAP web site beginning with start.html - Chose weak crypto level, local installation, no mirror log volume

  • Variable Problem.........

    Hi... I have added four variables in the query. But when I execute the query , I dont see one variable out of 4. Only 3 variables I get in the selection screen And for the fourth variable it takes some default value while executing the query. I see a

  • MM:Price Change did not Carry forward from previous to current period

    Hi Gurus, Client has Reported that the Weighted Average Cost (WAC) was automatically  reset to Zero in a particular Period and didn't carry over from the previous period , The initial analysis was done and it was found that there is a configuration f

  • Customer consignment invoice

    Hello, is it possible to trigger a SD invoice when doing a goods issue from plant stock to customer consignment stock. In our actual case the invoice is triggered when consuming the consignment stock. Thanks a lot

  • Unable to backup to external hard disk drive (HDD)

    I am a new Mac user. I have been using a Samsung 200GB HDD as an external backup for my old PC and there have been no problems between the HDD and the PC which runs on Windows XP. However, when I connect my Mac to the HDD, the Mac has Read Only right