Creating childnodes vars

Hello all
I have been passed a project that integrates XML with flash
and as I only have a limited knowledge of using XML I wondered if
anyone could offer some help on this question.
if you go to
this link it shows how
the file works and looks now which should help in my explanation.
At the top of the map there are next and previous buttons which
take you to different "divisions/ladders". These divisions are set
as the first childNode and within these are the different bits of
information that is shown at the bottom of the map (map name, clan
name, next match etc).
Now, the countries are set up as buttons so the information
is shown as you roll over each of them and this is where the
problem arises. If a new division is added then I will have to go
through each country (40+ and counting) and then change each
mention of the "division" childNode 10 times within each button. I
wondered if it was possible to set up this first childNode as a
variable that would only need to be changed once for the whole of a
new division rather than 400+ times.
An example is the following:
on (rollover) {
country=sd.childNodes[0].childNodes[8].childNodes[0].firstChild;
clan=sd.childNodes[0].childNodes[8].childNodes[2].firstChild;
field3=sd.childNodes[0].childNodes[8].childNodes[3].firstChild;
field4=sd.childNodes[0].childNodes[8].childNodes[4].firstChild;
field5=sd.childNodes[0].childNodes[8].childNodes[5].firstChild;
field7=sd.childNodes[0].childNodes[8].childNodes[7].firstChild;
field8=sd.childNodes[0].childNodes[8].childNodes[8].firstChild;
field9=sd.childNodes[0].childNodes[8].childNodes[9].firstChild;
field10=sd.childNodes[0].childNodes[8].childNodes[10].firstChild;
mapImage.loadMovie("
http://www.eurodomination.co.uk/cod2/images/maps/mp_leningrad_small.jpg");
As you can see this is one button's rollOver state so to
clarify is there a way to make a var that will get rid of the first
childNode as that is the only one that would change when a new
"division" is created and make a variable that says whenever the
player is at a certain frame/label/scene that it would know that it
is part of "division1" (childNodes[0]).
I hope this makes some sense but if not please let me know
and I'll try to clarify as much as possible. I just hope there may
be some solution that will save me many hours and neaten up the
coding.
Thanks in advance
James

kglad,
Thanks for looking at this issue with me.
As for additional code, there is none that makes any
reference to the variable. I check and see if it exists in an if
condition as posted above if it does not exists then it will lets
say call a method playA(). Else it will call a method
showButDontPlayA().
Nothing else makes a reference to it. So I was thinking that
because its being created inside of a method it gets cleaned up
right away once im out of the method.
Thinking of creating an array var at the top and then the
method call can just add to the array since im keeping track of
frames that are viewed. I dont think a var created at the top level
can be cleaned out since it was not dynamically created.
Do you know of any links to information on variable
persistence that you know of that are direct and not dozens of
pages of blah blah blah information?
thanks again.

Similar Messages

  • The installer can't create folder "var/folders/51/tm_411z090hj6l9r0c8lr4m000gn/T/install.374wan2oR".

    the installer can't create folder "var/folders/51/tm_411z090hj6l9r0c8lr4m000gn/T/install.374wan2oR".
    during FCS installation

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, or by a peripheral device. 
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem. Note: If FileVault is enabled, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including sound output andWi-Fi on certain iMacs. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin. Test while in safe mode. Same problem? After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

  • Subvolume created at /var/lib/machines without my permission

    Hey guys,
    I've recently discovered a subvolume in my btrfs file system but I have no clue of which package could have triggered the creation of this subvolume. The subvolume /var/lib/machines was created 4 days ago, in April 20th, together with a system upgrade.
    # btrfs subvolume show /var/lib/machines
    /var/lib/machines
    Name: machines
    uuid: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Parent uuid: -
    Creation time: 2015-04-20 10:06:22
    Object ID: 433
    Generation (Gen): 47654
    Gen at creation: 46248
    Parent: 5
    Top Level: 5
    Flags: -
    Snapshot(s):
    And these were the packages I've updated that day.
    % expac --timefmt='%Y-%m-%d %T' '%l\t%n' | sort | grep 2015-04-20
    2015-04-20 01:00:03 tzdata
    2015-04-20 01:00:04 aspell-pt
    2015-04-20 01:00:04 btrfs-progs # <----- Possible culprit?
    2015-04-20 01:00:09 nettle
    2015-04-20 01:00:10 cups
    2015-04-20 01:00:10 gnutls
    2015-04-20 01:00:10 libcups
    2015-04-20 01:00:11 glib-networking
    2015-04-20 01:00:11 gnome-bluetooth
    2015-04-20 01:00:12 gnupg
    2015-04-20 01:00:13 gst-plugins-bad
    2015-04-20 01:00:13 libwbclient
    2015-04-20 01:00:13 nano
    2015-04-20 01:00:13 network-manager-applet
    2015-04-20 01:00:13 nm-connection-editor
    2015-04-20 01:00:14 nodejs
    2015-04-20 01:00:14 ntfs-3g
    2015-04-20 01:00:15 smbclient
    2015-04-20 01:00:16 samba
    2015-04-20 01:00:18 vte3
    2015-04-20 01:00:18 vte-common
    2015-04-20 01:00:20 webkit2gtk
    2015-04-20 01:41:21 xcompmgr
    2015-04-20 15:04:23 guake
    2015-04-20 15:04:26 jre8-openjdk-headless
    2015-04-20 15:04:27 jre8-openjdk
    2015-04-20 16:50:29 fbreader
    2015-04-20 16:50:29 libunibreak
    2015-04-20 17:13:23 colord-gtk
    2015-04-20 17:13:23 cups-pk-helper
    2015-04-20 17:13:23 exiv2
    2015-04-20 17:13:23 gnome-color-manager
    2015-04-20 17:13:23 libpwquality
    2015-04-20 17:13:23 shared-color-targets
    2015-04-20 17:13:24 cheese
    2015-04-20 17:13:24 clutter-gst2
    2015-04-20 17:13:24 clutter-gtk
    2015-04-20 17:13:24 gnome-control-center
    2015-04-20 17:13:24 gnome-video-effects
    2015-04-20 17:13:24 grilo
    2015-04-20 17:13:24 libgnomekbd
    2015-04-20 17:13:24 libibus
    2015-04-20 17:13:24 liboauth
    2015-04-20 17:13:24 libquvi
    2015-04-20 17:13:24 libquvi-scripts
    2015-04-20 17:13:24 lua-bitop
    2015-04-20 17:13:24 lua-expat
    2015-04-20 17:13:24 lua-socket
    2015-04-20 17:13:24 totem-plparser
    2015-04-20 17:13:43 python-gobject
    2015-04-20 17:40:40 gstreamer0.10
    2015-04-20 17:40:40 gstreamer0.10-base
    2015-04-20 17:40:55 gstreamer0.10-good
    2015-04-20 17:41:00 gstreamer0.10-ugly
    2015-04-20 17:41:05 gstreamer0.10-ffmpeg
    2015-04-20 18:05:37 codecs64
    2015-04-20 18:05:50 libftdi-compat
    2015-04-20 18:05:50 libirman
    2015-04-20 18:05:50 libusb-compat
    2015-04-20 18:05:50 libxxf86dga
    2015-04-20 18:05:50 lirc
    2015-04-20 18:05:50 xf86dgaproto
    And funny thing is that no package owns that folder/subvolume.
    % pacman -Qo /var/lib/machines
    error: No package owns /var/lib/machines
    The only reference I could find was the man page of machinectl.
    Can I safely delete this subvolume?
    EDIT : typo
    Last edited by cafe (2015-04-24 14:02:22)

    Check this out: http://cgit.freedesktop.org/systemd/sys … d0083b2251

  • Error creating and setting attributes on Childnode

    I'm trying to get my head around on how to dynamically create childnodes and attributes. I'm trying to create this structure.
    Target Structure
    <root node>
         + Parents (c=1..1, s=true)
         -- mother
         -- father
         -- + Children (c=0..n, s=false)
         ----- name
         ----- age
    I've written the sample code below.
    I get a  com.sap.tc.webdynpro.progmodel.context.ContextException: NodeElement(.TestView.Parents): unknown attribute name
    when I try and execute   child1.setAttributeValue("name", "Madison");
    I suspect my problem is here
    IWDNode childElement = wdContext.getChildNode("Parents.Children",IWDNode.LEAD_SELECTION);
    because it returns null.
    What am I doing wrong
    Thanks for your help.
    /Greg
         // Dynamically create a context node
         IWDNodeInfo parents = wdContext.getNodeInfo().addChild(
                   "Parents",              // Name of node
                   null,                    // elementClass
                   true,                    // singleton
                   true,                  // mandatory                           
                   false,                 // multiple
                   true,                  // mandatorySelection
                   false,                 // multipleSelection
                   true,                  // initializeLeadSelection
                   null,
                   null,
                   null);
         parents.addAttribute("mother", "ddic:com.sap.dictionary.string");
         parents.addAttribute("father", "ddic:com.sap.dictionary.string");
        IWDNodeInfo children = wdContext.getChildNode("Parents",0).getNodeInfo().addChild(
                  "Children",            // Name of node
                   null,                    // elementClass
                   false,                    // singleton
                   true,                  // mandatory                           
                   true,                  // multiple
                   true,                  // mandatorySelection
                   false,                 // multipleSelection
                   true,                  // initializeLeadSelection
                   null,
                   null,
                   null);
         children.addAttribute("name", "ddic:com.sap.dictionary.string");
         children.addAttribute("age", "ddic:com.sap.dictionary.string");
            IWDNode parentElement = wdContext.getChildNode("Parents",0);        
        IWDNodeElement p = parentElement.createElement();
         p.setAttributeValue("mother", "Amy");
         p.setAttributeValue("father", "Greg");
        IWDNode childElement = wdContext.getChildNode("Parents.Children",IWDNode.LEAD_SELECTION);
         IWDNodeElement child1 = parentElement.createElement();
        child1.setAttributeValue("name", "Madison");
         child1.setAttributeValue("age", "2");
         IWDNodeElement child2 = parentElement.createElement();
         child2.setAttributeValue("name", "Peyton");
         child2.setAttributeValue("age", "1");
    Message was edited by:
            Greg Preston

    Hi Greg,
    it must be
    IWDNode parentNode = wdContext.getChildNode("Parents",0);
    IWDNodeElement p = parentNode.createElement();
    p.setAttributeValue("mother", "Amy");
    p.setAttributeValue("father", "Greg");
    parentNode.addElement(p);
    IWDNode childNode = parentNode.getChildNode("Children", IWDNode.LEAD_SELECTION);
    IWDNodeElement child1 = childNode.createElement();
    child1.setAttributeValue("name", "Madison");
    child1.setAttributeValue("age", "2");
    childNode.addElement(child1);
    IWDNodeElement child2 = childNode.createElement();
    child2.setAttributeValue("name", "Peyton");
    child2.setAttributeValue("age", "1");
    childNode.addElement(child2);

  • Why is my flash content not working on my dreamweaver created html site?

    This is a problem that's happening on my website I'm creating.  I created a quick test website to show you the problem on the fourm.  It's the same problem, and if you can provide the solution to this test website I can apply it to my main website.
    Test website on server:
    test331754952.net23.net
    What I did:
    -launched flash
    -typed "test" and made it spin 360 degrees
    -published swf
    -launched dreamweaver
    -created a site
    -moved swf to site folder
    -saved a html file to the site folder
    -in dreamweaver, went to insert, media, swf, then selected the swf I made
    -it inserted the swf, creating a gray placeholder for it
    -re-saved the html document, at which point dreamweaver created a folder named script and 2 files, an swf, and a javascript file
    Site Directory:
    Scripts Sub-Directory:
    What happens:
    -when I launch the swf on my machine, it plays fine
    -when I open the swf directly on the test website on the server, it plays fine
    -when I open the html with the embended swf on the test website on the server, it shows a gray box, then goes white
    -In dreamweaver, when I go to preview in browser and choose internet explorer, it tells me I don't have new flashplayer(I do: flashplayer 11) 
    Ie also pokes up a box at the bottom that says its not allowing content.  When I click allow content, it creates a gray box
    -In dreamweaver, when I go to preview in borwser and choose google chrome, it tells me flash player has stopped a potentionally unsafe operation.  When I close this dialog box, it gives me a gray box where my swf should be embeded.
    -I've tried changing global flash secuirty setting and it does nothing
    -I've tried visiting the test website on multiple computers in my household to no avail
    -I've tried having friends visit the site on their computer at their house to no avail
    -I did't touch the code on this test website-the code is exactly what dreamweaver generated
    Html Document Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
    </head>
    <body>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="550" height="400" id="FlashID" title="test">
      <param name="movie" value="test.swf" />
      <param name="quality" value="high" />
      <param name="wmode" value="opaque" />
      <param name="swfversion" value="15.0.0.0" />
      <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
      <param name="expressinstall" value="Scripts/expressInstall.swf" />
      <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="test.swf" width="550" height="400">
        <!--<![endif]-->
        <param name="quality" value="high" />
        <param name="wmode" value="opaque" />
        <param name="swfversion" value="15.0.0.0" />
        <param name="expressinstall" value="Scripts/expressInstall.swf" />
        <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
        <div>
          <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
          <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
        </div>
        <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>
    <script type="text/javascript">
    swfobject.registerObject("FlashID");
    </script>
    </body>
    </html>
    Javascript file code(the one dreamweaver made when I inserted swf):
    /*! SWFObject v2.0 <http://code.google.com/p/swfobject/>
    Copyright (c) 2007 Geoff Stearns, Michael Williams, and Bobby van der Sluis
    This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
    var swfobject = function() {
    var UNDEF = "undefined",
      OBJECT = "object",
      SHOCKWAVE_FLASH = "Shockwave Flash",
      SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
      FLASH_MIME_TYPE = "application/x-shockwave-flash",
      EXPRESS_INSTALL_ID = "SWFObjectExprInst",
      win = window,
      doc = document,
      nav = navigator,
      domLoadFnArr = [],
      regObjArr = [],
      timer = null,
      storedAltContent = null,
      storedAltContentId = null,
      isDomLoaded = false,
      isExpressInstallActive = false;
    /* Centralized function for browser feature detection
      - Proprietary feature detection (conditional compiling) is used to detect Internet Explorer's features
      - User agent string detection is only used when no alternative is possible
      - Is executed directly for optimal performance
    var ua = function() {
      var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF && typeof doc.appendChild != UNDEF && typeof doc.replaceChild != UNDEF && typeof doc.removeChild != UNDEF && typeof doc.cloneNode != UNDEF,
       playerVersion = [0,0,0],
       d = null;
      if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
       d = nav.plugins[SHOCKWAVE_FLASH].description;
       if (d) {
        d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
        playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
        playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
        playerVersion[2] = /r/.test(d) ? parseInt(d.replace(/^.*r(.*)$/, "$1"), 10) : 0;
      else if (typeof win.ActiveXObject != UNDEF) {
       var a = null, fp6Crash = false;
       try {
        a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".7");
       catch(e) {
        try {
         a = new ActiveXObject(SHOCKWAVE_FLASH_AX + ".6");
         playerVersion = [6,0,21];
         a.AllowScriptAccess = "always";  // Introduced in fp6.0.47
        catch(e) {
         if (playerVersion[0] == 6) {
          fp6Crash = true;
        if (!fp6Crash) {
         try {
          a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
         catch(e) {}
       if (!fp6Crash && a) { // a will return null when ActiveX is disabled
        try {
         d = a.GetVariable("$version");  // Will crash fp6.0.21/23/29
         if (d) {
          d = d.split(" ")[1].split(",");
          playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
        catch(e) {}
      var u = nav.userAgent.toLowerCase(),
       p = nav.platform.toLowerCase(),
       webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
       ie = false,
       windows = p ? /win/.test(p) : /win/.test(u),
       mac = p ? /mac/.test(p) : /mac/.test(u);
      /*@cc_on
       ie = true;
       @if (@_win32)
        windows = true;
       @elif (@_mac)
        mac = true;
       @end
      return { w3cdom:w3cdom, pv:playerVersion, webkit:webkit, ie:ie, win:windows, mac:mac };
    /* Cross-browser onDomLoad
      - Based on Dean Edwards' solution: http://dean.edwards.name/weblog/2006/06/again/
      - Will fire an event as soon as the DOM of a page is loaded (supported by Gecko based browsers - like Firefox -, IE, Opera9+, Safari)
    var onDomLoad = function() {
      if (!ua.w3cdom) {
       return;
      addDomLoadEvent(main);
      if (ua.ie && ua.win) {
       try {  // Avoid a possible Operation Aborted error
        doc.write("<scr" + "ipt id=__ie_ondomload defer=true src=//:></scr" + "ipt>"); // String is split into pieces to avoid Norton AV to add code that can cause errors
        var s = getElementById("__ie_ondomload");
        if (s) {
         s.onreadystatechange = function() {
          if (this.readyState == "complete") {
           this.parentNode.removeChild(this);
           callDomLoadFunctions();
       catch(e) {}
      if (ua.webkit && typeof doc.readyState != UNDEF) {
       timer = setInterval(function() { if (/loaded|complete/.test(doc.readyState)) { callDomLoadFunctions(); }}, 10);
      if (typeof doc.addEventListener != UNDEF) {
       doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, null);
      addLoadEvent(callDomLoadFunctions);
    function callDomLoadFunctions() {
      if (isDomLoaded) {
       return;
      if (ua.ie && ua.win) { // Test if we can really add elements to the DOM; we don't want to fire it too early
       var s = createElement("span");
       try { // Avoid a possible Operation Aborted error
        var t = doc.getElementsByTagName("body")[0].appendChild(s);
        t.parentNode.removeChild(t);
       catch (e) {
        return;
      isDomLoaded = true;
      if (timer) {
       clearInterval(timer);
       timer = null;
      var dl = domLoadFnArr.length;
      for (var i = 0; i < dl; i++) {
       domLoadFnArr[i]();
    function addDomLoadEvent(fn) {
      if (isDomLoaded) {
       fn();
      else {
       domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
    /* Cross-browser onload
      - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
      - Will fire an event as soon as a web page including all of its assets are loaded
    function addLoadEvent(fn) {
      if (typeof win.addEventListener != UNDEF) {
       win.addEventListener("load", fn, false);
      else if (typeof doc.addEventListener != UNDEF) {
       doc.addEventListener("load", fn, false);
      else if (typeof win.attachEvent != UNDEF) {
       win.attachEvent("onload", fn);
      else if (typeof win.onload == "function") {
       var fnOld = win.onload;
       win.onload = function() {
        fnOld();
        fn();
      else {
       win.onload = fn;
    /* Main function
      - Will preferably execute onDomLoad, otherwise onload (as a fallback)
    function main() { // Static publishing only
      var rl = regObjArr.length;
      for (var i = 0; i < rl; i++) { // For each registered object element
       var id = regObjArr[i].id;
       if (ua.pv[0] > 0) {
        var obj = getElementById(id);
        if (obj) {
         regObjArr[i].width = obj.getAttribute("width") ? obj.getAttribute("width") : "0";
         regObjArr[i].height = obj.getAttribute("height") ? obj.getAttribute("height") : "0";
         if (hasPlayerVersion(regObjArr[i].swfVersion)) { // Flash plug-in version >= Flash content version: Houston, we have a match!
          if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the object element's nested param elements
           fixParams(obj);
          setVisibility(id, true);
         else if (regObjArr[i].expressInstall && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) { // Show the Adobe Express Install dialog if set by the web page author and if supported (fp6.0.65+ on Win/Mac OS only)
          showExpressInstall(regObjArr[i]);
         else { // Flash plug-in and Flash content version mismatch: display alternative content instead of Flash content
          displayAltContent(obj);
       else {  // If no fp is installed, we let the object element do its job (show alternative content)
        setVisibility(id, true);
    /* Fix nested param elements, which are ignored by older webkit engines
      - This includes Safari up to and including version 1.2.2 on Mac OS 10.3
      - Fall back to the proprietary embed element
    function fixParams(obj) {
      var nestedObj = obj.getElementsByTagName(OBJECT)[0];
      if (nestedObj) {
       var e = createElement("embed"), a = nestedObj.attributes;
       if (a) {
        var al = a.length;
        for (var i = 0; i < al; i++) {
         if (a[i].nodeName.toLowerCase() == "data") {
          e.setAttribute("src", a[i].nodeValue);
         else {
          e.setAttribute(a[i].nodeName, a[i].nodeValue);
       var c = nestedObj.childNodes;
       if (c) {
        var cl = c.length;
        for (var j = 0; j < cl; j++) {
         if (c[j].nodeType == 1 && c[j].nodeName.toLowerCase() == "param") {
          e.setAttribute(c[j].getAttribute("name"), c[j].getAttribute("value"));
       obj.parentNode.replaceChild(e, obj);
    /* Fix hanging audio/video threads and force open sockets and NetConnections to disconnect
      - Occurs when unloading a web page in IE using fp8+ and innerHTML/outerHTML
      - Dynamic publishing only
    function fixObjectLeaks(id) {
      if (ua.ie && ua.win && hasPlayerVersion("8.0.0")) {
       win.attachEvent("onunload", function () {
        var obj = getElementById(id);
        if (obj) {
         for (var i in obj) {
          if (typeof obj[i] == "function") {
           obj[i] = function() {};
         obj.parentNode.removeChild(obj);
    /* Show the Adobe Express Install dialog
      - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
    function showExpressInstall(regObj) {
      isExpressInstallActive = true;
      var obj = getElementById(regObj.id);
      if (obj) {
       if (regObj.altContentId) {
        var ac = getElementById(regObj.altContentId);
        if (ac) {
         storedAltContent = ac;
         storedAltContentId = regObj.altContentId;
       else {
        storedAltContent = abstractAltContent(obj);
       if (!(/%$/.test(regObj.width)) && parseInt(regObj.width, 10) < 310) {
        regObj.width = "310";
       if (!(/%$/.test(regObj.height)) && parseInt(regObj.height, 10) < 137) {
        regObj.height = "137";
       doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
       var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
        dt = doc.title,
        fv = "MMredirectURL=" + win.location + "&MMplayerType=" + pt + "&MMdoctitle=" + dt,
        replaceId = regObj.id;
       // For IE when a SWF is loading (AND: not available in cache) wait for the onload event to fire to remove the original object element
       // In IE you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
       if (ua.ie && ua.win && obj.readyState != 4) {
        var newObj = createElement("div");
        replaceId += "SWFObjectNew";
        newObj.setAttribute("id", replaceId);
        obj.parentNode.insertBefore(newObj, obj); // Insert placeholder div that will be replaced by the object element that loads expressinstall.swf
        obj.style.display = "none";
        win.attachEvent("onload", function() { obj.parentNode.removeChild(obj); });
       createSWF({ data:regObj.expressInstall, id:EXPRESS_INSTALL_ID, width:regObj.width, height:regObj.height }, { flashvars:fv }, replaceId);
    /* Functions to abstract and display alternative content
    function displayAltContent(obj) {
      if (ua.ie && ua.win && obj.readyState != 4) {
       // For IE when a SWF is loading (AND: not available in cache) wait for the onload event to fire to remove the original object element
       // In IE you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
       var el = createElement("div");
       obj.parentNode.insertBefore(el, obj); // Insert placeholder div that will be replaced by the alternative content
       el.parentNode.replaceChild(abstractAltContent(obj), el);
       obj.style.display = "none";
       win.attachEvent("onload", function() { obj.parentNode.removeChild(obj); });
      else {
       obj.parentNode.replaceChild(abstractAltContent(obj), obj);
    function abstractAltContent(obj) {
      var ac = createElement("div");
      if (ua.win && ua.ie) {
       ac.innerHTML = obj.innerHTML;
      else {
       var nestedObj = obj.getElementsByTagName(OBJECT)[0];
       if (nestedObj) {
        var c = nestedObj.childNodes;
        if (c) {
         var cl = c.length;
         for (var i = 0; i < cl; i++) {
          if (!(c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "param") && !(c[i].nodeType == 8)) {
           ac.appendChild(c[i].cloneNode(true));
      return ac;
    /* Cross-browser dynamic SWF creation
    function createSWF(attObj, parObj, id) {
      var r, el = getElementById(id);
      if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
       attObj.id = id;
      if (ua.ie && ua.win) { // IE, the object element and W3C DOM methods do not combine: fall back to outerHTML
       var att = "";
       for (var i in attObj) {
        if (attObj[i] != Object.prototype[i]) { // Filter out prototype additions from other potential libraries, like Object.prototype.toJSONString = function() {}
         if (i == "data") {
          parObj.movie = attObj[i];
         else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
          att += ' class=" + attObj[i] + "';
         else if (i != "classid") {
          att += ' ' + i + '="' + attObj[i] + '"';
       var par = "";
       for (var j in parObj) {
        if (parObj[j] != Object.prototype[j]) { // Filter out prototype additions from other potential libraries
         par += '<param name="' + j + '" value="' + parObj[j] + '" />';
       el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
       fixObjectLeaks(attObj.id); // This bug affects dynamic publishing only
       r = getElementById(attObj.id);
      else if (ua.webkit && ua.webkit < 312) { // Older webkit engines ignore the object element's nested param elements: fall back to the proprietary embed element
       var e = createElement("embed");
       e.setAttribute("type", FLASH_MIME_TYPE);
       for (var k in attObj) {
        if (attObj[k] != Object.prototype[k]) { // Filter out prototype additions from other potential libraries
         if (k == "data") {
          e.setAttribute("src", attObj[k]);
         else if (k.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
          e.setAttribute("class", attObj[k]);
         else if (k != "classid") { // Filter out IE specific attribute
          e.setAttribute(k, attObj[k]);
       for (var l in parObj) {
        if (parObj[l] != Object.prototype[l]) { // Filter out prototype additions from other potential libraries
         if (l != "movie") { // Filter out IE specific param element
          e.setAttribute(l, parObj[l]);
       el.parentNode.replaceChild(e, el);
       r = e;
      else { // Well-behaving browsers
       var o = createElement(OBJECT);
       o.setAttribute("type", FLASH_MIME_TYPE);
       for (var m in attObj) {
        if (attObj[m] != Object.prototype[m]) { // Filter out prototype additions from other potential libraries
         if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
          o.setAttribute("class", attObj[m]);
         else if (m != "classid") { // Filter out IE specific attribute
          o.setAttribute(m, attObj[m]);
       for (var n in parObj) {
        if (parObj[n] != Object.prototype[n] && n != "movie") { // Filter out prototype additions from other potential libraries and IE specific param element
         createObjParam(o, n, parObj[n]);
       el.parentNode.replaceChild(o, el);
       r = o;
      return r;
    function createObjParam(el, pName, pValue) {
      var p = createElement("param");
      p.setAttribute("name", pName);
      p.setAttribute("value", pValue);
      el.appendChild(p);
    function getElementById(id) {
      return doc.getElementById(id);
    function createElement(el) {
      return doc.createElement(el);
    function hasPlayerVersion(rv) {
      var pv = ua.pv, v = rv.split(".");
      v[0] = parseInt(v[0], 10);
      v[1] = parseInt(v[1], 10);
      v[2] = parseInt(v[2], 10);
      return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
    /* Cross-browser dynamic CSS creation
      - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
    function createCSS(sel, decl) {
      if (ua.ie && ua.mac) {
       return;
      var h = doc.getElementsByTagName("head")[0], s = createElement("style");
      s.setAttribute("type", "text/css");
      s.setAttribute("media", "screen");
      if (!(ua.ie && ua.win) && typeof doc.createTextNode != UNDEF) {
       s.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
      h.appendChild(s);
      if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
       var ls = doc.styleSheets[doc.styleSheets.length - 1];
       if (typeof ls.addRule == OBJECT) {
        ls.addRule(sel, decl);
    function setVisibility(id, isVisible) {
      var v = isVisible ? "inherit" : "hidden";
      if (isDomLoaded) {
       getElementById(id).style.visibility = v;
      else {
       createCSS("#" + id, "visibility:" + v);
    function getTargetVersion(obj) {
         if (!obj)
             return 0;
      var c = obj.childNodes;
      var cl = c.length;
      for (var i = 0; i < cl; i++) {
       if (c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "object") {
           c = c[i].childNodes;
           cl = c.length;
           i = 0;
       if (c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "param" && c[i].getAttribute("name") == "swfversion") {
          return c[i].getAttribute("value");
      return 0;
    function getExpressInstall(obj) {
         if (!obj)
             return "";
      var c = obj.childNodes;
      var cl = c.length;
      for (var i = 0; i < cl; i++) {
       if (c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "object") {
           c = c[i].childNodes;
           cl = c.length;
           i = 0;
       if (c[i].nodeType == 1 && c[i].nodeName.toLowerCase() == "param" && c[i].getAttribute("name") == "expressinstall") {
           return c[i].getAttribute("value");
      return "";
    return {
      /* Public API
       - Reference: http://code.google.com/p/swfobject/wiki/SWFObject_2_0_documentation
      registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr) {
       if (!ua.w3cdom || !objectIdStr) {
        return;
       var obj = document.getElementById(objectIdStr);
       var xi = getExpressInstall(obj);
       var regObj = {};
       regObj.id = objectIdStr;
       regObj.swfVersion = swfVersionStr ? swfVersionStr : getTargetVersion(obj);
       regObj.expressInstall = xiSwfUrlStr ? xiSwfUrlStr : ((xi != "") ? xi : false);
       regObjArr[regObjArr.length] = regObj;
       setVisibility(objectIdStr, false);
      getObjectById: function(objectIdStr) {
       var r = null;
       if (ua.w3cdom && isDomLoaded) {
        var o = getElementById(objectIdStr);
        if (o) {
         var n = o.getElementsByTagName(OBJECT)[0];
         if (!n || (n && typeof o.SetVariable != UNDEF)) {
             r = o;
         else if (typeof n.SetVariable != UNDEF) {
          r = n;
       return r;
      embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj) {
       if (!ua.w3cdom || !swfUrlStr || !replaceElemIdStr || !widthStr || !heightStr || !swfVersionStr) {
        return;
       widthStr += ""; // Auto-convert to string to make it idiot proof
       heightStr += "";
       if (hasPlayerVersion(swfVersionStr)) {
        setVisibility(replaceElemIdStr, false);
        var att = (typeof attObj == OBJECT) ? attObj : {};
        att.data = swfUrlStr;
        att.width = widthStr;
        att.height = heightStr;
        var par = (typeof parObj == OBJECT) ? parObj : {};
        if (typeof flashvarsObj == OBJECT) {
         for (var i in flashvarsObj) {
          if (flashvarsObj[i] != Object.prototype[i]) { // Filter out prototype additions from other potential libraries
           if (typeof par.flashvars != UNDEF) {
            par.flashvars += "&" + i + "=" + flashvarsObj[i];
           else {
            par.flashvars = i + "=" + flashvarsObj[i];
        addDomLoadEvent(function() {
         createSWF(att, par, replaceElemIdStr);
         if (att.id == replaceElemIdStr) {
          setVisibility(replaceElemIdStr, true);
       else if (xiSwfUrlStr && !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac)) {
        setVisibility(replaceElemIdStr, false);
        addDomLoadEvent(function() {
         var regObj = {};
         regObj.id = regObj.altContentId = replaceElemIdStr;
         regObj.width = widthStr;
         regObj.height = heightStr;
         regObj.expressInstall = xiSwfUrlStr;
         showExpressInstall(regObj);
      getFlashPlayerVersion: function() {
       return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
      hasFlashPlayerVersion:hasPlayerVersion,
      createSWF: function(attObj, parObj, replaceElemIdStr) {
       if (ua.w3cdom && isDomLoaded) {
        return createSWF(attObj, parObj, replaceElemIdStr);
       else {
        return undefined;
      createCSS: function(sel, decl) {
       if (ua.w3cdom) {
        createCSS(sel, decl);
      addDomLoadEvent:addDomLoadEvent,
      addLoadEvent:addLoadEvent,
      getQueryParamValue: function(param) {
       var q = doc.location.search || doc.location.hash;
       if (param == null) {
        return q;
        if(q) {
        var pairs = q.substring(1).split("&");
        for (var i = 0; i < pairs.length; i++) {
         if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
          return pairs[i].substring((pairs[i].indexOf("=") + 1));
       return "";
      // For internal usage only
      expressInstallCallback: function() {
       if (isExpressInstallActive && storedAltContent) {
        var obj = getElementById(EXPRESS_INSTALL_ID);
        if (obj) {
         obj.parentNode.replaceChild(storedAltContent, obj);
         if (storedAltContentId) {
          setVisibility(storedAltContentId, true);
          if (ua.ie && ua.win) {
           storedAltContent.style.display = "block";
         storedAltContent = null;
         storedAltContentId = null;
         isExpressInstallActive = false;
    Can someone please help!  I've looked and tried prety much everything.  If you can provide a solution I would GREATLY apreciate it!

    There is no Flash player version 15... as in your code:
    <param name="swfversion" value="15.0.0.0" />
    For some reason Adobe thought it would be a good idea to target a Flash player version (15) as default.....which may be out a couple years in the future. Go figure!!!
    If you don't like player version 9, change to 10 or 11.... just not 15 (yet).
    Best wishes,
    Adninjastrator

  • How I remove previous MC created with createmovieClip() and attachMovie()

    Hello.
    i have another problem today, :-)
    my little application contain a combobox and a MC "filmstrip" in my _root. the combobox work with an xml file containing links to other xml files. Inside my MC "filmstrip" i have a script loading with a for loop the xml file selected in the combobox on the _root .
    In this loop i createEmptyMovieClip an attachMovies with the data  of the xml selected.
    evrything works exept that evrytime i change my selection in the combobox it load the data  on top of the previous load.
    I would like to delete  the previous load before load the new one... if someone can help me???
    On my scene 1st frame i have only a code for scroll the movieclip filmstrip but i think is not nescessary that i show it.
    here is the code inside the MC fimlstrip (sorry but i put all the code). i attach an example aswell
    var link1:Array = new Array();
    var url:String;
    var theUrl:String;
    var whoOn:Number;
    whoOn = 1;
    //load the  xml containing the link for T.Load() function
        var x:XML = new XML();
        x.ignoreWhite = true;
    x.onLoad = function(success) {
            var photos:Array = this.firstChild.childNodes;
            for (i=0; i<photos.length; i++) {
                link1.push(photos[i].attributes.link1);
            url = link1[whoOn];
            theUrl = url;
            _root.filmstrip.Tload(theUrl);
            _root.lengthscroll(theUrl);
        x.load("category.xml");
    //create the Listener object
    var cbListener:Object = new Object();
    //create tee change function
    cbListener.change = function(event_obj:Object) {
        if (_root.select.selectedItem.label == "Last updated") {
            whoOn = 0;
        } else if (_root.select.selectedItem.label == "Special") {
            whoOn = 1;
        trace(_root.select.selectedItem.label);
        url = link1[whoOn];
        trace("url is "+_root.filmstrip.url);
        theUrl = url;
        _root.lengthscroll(theUrl);
        Tload(theUrl);// set the url to load in the T.load()
    _root.select.addEventListener("change",cbListener);
    function Tload(theUrl) {//function that load the url selected in the combobox
        var T:XML = new XML();
        T.ignoreWhite = true;
        var thumb:Array = new Array();//create array
        var thTxt:Array = new Array();
        var DescTXT:Array = new Array();
        var priceTXT:Array = new Array();
        var linkTXT:Array = new Array();
        var Modelink = "http://www.windi.no/catalog/advanced_search_result.php?keywords=";//1st part of the link for when you click on the tumbnails
        var Spc = 0;// space between thumbnail default 0
        var posX = 0;// thumbnail position x
        var posY = 0;//thumbnail 1st position y
        var tl:MovieClip = this;
        var whoIsOn:Number;
        whoIsOn = 0;
        T.onLoad = function(xml) {
            var photos:Array = this.firstChild.childNodes;
            //loop the php Xml for the thumbnail
            for (i=0; i<photos.length; i++) {
                var Num = i+1;
                var WhoIsOn = Num;
                var TXTCLIP = "TXTCLIP"+Num;
                var TXTCLIP2 = "TXTCLIP2"+Num;
                var TXTCLIP3 = "TXTCLIP3"+Num;
                var Clp_name = "clip"+Num;
                var Bt_name = "Bt"+Num;
                var container = (container+Num);
                //put each attributs of thumbnail for each photos node
                thTxt.push(photos[i].attributes.thumbtext);
                thumb.push(photos[i].attributes.thumbnail);
                DescTXT.push(photos[i].attributes.thumbdesc);
                priceTXT.push(photos[i].attributes.thumbprice);
                linkTXT.push(photos[i].attributes.thumbmodel);
                _root.Text_Thumbnail(thTxt[whoIsOn]);
                _root.bigphotos.loadMovie(thumb[whoIsOn],1);
                var fullink = (Modelink+linkTXT[i]);//the 2nd part of the "Modelink"
                //display Tiles
                var TXT:MovieClip = tl.attachMovie("TXTCLIP", TXTCLIP, tl.getNextHighestDepth());
                TXT._x = posX+120;
                TXT._y = posY+Spc+13;
                TXT.titleTXT.text = thTxt[i];
                //desccription
                var TXT2:MovieClip = tl.attachMovie("TXTCLIP2", TXTCLIP2, tl.getNextHighestDepth());
                TXT2._x = posX+120;
                TXT2._y = posY+Spc+30;
                TXT2.titleTXT.text = DescTXT[i];
                // display prices
                var TXT3:MovieClip = tl.attachMovie("TXTCLIP3", TXTCLIP3, tl.getNextHighestDepth());
                TXT3._x = posX+120;
                TXT3._y = posY+Spc+90;
                TXT3.titleTXT.text = priceTXT[i];
                //display thumbnails
                var container:MovieClip = tl.createEmptyMovieClip(Clp_name, tl.getNextHighestDepth());
                container.loadMovie(thumb[i],1);
                container._yscale = 30;
                container._xscale = 30;
                container._x = posX;
                container._y = posY+Spc;
                //for the OnRelease function on the thumbnail
                var BT:MovieClip = tl.attachMovie("Btb", Bt_name, tl.getNextHighestDepth());
                BT._x = posX;
                BT._y = posY+Spc;
                BT.whoIsOn = i;
                BT.onRelease = function() {
                    stopAllSounds();
                    getURL((Modelink+linkTXT[this.whoIsOn]));//this is the link when you click on the thumbnail
                BT.onRollOver = function() {
                    _root.Text_Thumbnail(thTxt[this.whoIsOn]);//display the title of the thumbnail by rolling over
                    _root.whoIsOn = this.whoIsOn;
                    _root.bigphotos.loadMovie(thumb[this.whoIsOn],1);//Display the poto of the thumbnail by rolling over
                BT.onRollOut = function() {
                    _root.Text_Thumbnail("");
                Spc = Spc+160;//for the space betwen the clips           
        //load the xml file selected in the combobox
        trace("the url loaded is: "+theUrl);
        T.load(theUrl);//Load the url selected in the combobox

    created a function for remove the movieClips bu it dont wotk :
    var link1:Array = new Array();
    var url:String;
    var theUrl:String;
    var whoOn:Number;
    whoOn = 1;
    //HERE MY FUNCTION
    function reset_all() {
        _root.filmstrip.removeMovieClip();
    //<---TO HERE
    //load the  xml containing the link for T.Load() function in filmstrip movie clip the xml file
    function loadCat() {
        var x:XML = new XML();
        x.ignoreWhite = true;
        x.onLoad = function(success) {
            var photos:Array = this.firstChild.childNodes;
            for (i=0; i<photos.length; i++) {
                link1.push(photos[i].attributes.link1);
            url = link1[whoOn];
            theUrl = url;
            _root.filmstrip.Tload(theUrl);
            _root.lengthscroll(theUrl);
        x.load("category.xml");
    loadCat();
    //create the Listener object
    var cbListener:Object = new Object();
    //create tee change function
    cbListener.change = function(event_obj:Object) {
        if (_root.select.selectedItem.label == "Last updated") {
            whoOn = 0;
        } else if (_root.select.selectedItem.label == "Special") {
            whoOn = 1;
        trace(_root.select.selectedItem.label);
        url = link1[whoOn];
        trace("url is "+_root.filmstrip.url);
        theUrl = _root.filmstrip.url;
        _root.lengthscroll(theUrl);
        Tload(theUrl);// set the url to load in the T.load() function in filmstrip
    _root.select.addEventListener("change",cbListener);
    function Tload(theUrl) {//function that load the url selected in the combobox
        var T:XML = new XML();
        T.ignoreWhite = true;
        var thumb:Array = new Array();//create array
        var thTxt:Array = new Array();
        var DescTXT:Array = new Array();
        var priceTXT:Array = new Array();
        var linkTXT:Array = new Array();
        var Modelink = "http://www.windi.no/catalog/advanced_search_result.php?keywords=";//1st part of the link for when you click on the tumbnails
        var Spc = 0;// space between thumbnail default 0
        var posX = 0;// thumbnail position x
        var posY = 0;//thumbnail 1st position y
        var tl:MovieClip = this;
        var whoIsOn:Number;
        whoIsOn = 0;
        T.onLoad = function(xml) {
           reset_all(); /// HERE I APLY IT
            var photos:Array = this.firstChild.childNodes;
            //loop the php Xml for the thumbnail
            for (i=0; i<photos.length; i++) {
                var Num = i+1;
                var WhoIsOn = Num;
                var TXTCLIP = "TXTCLIP"+Num;
                var TXTCLIP2 = "TXTCLIP2"+Num;
                var TXTCLIP3 = "TXTCLIP3"+Num;
                var Clp_name = "clip"+Num;
                var Bt_name = "Bt"+Num;
                var container = (container+Num);
                //put each attributs of thumbnail for each photos node
                thTxt.push(photos[i].attributes.thumbtext);
                thumb.push(photos[i].attributes.thumbnail);
                DescTXT.push(photos[i].attributes.thumbdesc);
                priceTXT.push(photos[i].attributes.thumbprice);
                linkTXT.push(photos[i].attributes.thumbmodel);
                _root.Text_Thumbnail(thTxt[whoIsOn]);
                _root.bigphotos.loadMovie(thumb[whoIsOn],1);
                var fullink = (Modelink+linkTXT[i]);//the 2nd part of the "Modelink"
                //display Tiles
                var TXT:MovieClip = tl.attachMovie("TXTCLIP", TXTCLIP, tl.getNextHighestDepth());
                TXT._x = posX+120;
                TXT._y = posY+Spc+13;
                TXT.titleTXT.text = thTxt[i];
                //desccription
                var TXT2:MovieClip = tl.attachMovie("TXTCLIP2", TXTCLIP2, tl.getNextHighestDepth());
                TXT2._x = posX+120;
                TXT2._y = posY+Spc+30;
                TXT2.titleTXT.text = DescTXT[i];
                // display prices
                var TXT3:MovieClip = tl.attachMovie("TXTCLIP3", TXTCLIP3, tl.getNextHighestDepth());
                TXT3._x = posX+120;
                TXT3._y = posY+Spc+90;
                TXT3.titleTXT.text = priceTXT[i];
                //display thumbnails
                var container:MovieClip = tl.createEmptyMovieClip(Clp_name, tl.getNextHighestDepth());
                container.loadMovie(thumb[i],1);
                container._yscale = 30;
                container._xscale = 30;
                container._x = posX;
                container._y = posY+Spc;
                //for the OnRelease function on the thumbnail
                var BT:MovieClip = tl.attachMovie("Btb", Bt_name, tl.getNextHighestDepth());
                BT._x = posX;
                BT._y = posY+Spc;
                BT.whoIsOn = i;
                BT.onRelease = function() {
                    stopAllSounds();
                    getURL((Modelink+linkTXT[this.whoIsOn]));//this is the link when you click on the thumbnail
                BT.onRollOver = function() {
                    _root.Text_Thumbnail(thTxt[this.whoIsOn]);//display the title of the thumbnail by rolling over
                    _root.whoIsOn = this.whoIsOn;
                    _root.bigphotos.loadMovie(thumb[this.whoIsOn],1);//Display the poto of the thumbnail by rolling over
                BT.onRollOut = function() {
                    _root.Text_Thumbnail("");
                Spc = Spc+160;//for the space betwen the clips           
        //load the xml file selected in the combobox
        trace("the url loaded is: "+theUrl);
        T.load(theUrl);//Load the url selected in the combobox

  • Problem with create a duplicate textfield in AS2

    This is my xml file:
    <?xml version="1.0" encoding="utf-8"?>
    <news>
    <Product id="0" titles="MH 20" imgURL="images/image1.jpg">
    <title>Multi Host 20</title>
    <body>Many companies are running more than one network simultaneously to have the different service systems.
    A modern business network should be an integrated network platform that  can afford a reliable service coverage and service bearing on the same  network infrastructure.
    Multi-Host is designed to help businesses control and manage their it  resources by integrating and standardizing several key components into  an all-in-one solution.
    This is the only means to lower the operation and maintenance costs  while achieving a higher management efficiency and a highly-unified  standard.</body>
    </Product>
    <Product id="1" titles="MH50" imgURL="images/image2.jpg">
    <title>Multi Host 50 </title>
    <body>Mutli Host 50.
    Many companies are running more than one network simultaneously to have the different service systems.
    A modern business network should be an integrated network platform that  can afford a reliable service coverage and service bearing on the same  network infrastructure.
    Multi-Host is designed to help businesses control and manage their it  resources by integrating and standardizing several key components into  an all-in-one solution.
    This is the only means to lower the operation and maintenance costs  while achieving a higher management efficiency and a highly-unified  standard.</body>
    </Product>
    <Product id="2" titles="MH100" imgURL="images/image3.jpg">
    <title>Multi Host 100 </title>
    <body>Mutli Host 100.
    Many companies are running more than one network simultaneously to have the different service systems.
    A modern business network should be an integrated network platform that  can afford a reliable service coverage and service bearing on the same  network infrastructure.
    Multi-Host is designed to help businesses control and manage their it  resources by integrating and standardizing several key components into  an all-in-one solution.
    This is the only means to lower the operation and maintenance costs  while achieving a higher management efficiency and a highly-unified  standard.</body>
    </Product>
    </news>
    this is my as2 code in flash:
    var Liste:XML = new XML();
    Liste.ignoreWhite = true;
    Liste.load("XML/products.xml");
    Liste.onLoad =  function(success){
    var galleriev = Liste.firstChild.childNodes;
    var lon = galleriev.length;
    for (var i = 0; i<lon; i++) {
    var nom = galleriev[i].attributes.imgURL;
    //trace(nom);
    var ptitle = galleriev[i].attributes.titles;
    trace (ptitle);
    _root.prodtitle.createEmptyMovieClip("prodtitle"+i, i+3);
    prodtitle.createTextField("prod_title"+i, i+3);
    prodtitle.prod_title.text = ptitle;
    My problem is:
    1. How to create a textfield with his picture?
    i  would like to make a product page. it will contain pictures of the  product with his name in below. then i click on one of these pictures or  textfields, it will go the description page.
    i hope that you understand what i need and help me.
    regards,
    MELAS

    Mr.KGlad,
    How are you?
    i did another thing but the same with output. kindly see in below:
    stop();
    var Liste:XML = new XML();
    Liste.ignoreWhite = true;
    Liste.load("XML/products.xml");
    Liste.onLoad =  function(success){
    var galleriev = Liste.firstChild.childNodes;
    var lon = galleriev.length;
    var output:String = "";
    for (var i = 0; i<lon; i++) {
    _root.prodtitle.createEmptyMovieClip("prodtitle"+i,i);
    prodtitle.createTextField("prod_title"+i,i,100,50,778,600);
    prodtitle["prod_title"+i].multiline=true;
    prodtitle["prod_title"+i].html=true;
    prodtitle["prod_title"+i].wordWrap=true;
                output += "<img src='";
                output += galleriev[i].attributes.imgURL;
                output += "'/>";
                output += "\n";
                output += galleriev[i].attributes.titles;
                output += "\n";
                trace(output);
    prodtitle["prod_title"+i].htmlText = output;
    var column = 0;
    var line = 0;
    for (i=0; i<lon; i++) {
    if (column == 3) {
    column = 0;
    line++;
    prodtitle["prod_title"+i]._x = column*200;
    prodtitle["prod_title"+i]._y = line*300;
    column++;
    so this render :
    how to put each of them like the previous image???
    regards,
    MELAS

  • Date field in create record has time =00

    I have set
    PLSQL_DATE_FORMAT, 'MM/DD/YY HH24:MI'
    BUILTIN_DATE_FORMAT, 'MM/DD/YY HH24:MI'
    I do not want to change defaults on App Server.
    Then I have date & time in 2 fields for ease of changing.
    After User Changes 03:20 to say 04:15, I want to create the record by contacenating the new time to current date and store record.
    As Add date is not allowed.
    So I have displays of global.mydate which shows
    correctly as MM/DD/YY 04:15 etc, so the concat is working ok.
    But when I equate my block field to this field
    in say :Block.var := to_char(:global.mydate,'MM/DD/YY HH24:MI')
    My created filed var still has 00 in the date and time field.

    If :global.mydate is a text string and :Block.var is a datetime datatype, then your command should be:
    :Block.var := to_date(:global.mydate,'MM/DD/YY HH24:MI')
    Note that by using only a 2-character YY for year, your century will always be '20'.

  • For loop and xml - how to point the right content in a XML file with a dynamically created button?

    Hi Everybody,
    as my first experience in AS3 I'm bulding a photo multigallery. In that gallery I have some buttons, each one pointing to its respective set of images.
    Each button is created with the for loop, that picks the information from a XML file. From this XML I get the text of the button, the position etc. What I did with some sucess. But there is a scary problem: I don't know how to make each button load the respective and unique set of images.
    I've tryied several different methods, with no effect, to make each loop to give to each button an unique identity to load the respective set of images.
    I imagine that the solution pass by the use of arrays. I wrote some code, and I guess that I'm almost there (but not sure). Here is my AS3 code until now:
    // CREATE MENU CONTAINER //
    var menuContainer:MovieClip = new MovieClip();
    menuContainer.x=10;
    menuContainer.y=300;
    addChild(menuContainer);
    // CREATE IMAGES CONTAINER //
    var imagesContainer:MovieClip = new MovieClip();
    imagesContainer.x=10;
    imagesContainer.y=10;
    addChild(imagesContainer);
    //// LOAD XML ////
    var xmlLoader:URLLoader = new URLLoader();
    xmlLoader.addEventListener(Event.COMPLETE, whenLoaded);
    xmlLoader.load(new URLRequest("XML/roiaXML.xml"));
    var xml:XML;
    function whenLoaded(evt:Event):void {
         xml=new XML(evt.target.data);
         var mySetsList:XMLList=xml.children();
         //// MENU BUTTONS ////
         // CREATE ARRAYS //
         var totalArray:Array = new Array();
         var setNodesArray:Array = new Array();
         var setNamesArray:Array = new Array();
         // POSITIONING BUTTONS INSIDE MENU CONTAINER//
         var rowsQuantity:Number=3;
         var columnsQuantity:Number=Math.ceil(mySetsList.length()/rowsQuantity);
         var cellWidth:Number=160;
         // CREATE BUTTONS //
         for (var i:int=0; i< mySetsList.length(); i++) {
              var newSetButtonMC:setButtonMC=new setButtonMC();
              //what do I do here to make it works? To give each button created a unique id.
              setNodesArray.push(i);
              //trace(setNodesArray);
              var imageNodesArray:Array = new Array();
              for (var j:int=0; j<mySetsList[i].IMAGE.length(); j++) {
                   imageNodesArray.push(mySetsList[i].IMAGE[j].attribute("imageTitle"));
              totalArray.push(imageNodesArray);
              newSetButtonMC.setButtonText.text=mySetsList.attribute("galeriaTitle")[i];
              newSetButtonMC.setButtonText.autoSize=TextFieldAutoSize.LEFT;
              var cellX:Number=Math.floor(i/rowsQuantity);
              var cellY:Number=i%rowsQuantity;
              newSetButtonMC.x=cellX*cellWidth;
              newSetButtonMC.y=cellY*(newSetButtonMC.height+10);
              newSetButtonMC.addEventListener(MouseEvent.CLICK, onClick);
              menuContainer.addChild(newSetButtonMC);
         totalArray.push(setNodesArray);
         //// MENU BUTTONS ACTIONS ////
         function onClick(mevt:MouseEvent):void {
              trace(totalArray [0][0]);
              trace(totalArray [0][0]);
              // in the line above I achieved some success loading a specific info from XML.
              // but I don't know what to do with it.
              //what do I do here? To make each button to load its own node from XML.
    Here is my XML:
    <GALERIA galeriaTitle="galeria 01">
      <IMAGE imageTitle="imageTitle01">feio.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle02">muitofeio.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle03">aindamaisfeio.jpg</IMAGE>
    </GALERIA>
    <GALERIA galeriaTitle="galeria 02">
      <IMAGE imageTitle="imageTitle01">estranho.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle02">maisestranho.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle03">aindamaisestranho.jpg</IMAGE>
    </GALERIA>
    Thanks everyone . ABSTRATO

    you can assign each newSetButtonMC and ivar property that points to its i value or, even easier:
    // CREATE MENU CONTAINER //
    var menuContainer:MovieClip = new MovieClip();
    menuContainer.x=10;
    menuContainer.y=300;
    addChild(menuContainer);
    // CREATE IMAGES CONTAINER //
    var imagesContainer:MovieClip = new MovieClip();
    imagesContainer.x=10;
    imagesContainer.y=10;
    addChild(imagesContainer);
    //// LOAD XML ////
    var xmlLoader:URLLoader = new URLLoader();
    xmlLoader.addEventListener(Event.COMPLETE, whenLoaded);
    xmlLoader.load(new URLRequest("XML/roiaXML.xml"));
    var xml:XML;
    function whenLoaded(evt:Event):void {
         xml=new XML(evt.target.data);
         var mySetsList:XMLList=xml.children();
         //// MENU BUTTONS ////
         // CREATE ARRAYS //
         var totalArray:Array = new Array();
         var setNodesArray:Array = new Array();
         var setNamesArray:Array = new Array();
         // POSITIONING BUTTONS INSIDE MENU CONTAINER//
         var rowsQuantity:Number=3;
         var columnsQuantity:Number=Math.ceil(mySetsList.length()/rowsQuantity);
         var cellWidth:Number=160;
         // CREATE BUTTONS //
         for (var i:int=0; i< mySetsList.length(); i++) {
              var newSetButtonMC:setButtonMC=new setButtonMC();
              //what do I do here to make it works? To give each button created a unique id.
              setNodesArray.push(i);
              //trace(setNodesArray);
              var imageNodesArray:Array = new Array();
              for (var j:int=0; j<mySetsList[i].IMAGE.length(); j++) {
                   imageNodesArray.push(mySetsList[i].IMAGE[j].attribute("imageTitle"));
             nextSetButtonMC.imageArray = imageNodesArray;
              //totalArray.push(imageNodesArray);
              newSetButtonMC.setButtonText.text=mySetsList.attribute("galeriaTitle")[i];
              newSetButtonMC.setButtonText.autoSize=TextFieldAutoSize.LEFT;
              var cellX:Number=Math.floor(i/rowsQuantity);
              var cellY:Number=i%rowsQuantity;
              newSetButtonMC.x=cellX*cellWidth;
              newSetButtonMC.y=cellY*(newSetButtonMC.height+10);
              newSetButtonMC.addEventListener(MouseEvent.CLICK, onClick);
              menuContainer.addChild(newSetButtonMC);
         totalArray.push(setNodesArray);
         //// MENU BUTTONS ACTIONS ////
         function onClick(mevt:MouseEvent):void {
              var mc:setButtonMC=setButtonMC(mevt.currentTarget);
    for(i=0;i<mc.imageArray.length;i++){
    trace(mc.imageArray[i]);
    Here is my XML:
    <GALERIA galeriaTitle="galeria 01">
      <IMAGE imageTitle="imageTitle01">feio.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle02">muitofeio.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle03">aindamaisfeio.jpg</IMAGE>
    </GALERIA>
    <GALERIA galeriaTitle="galeria 02">
      <IMAGE imageTitle="imageTitle01">estranho.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle02">maisestranho.jpg</IMAGE>
      <IMAGE imageTitle="imageTitle03">aindamaisestranho.jpg</IMAGE>
    </GALERIA>
    Thanks everyone . ABSTRATO

  • Create a formula based on UserResponse()

    Am trying to create a var based on Count(Payperiod) for overall report however whenever I include the formula at row level the value reverts to the individual row.  How can context be overriden? e.g. Formula is  Sum(HrsWorked)/Count(Payperiod)
    Where Count(Payperiod) is based on a range of dates selected from UserResponse() for a Beginning and Ending Payperiod.
    Report contains record for each employee and If Count(Payperiod) = 3 but that employee may have only HrsWorked recorded for one of the Payperiods
    I want calculation to use HrsWorked for each employee but I need to use the number of payperiods based on the UserResponse()s not on number of Payperiods recorded for employee.

    Hi
    try this syntax
    Sum(HrsWorked)/(Count(Payperiod) In Report)
    Regards,
    Stratos

  • Hey guys, I am new to javascript and I am trying to figure out how to add two spot colors to the active document. I am trying to get it to detect weather or not the spot colors are already in the document, and if they are not, it will proceed to create th

    Here's what I have so far.
    var docRef = app.activeDocument;
    if (docRef.swatches.getByName ("CutContour") === 'undefined') {
    var spotNameCC = "CutContour";               
    var cmykColor = new CMYKColor();
    cmykColor.cyan = 0;
    cmykColor.magenta = 100;
    cmykColor.yellow = 0;
    cmykColor.black = 0;
    // Create Spot
    var spot = docRef.spots.add();
    spot.color = cmykColor;
    spot.colorType = ColorModel.SPOT;
    spot.name = spotNameCC;
    //var spotNameW = "WEED (r)";
    // Create CMYKColor
    /*var cmykColor2 = new CMYKColor();
    cmykColor2.cyan = 50;
    cmykColor2.magenta = 0;
    cmykColor2.yellow = 50;
    cmykColor2.black = 0;
    // Create Spot
    var spot2 = docRef.spots.add();
    spot2.color = cmykColor2;
    spot2.colorType = ColorModel.SPOT;
    spot2.name = spotNameW;
    Let me know what I did wrong lol I know it has to do with the detecting part. Also, if anyone knows any good websites to learn javascript I would be very thankful. I am not sure what a lot of the syntax means. Thanks!!

    Never mind I figured it out. Someone posted a similar question a few months ago on here, damn this forum is awesome wish I had known about it sooner. Sorry if I wasted anyone's time.

  • Session Var set onSessionStart is Undefined

    Hello,
    I am having an issue with a session variable becoming undefined. The var is set (cfparam) on the Application.cfc page in the onSessionStart function. How is it possible for the variable to be undefined if it is set when the session starts? If the session has expired, wouldn't the onSessionStart function run, thus creating the var again? I have this problem on a couple of different applications and I am not sure why it is happing. Any ideas?
    CF9
    Thanks,
    Josh

    JavaScript runs on the Client.  ColdFusion runs on the server.  They do not talk to each other or share memory.
    The only way to get data from the client to the server is to make a request.  The only way to get data from the server to the client is to respond to a request.
    You can make that request by submitting a form either in the get or post scope.
    You can make that request by sumitting a request with the xmlHTTPrequest() function, commonly called AJAX.
    But somehow or the other you have to make a request.

  • How to create an AccountingEntry with reference to a SalesOrder?

    Dear community,
    I would like to create an accounting entry (journal entry voucher) that allocates some costs to a sales order. Take a look at the attached ByD screenshot to see what I mean. I am trying to replicate this manually created journal entry voucher with the studio... Unfortunately, my code is not working and I'm getting the error the "Sales document is missing".
    What else do I have to set? Here's my current code...
    var accEntry = AccountingEntry.Create();
    accEntry.AccountingClosingStepCode = "010";
    accEntry.AccountingDocumentTypeCode = "00088";
    accEntry.BusinessTransactionTypeCode = "634";
    accEntry.CompanyID = "1000";
    accEntry.EntryDate = Context.GetCurrentUserDate();
    accEntry.PostingDate = Context.GetCurrentUserDate();
    var elOfSOB : elementsof AccountingEntry.SetOfBooks;
    elOfSOB.SetOfBooksID.content = "8060";
    // Line item 1
    var item1 = accEntry.Item.Create();
    item1.ChartOfAccountsCode = "ZAT1";
    item1.ChartOfAccountsItemCode.content = "570000";
    item1.TransactionCurrencyAmount.content = 500;
    item1.TransactionCurrencyAmount.currencyCode = "EUR";
    item1.DebitCreditCode = "1";
    Entry.SetOfBooks.Create(elOfSOB);
    var acit = item1.SalesLedgerAccountItem.Create();
    acit.CostRevenueElementCode.content = "570000";
    acit.OperationalDocumentReference.ObjectTypeCode.content = "114";
    acit.OperationalDocumentReference.FormattedID = salesOrder.ID.RemoveLeadingZeros().content;
    acit.OperationalDocumentReference.UUID.content = salesOrder.UUID.content;
    acit.OperationalDocumentReference.ObjectID.content = salesOrder.ID.content;
    acit.OperationalDocumentItemReference.ObjectNodeTypeCode.content = "1080";
    acit.OperationalDocumentItemReference.FormattedID = salesOrder.Item.GetFirst().ID.RemoveLeadingZeros();
    acit.OperationalDocumentItemReference.UUID.content = salesOrder.Item.GetFirst().UUID.content;
    acit.OperationalDocumentItemReference.ObjectID.content = salesOrder.Item.GetFirst().ID;
    // Line item 2
    var item2 = accEntry.Item.Create();
    item2.ChartOfAccountsCode = "ZAT1";
    item2.ChartOfAccountsItemCode.content = "570000";
    item2.TransactionCurrencyAmount.content = -500;
    item2.TransactionCurrencyAmount.currencyCode = "EUR";
    item2.DebitCreditCode = "2";
    item2.ProfitCentreUUID = ProfitCentre.Retrieve("P1100").UUID;
    accEntry.SubmitForPosting();
    accEntry.Post();
    Thank you for your help!
    Best regards,
    Georg

    Hi Colin,
    If you want your time reference characteristic to be 0CALMONTH, then you must ensure that all other time characteristics in the cube can be derived from this characteristic. the infocube by default chooses the most refined time charactersistics as its time reference characteristic.
    That is in the cube you could then have characteristics lik 0CALQUARTER, 0CALYEAR...You cannot have 0CALWEEK or 0CALDAY since these cannot be defined from a value in 0CALMONTH.
    Please check below the SAP help for your reference.
    http://help.sap.com/saphelp_nw70/helpdata/EN/80/1a62ebe07211d2acb80000e829fbfe/frameset.htm
    Hope it helps,
    Best regards,
    Sunmit.

  • How to create an action to insert hundreds of different numbers for limited edition prints?

    Hi,
    I sell limited edition prints of a run of between 350 and 500.
    I am trying to get it set up so that my signature and the print number is included as part of the print. Here is an example:
    You'll see at bottom left there is my signature and underneath is is the print number e.g. 110/350 (this is legible when printed at 18x12" size).
    Inserting the signature and the "/350" is easy since it only needs to be done once per image.
    The difficulty comes with inserting the actual print number e.g. "110"
    At the moment I have 0 to 9 written out and scanned in as separate numbers. So to make "110" I use the "1" digit twice, plus the "0" digit. I.e. I haven't written out 1 to 500 and scanned them in all as separate numbers, I've just done the 10 digits and use those 10 digits to make all the different numbers I need.
    Is there a way to create an action that will create say 350 JPEG copies of the original file, each one with its own unique print number inserted? (And ideally automatically saved with the print number as its file name!)
    Many thanks in advance

    This Script might be able to do some of what you wanted (the startNumber and endNumber would have to be set in the Script).
    It needs a Layer Group named »numbers« to contain layers for the numbers named »0«, »1«, …
    (script edited)
    // this script saves jpg copies with numbers created from number-layers in a layer group;
    // use it at your own risk;
    #target photoshop;
    if (app.documents.length > 0) {
    // define the numbers to create;
    var startNumber = 290;
    var endNumber = 310;
    // set to pixels;
    var originalRulerUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    // get doc;
    var myDocument = app.activeDocument;
    // getting the name and location;
    var docName = myDocument.name;
    var baseName = docName.match(/(.*)\.[^\.]+$/)[1];
    //getting the location;
    var docPath = myDocument.path;
    // duplicate the image;
    var thecopy = myDocument.duplicate (thecopy, false);
    // jpg options;
    var jpgopts = new JPEGSaveOptions();
    jpgopts.embedProfile = true;
    jpgopts.formatOptions = FormatOptions.STANDARDBASELINE;
    jpgopts.matte = MatteType.NONE;
    jpgopts.quality = 9;
    // get number layers;
    var numberSet = thecopy.layers.getByName("numbers");
    // collect in an array;
    var theNumbers = [numberSet.layers.getByName("0"), numberSet.layers.getByName("1"), numberSet.layers.getByName("2"),
    numberSet.layers.getByName("3"), numberSet.layers.getByName("4"), numberSet.layers.getByName("5"),
    numberSet.layers.getByName("6"), numberSet.layers.getByName("7"), numberSet.layers.getByName("8"), numberSet.layers.getByName("9")];
    numberSet.visible = true;
    // proceed if all numbers have been found;
    if (theNumbers.length == 10) {
    // hide layers;
    for (var n = 0; n < numberSet.layers.length; n++) {
    numberSet.layers[n].visible = false
    var theState = thecopy.activeHistoryState;
    // process the numbers;
    for (var m = startNumber; m < endNumber + 1; m++) {
    // the position;
    var theHor = 500;
    // create an array for the new numbers;
    var theArray = new Array;
    // the number;
    var thisString = String(m);
    // duplicate layers to create the numbers;
    for (var o = 0; o < thisString.length; o++) {
    var theNumberLayer = theNumbers[Number(thisString[o])];
    // create copy;
    var theLayer = duplicateMoveRotateScale (theNumberLayer, theHor - Number(theNumberLayer.bounds[0]), 0, 100, 100, 0);
    theNumberLayer.visible = false;
    //alert (m+"_"+o+"\n"+theNumberLayer+"\n"+theLayer);
    // set the hor to edge of the new layer;
    var theHor = theLayer.bounds[2];
    theArray.push(theLayer);
    // get the number for the file name;
    var theNumber = bufferNumberWithZeros(m, String(endNumber).length);
    //save jpg;
    thecopy.saveAs((new File(docPath+"/"+baseName+"_"+theNumber+".jpg")),jpgopts,true);
    // remove copied layers;
    //for (var p = theArray.length - 1; p >= 0; p--) {theArray[p].remove()};
    thecopy.activeHistoryState = theState;
    // close copy;
    thecopy.close(SaveOptions.DONOTSAVECHANGES);
    // reset ruler;
    app.preferences.rulerUnits = originalRulerUnits
    //that’s it; thanks to xbytor;
    ////// buffer number with zeros //////
    function bufferNumberWithZeros (number, places) {
              var theNumberString = String(number);
              for (var o = 0; o < (places - String(number).length); o++) {
                        theNumberString = String("0" + theNumberString)
              return theNumberString
    ////// duplicate layer and move, rotate and scale it //////
    function duplicateMoveRotateScale (theLayer, theX, theY, theScaleX, theScaleY, theRotation) {
    app.activeDocument.activeLayer = theLayer;
    try{
    // =======================================================
    var idTrnf = charIDToTypeID( "Trnf" );
        var desc10 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref6 = new ActionReference();
            var idLyr = charIDToTypeID( "Lyr " );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref6.putEnumerated( idLyr, idOrdn, idTrgt );
        desc10.putReference( idnull, ref6 );
        var idFTcs = charIDToTypeID( "FTcs" );
        var idQCSt = charIDToTypeID( "QCSt" );
        var idQcsa = charIDToTypeID( "Qcsa" );
        desc10.putEnumerated( idFTcs, idQCSt, idQcsa );
        var idOfst = charIDToTypeID( "Ofst" );
            var desc11 = new ActionDescriptor();
            var idHrzn = charIDToTypeID( "Hrzn" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc11.putUnitDouble( idHrzn, idPxl, theX );
            var idVrtc = charIDToTypeID( "Vrtc" );
            var idPxl = charIDToTypeID( "#Pxl" );
            desc11.putUnitDouble( idVrtc, idPxl, theY );
        var idOfst = charIDToTypeID( "Ofst" );
        desc10.putObject( idOfst, idOfst, desc11 );
        var idWdth = charIDToTypeID( "Wdth" );
        var idPrc = charIDToTypeID( "#Prc" );
        desc10.putUnitDouble( idWdth, idPrc, theScaleX );
        var idHght = charIDToTypeID( "Hght" );
        var idPrc = charIDToTypeID( "#Prc" );
        desc10.putUnitDouble( idHght, idPrc, theScaleY );
        var idAngl = charIDToTypeID( "Angl" );
        var idAng = charIDToTypeID( "#Ang" );
        desc10.putUnitDouble( idAngl, idAng, theRotation );
        var idIntr = charIDToTypeID( "Intr" );
        var idIntp = charIDToTypeID( "Intp" );
        var idbicubicAutomatic = stringIDToTypeID( "bicubicAutomatic" );
        desc10.putEnumerated( idIntr, idIntp, idbicubicAutomatic );
        var idCpy = charIDToTypeID( "Cpy " );
        desc10.putBoolean( idCpy, true );
    executeAction( idTrnf, desc10, DialogModes.NO );
    return app.activeDocument.activeLayer
    } catch (e) {}
    Edit: This Script just uses the layers’ horizontal bounds for orientation, so it does not address the issue I referred to earlier reagrding aesthetically pleasing spacing of the elements.

  • To disable a service for jumpstart/create zone

    To disable a service once a system is up a running, "svcadm disable" does the job well.
    What would the suggested way of disabling a service before the system is up an running, in order to guarantee a service never runs.
    Clarification of this point would be from a finish script when a system is being built using a Jumpstart system (which might traditionally use something like rm /a/etc/rc3.d/S55thing), or when creating a zone (which might use rm /zoneroot/zonename/root/etc/rc3.d/S55thing), either of these not running in the true context of the end system.

    I wanted to elaborate a little on Tobin's comments.
    Most of the Solaris services come disabled by default, but many of them are also re-enabled by our default profile, generic_open.xml.
    Brian, you're on the right track, though -- changing the manifest isn't the right way to disable a service. Manifests we deliver aren't editable -- they'll get overwritten, not preserved on upgrade. You also shouldn't modify the profiles that we ship, as they're also overwritten on upgrade.
    So how do you do the disabling, when you don't have a running repository to modify?
    The best way is to provide a site-specific profile. You can create your own /var/svc/profile/site.xml which will be applied to the system after the system-supplied profiles (during svc:/system/manifest-import). There you can describe services as enabled or disabled.
    Just create /a/var/svc/profile/site.xml during your jumpstart finish script. See the other .xml files in /var/svc/profile for examples of the format.
    You can also test your profile on a running system by using "svccfg apply".

Maybe you are looking for

  • Disc stuck in dead iMac

    Hi, I have a slot-loading iMac DV 400 that died quite a while ago (lightning, ouch) and it had a disc in the CD drive at the time. I have a new 2 Ghz 17" G5 now, but I want to use that disc and since the iMac is pretty dead there are no commands or t

  • Input data from external instrument

    Hello! i want know if is possible put a data into a SAP transation field from an external device like bar-code reader, or measure instrument. like a keyboard emulator. I have installed own instrument driver. It's necessary a new driver? some suggesti

  • CREATE TEMPORARY TABLE USING EXECUTE IMMEDIATE

    Hi All, i have a question, how can i create a temporary table using EXECUTE IMMEDIATE ?? Like: CREATE GLOBAL TEMPORARY table new_table as (Select * from old_table); Thanks, Edited by: xDeviates on Jun 11, 2012 3:13 PM

  • Item Category description display in SO webclient ui

    Hello I am seeing Item Category description in a Sales Order in WebGUI screen. this is default behaviour. Example : the Item Category under 'Item Details' shows up as '3rd party or 'Direct Ship''. I need to display Item Cat code like TAN instead of I

  • Crystal 2008 EVALUATION broke Visual Studio Team System 2008 Developer Ed.

    After installing the Crystal 2008 EVALUATION, I can no longer edit Crystal Reports in Visual Studio Team System 2008 Developer Edition. When I open the report I get a blank grey screen instead of the designer. Please help.