Mxml code in script

Hi All,
I want to write mxml code (some tags and all) inside <mx:Script> based on some conditions. For example, if the value>10 , i want to display a textbox and if value <10 I want to display image.
How do we dynamically write mxml code inside script.
In Java, we use out.println() and write whatever we want but how to do this in Flex.
Pls suggest

Thanks everyone for your helpful responses. Now i am facing a problem while adding components. My motive is have a grid on a canvas and i again want to add grid as griditem of the previous grid, i.e, one main grid and all the griditems of this main grid will again contain one grid. For this purpose, i am declaring main grid in class and initializing it inside init(). Now i am calling a function from init() which in turn is going to put grids as part of griditem of the main grid. Please refer to the code below.
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="httpid.send();init();" width="1000" height="800">
<mx:Canvas>
<mx:Script>
    <![CDATA[
        import mx.controls.Image;
        import mx.containers.GridItem;
        import mx.containers.GridRow;
        import mx.containers.Grid;
        var maingrid:Grid=null;
        var mainrow1:GridRow=null;
        var mainitem1:GridItem=null;
        var mainrow2:GridRow=null;
        var mainitem2:GridItem=null;
        var mainitem3:GridItem=null;
        var mainitem4:GridItem=null;
          private function init():void{
           maingrid=new Grid();
           mainrow1=new GridRow();
           mainitem1=new GridItem();
           mainrow2=new GridRow();
           mainitem2=new GridItem(); 
           mainitem3=new GridItem(); 
           mainitem4=new GridItem();
          xmlLoaded();
function xmlLoaded():void{
var grid:Grid=new Grid();
    var row:GridRow=new GridRow();
    var item1:GridItem=new GridItem();
    var item2:GridItem=new GridItem();
    var item3:GridItem=new GridItem();
    var txt1:Text=new Text();
    var img:Image=new Image();     
    txt1.text='abc';
    img.source='assets/12.jpg';
    item1.addChild(txt1);
    item2.addChild(img);
    row.addChild(item1);
    row.addChild(item2);
    row.addChild(item3);
    grid.addChild(row);   
    mainitem1.addChild(grid);
    maingrid.addChild(mainrow2);
    mainrow1.addChild(mainitem1);
    mainrow1.addChild(mainitem2);
    mainrow1.addChild(mainitem3);
    mainrow1.addChild(mainitem4);
    maingrid.addChild(mainrow1);
     canvas.addChild(maingrid);
    ]]>
    </mx:Script>
<mx:Canvas id="canvas" />
</mx:Application>
The problem is , right now it doesnt display anything but when i declare and initilize maingrid and its rows/items inside xmlLoaded() then it works but it foils my purpose to have only one main grid. Please shed some light on this as to why this is happening.
Also, can u please suggest how to catch exceptions in flex. I am clueless as everytime a  blank page appears and no error or warning comes.

Similar Messages

  • Difference in using the same component made in mxml or action-script

    Hi,
    I made a sample project to show a kind of bug in the SuperTabNavigator component of FlexLib
    In this sample you can see that using the same component (made in both mxml or action-script) can make a difference
    I'm just wondering why ?
    Thanks
    Here is what i've posted :
    What steps will reproduce the problem?
    1. Create a button to dynamically add new tab with icon on a SuperTabNavigator
    2. Click on this button to add new tabs
    What is the expected output?
    - The expected output is tabs added without abnormal behavior
    What do you see instead?
    - Every time a new tab is created the one who had the focus has its content
    (icon + label) moving from the top-left of the tab to its original position
    Please provide any additional information below.
    Configuration:
    - Flex Builder 3 in Eclipse
    - FlexLib 2.3
    Sample:
    (see attached file)
    There is two type of tab, one in action-script and one in mxml
    They both are equal
    - Adding a new action-script tab to SuperTabNavigator works fine
    - Adding the same tab but an mxml one doesn't
    - Adding a new action-script or mxml tab to TabNavigator works fine
    -> meanings that the issue comes with SuperTabNavigator
    - Adding a new mxml tab to both SuperTabNavigator and TabNavigator at the
    same time makes TabNavigator to get the same bad behavior
    Remarks:
    - Tried everything but i'm really stuck
    - Weirdly, removing the PopUpButton correct the issue
    - In the same way if you keep adding action-script tab it automatically scroll to the
    last tab. And if you do the same with mxml tab then it add the tab at the end and
    scroll to the first one.
    => what could be the difference between using action-script or mxml object ?

    Here is one possible solution:
    You can use the ExternalInterface (
    http://livedocs.macromedia.com/flex/2/langref/flash/external/ExternalInterface.html)
    class to communicate with JavaScript. JavaScript can then popup the
    media player very easily like this:
    http://www.webreference.com/programming/javascript/jf/column5/index.html
    The documentation on the ExternalInterface class has a nice
    example (in the bottom of the page) on how to communicate with
    JavaScript in a browser. Hope this helps,
    -george

  • Invoke an application using mxml or action script

    Hi all
    I am using flex 2.0 beta 3. And i would like to know if any
    method is there to invoke a software using mxml or action script.
    I tried with URLLoader and URLRequest to load and open a
    file, with a hope that the file will open in the default program
    that i configured for that file to open. But i got an error saying
    Stream Error.
    Can anybody guide me to resolve this issue ..
    Rakesh

    Here is one possible solution:
    You can use the ExternalInterface (
    http://livedocs.macromedia.com/flex/2/langref/flash/external/ExternalInterface.html)
    class to communicate with JavaScript. JavaScript can then popup the
    media player very easily like this:
    http://www.webreference.com/programming/javascript/jf/column5/index.html
    The documentation on the ExternalInterface class has a nice
    example (in the bottom of the page) on how to communicate with
    JavaScript in a browser. Hope this helps,
    -george

  • Dynamic Generation of MXML code

    I have a flex application which loads another sub-application.
    The parent application has tools which allows the user to add a component to the sub-application and modify some of the component's properties (for eg. when the user clicks on the text box tool in the parent application, a text area component gets added to the sub-application).
    Now how can I modify/create-new mxml code for the sub-application reflecting the additions made by the user at runtime?
    (This application somewhat immitates what a user gets to do in the design mode in flash builder where the mxml code gets generated behind the scenes. So can I make use of flash builder by implementing some of its methods or extending its classes etc to get the job done?)

    Its true that mxml is just a conveniant notation and that's why I feel it is suitable for what I intend to do. All what is really being done here is to save the state of the sub-application swf so that it can be edited again later. So a conveniant notation is exactly what it needed.
    For this I do have to create MXML on the fly. However there is no real need to compile it at the same time. This is because running the sub-application would already be a visual representation of the modified mxml, although I do realize that it is not the compiled version of the modified mxml. This would work assuming that the modifications made to the sub-application at runtime translate accurately into mxml to the extent that there would be no difference between the currenlty playing swf file and the compiled swf of the modified mxml. This process would also eliminate the need for repetitive compilation which can ultimately be done once the user chooses to save the changes.

  • Not able to convert my application file from mxml to Action Script

    Hi,
        In my mobile project I want to convert my application file from mxml to ActionScript.When I do this I get error and when I digged into the code I found that the error comes in preloader class initialize method as preloader property in System Manager class is null(line 2026 in SystemManager class).it actually represents the splashScreen class.When I tried to set the splash Screen the document says we cannot set this property from action script.
       I know we have an option of action script mobile project but it doesnt recognise TabbedViewNavigatorApplication.
    So how can I overcome the problem.

    I get the following error:
    TypeError: Error #1007: Instantiation attempted on a non-constructor.
    at mx.preloaders::Preloader/initialize()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\p reloaders\Preloader.as:261]
    at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::initialize()[E:\dev\4.5.1\frameworks\projects\ framework\src\mx\managers\SystemManager.as:2103]
    at mx.managers::SystemManager/initHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\m x\managers\SystemManager.as:2588]

  • VS Project build fails on TSQL Code in script.

    Hi there,
    I have the following issue on which I've done some research, but nothing helps.
    The database project I am working on compiles everything but one script. The scripts folder has 3 scripts, a controller that calls the remainder two.
    One of these scripts fail on SQL syntax which is weird because they seem to be okay and SSMS would not complain. Having experimented a little I found that any SQL statement fails on syntax, there must be a configuration issue here.
    What I have tried so far:
    -add the script as a stored procedure and reference it within the script, so that the script will have one line only (EXEC usp_BuildTestData - it is needless to say that the stored procedure compiles well...)
    -create a new script file (without build) from within VS.
    -check if the script file BuildAction property is set to None
    -load the script file and switch off the SQLCMD mode in t-SQL Editor Execution settings.
    Build still fails with SQL72007: The syntax check failed 'Incorrect syntax near EXEC' in the batch near 'EXEC usp_BuildTestData '.
    I thought this was a common error or at least something I could easily find a solution for.
    Unfortunately VS is somewhat new to me.
    Any ideas are appreciated.
    Versions:
    Visual Studio Pro 2012 (Version 11.0.50727.1 RTMREL) (.Net FW: 4.5.50709)
    Target database version: SQL 2008R2 (this is set in the project's target platform setting)

    Hi Tina,
    Thank you for getting back to me. I inherited the project file in subject therefore I cannot tell how it was created. But, I tried re-creating the database project from scratch that resulted in the same error. Steps below:
    -Select New Solution/ new SQL Server database project
    -Copy the sql files and folders into solution folder then map them into the project file
    -build the project.
    The database is based upon C#.
    The idea of the post deployment script is that it builds test data in the freshly deployed application. It uses a linked server that points to production and selects some data.
    I continued experimenting with the post deployment script and found something interesting.
    So 1 of the invoked scripts fail on the SQL syntax. This is a simple line EXEC usp_BuildTestData.
    The other that compiles well is an ALTER VIEW. I pasted the EXEC... line after this and it worked. It builds now. (I have removed the remaining empty script file, so I have 1 post deployment script file now that invokes 1 script only.
    I tried comparing the two files but concluded in the fact that each property is the same (Buildaction=None, CopyAlways) in both files.
    This proves to me that the SQL code was correct, I did not leave obvious mistakes in it.
    The "bad" script file fails on syntax, regardless of what I give in. I tried recreating by clicking 'Add new item' then selecting Script (Not in build). Did not help unfortunately. Once referenced in the PostDeployment script, build fails.

  • Change a state in main.mxml from a script in another mxml

    Hi,
    i'm having some trouble with my application, let's say i have the main application file called MAIN.MXML
    in wich i have set different States, and have different forms.
    now i have a form called loginForm which contains the textInput item for Login and Password, i also have a link Need to Register
    which onClick will change the state to show in the same panel a different form registerForm (with the relevant textInput items)
    now the MAIN.MXML includes a custom component called <comp: NetworkManager /> which includes all the logic scripts and MXML
    tags to create and manage an HTTPService request to a PHP Server.
    when the user click on the Login button, this will call a function included in the main.as script (imported in MAIN.MXML) which
    will call a function in the script within NetworkManager.MXML passing all the form data.
    in NetworkManager.MXML the script will create an XML message, will send to the PHP Server and wait the response... if this comes
    true the user is authenticated, otherwise is not.
    so far so good, i get the message sent, the correct response back. Now i want to hide the form in MAIN.MXML and put something like
    Welcome firstName lastName!! instead. But i don't know how to do it. If i try to access the states in MAIN.MXML from the NetworkManager.MXML
    i'll get all sort of errors which i don't have it here with me.
    I know this sounds like a newbie question, and it really is ... any taker?
    your help is much appreciated.
    thanks
    T.

    Hi,
    i've tried RemoveChild but i get an error like:
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
    at flash.display::DisplayObjectContainer/removeChild()
    at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$removeChild()[C:\autobuild\3.2.0\frameworks\p rojects\framework\src\mx\core\UIComponent.as:5096]
    at mx.core::Container/removeChild()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\ core\Container.as:2274]
    at components::NetworkManager/sendUserAuthHandler()[C:\Documents and Settings\Tom\My Documents\flex_prj\Shoppy\src\components\NetworkManager.mxml:182]
    at components::NetworkManager/serverHandler()[C:\Documents and Settings\Tom\My Documents\flex_prj\Shoppy\src\components\NetworkManager.mxml:98]
    at components::NetworkManager/__serverRPC_result()[C:\Documents and Settings\Tom\My Documents\flex_prj\Shoppy\src\components\NetworkManager.mxml:290]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.rpc.http.mxml::HTTPService/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\autobuild\3.2.0\framewor ks\projects\rpc\src\mx\rpc\http\mxml\HTTPService.as:290]
    at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:\autobuild\3.2.0\frameworks\ projects\rpc\src\mx\rpc\AbstractInvoker.as:193]
    at mx.rpc::Responder/result()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responde r.as:43]
    at mx.rpc::AsyncRequest/acknowledge()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\ AsyncRequest.as:74]
    at DirectHTTPMessageResponder/completeHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\s rc\mx\messaging\channels\DirectHTTPChannel.as:403]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    who is the caller of loginForm then? i've tried with Application.application.loginForm but i do get the same error though.
    loginForm is contained in a Canvas item, is it the caller? or who else?
    thanks
    T.

  • Merge 2 code and script doesn't work anymore

    I have 2 AS2 codes (I think). One is a carousel gallery script that lets pictures flying in a circle. And the second code is the one that let words fly, downloaden from http://www.levitated.net/daily/levTextSpace.html.
    The scripts work seperatly, but once i merge the codes together the levTextSpace doesn't work anymore. And I can't find where the problem is. Fla file is included.
    Carousel gallery:
    picData = new XML();
    picData.ignoreWhite = true;
    picData.onLoad = loadXML;
    picData.load("md_photos.xml");
    function loadXML() {
         _root.createEmptyMovieClip("thumbnails", 1);
         images = new Array();
         for (i=0; picData.firstChild.childNodes[i].firstChild.nodeValue != undefined; i++) {
              images.push(picData.firstChild.childNodes[i].firstChild.nodeValue);
         thumbnails._x = 750;
         thumbnails._y = 75;
         imageLoading = true;
         numObjects = images.length;
         objectsInScene = new Array();
         focalLength = 750;
         spin = 0;
         _root.thumbnailSize = 350/((numObjects)/9);
         displayPane = function () {
              var angle = this.angle+spin;
              var x = Math.cos(angle)*this.radius;
              var z = Math.sin(angle)*this.radius;
              var y = this.y;
              var scaleRatio = focalLength/(focalLength+z);
              this._x = x*scaleRatio;
              this._y = y*scaleRatio;
              this._xscale = -(this._yscale=100*scaleRatio);
              this._xscale *= Math.sin(angle);
              this.swapDepths(Math.round(-z));
         angleStep = 2*Math.PI/numObjects;
         for (i=0; i<numObjects; i++) {
              thumbnail = thumbnails.createEmptyMovieClip("thumbnail_"+i, i);
              myPic = thumbnail.createEmptyMovieClip("picHolder", 1);
              myPic.loadMovie(images[i]);
              thumbnail.angle = angleStep*i;
              thumbnail.radius = 650;
              thumbnail.x = Math.cos(thumbnail.angle)*thumbnail.radius;
              thumbnail.z = Math.sin(thumbnail.angle)*thumbnail.radius;
              thumbnail.y = 0;
              thumbnail.display = displayPane;
              thumbnail.drawBox(_root.thumbnailSize);
              thumbnail.buttonize(i);
              thumbnail.notLoaded = true;
              objectsInScene.push(thumbnail);
         panCamera = function () {
              spin -= 0.001;
              for (var i = 0; i<objectsInScene.length; i++) {
                   objectsInScene[i].display();
         thumbnails.onEnterFrame = panCamera;
         _root.onEnterFrame = function() {
              for (i=0; i<images.length; i++) {
                   if ((_root.thumbnails["thumbnail_"+i].picHolder.getBytesLoaded()/_root.thumbnails["thumbnail_"+i].picHolder.getBytesTotal() == 1) && _root.thumbnails["thumbnail_"+i].notLoaded) {
                        if (_root.thumbnails["thumbnail_"+i].picHolder._width>=_root.thumbnails["thumbnail_"+i].picHolder._height) {
                             _root.thumbnails["thumbnail_"+i].picHolder._yscale = _root.thumbnails["thumbnail_"+i].picHolder._xscale=(100*(1-(_root.thumbnails["thumbnail_"+i].picHolder._width-_root.thumbnailSize)/(_root.thumbnails["thumbnail_"+i].picHolder._width)));
                             _root.thumbnails["thumbnail_"+i].picHolder._y = (_root.thumbnailSize-_root.thumbnails["thumbnail_"+i].picHolder._height)/2;
                        if (_root.thumbnails["thumbnail_"+i].picHolder._width<=_root.thumbnails["thumbnail_"+i].picHolder._height) {
                             _root.thumbnails["thumbnail_"+i].picHolder._yscale = _root.thumbnails["thumbnail_"+i].picHolder._xscale=(100*(1-(_root.thumbnails["thumbnail_"+i].picHolder._height-_root.thumbnailSize)/(_root.thumbnails["thumbnail_"+i].picHolder._height)));
                             _root.thumbnails["thumbnail_"+i].picHolder._x = (_root.thumbnailSize-_root.thumbnails["thumbnail_"+i].picHolder._width)/2;
                        if (_root.thumbnails["thumbnail_"+i].picHolder._width == _root.thumbnails["thumbnail_"+i].picHolder._height) {
                             _root.thumbnails["thumbnail_"+i].picHolder._yscale = _root.thumbnails["thumbnail_"+i].picHolder._xscale=(100*(1-(_root.thumbnails["thumbnail_"+i].picHolder._width-_root.thumbnailSize)/(_root.thumbnails["thumbnail_"+i].picHolder._width)));
                             _root.thumbnails["thumbnail_"+i].picHolder._x = _root.thumbnails["thumbnail_"+i].picHolder._y=0;
                        _root.thumbnails["thumbnail_"+i].picHolder._alpha = 80;
                        _root.thumbnails["thumbnail_"+i].notLoaded = false;
                   if ((_root.thumbnails["thumbnail_"+i].picHolder.getBytesLoaded()/_root.thumbnails["thumbnail_"+i].picHolder.getBytesTotal()<1)) {
    levTextSpace:
    // register root as environment
    Object.environment = _root;
    // create camera object
    this.cam = {x:0, y:0, z:500, dx:0, dy:0, dz:-500};
    // set environmental constants
    this.fl = 1000;
    // create 'space' to which all words will be attached
    this.createEmptyMovieClip("space", 2);
    // center 'space' on the stage
    space._x = 800;
    space._y = 900;
    // a string of words related to the wind
    this.keywords = "no-nonsense  full-service partner  co-creation  innovation  keep it simple  technical expertise  integral design method  successful products  teamwork  designers engineers  design for (dis)assembly  sustainability  ecological  smart  ideation  feasability study  ergonomic analysis  imagineering  trade off matrix  prototyping  consultancy  technology  problemsolvers  open-minded  multi-disciplinary  imagination  creative minds  passionated  user centered  strategy  added value";
    // convert the string of words into an array of words
    this.wordList = new Array();
    this.wordList = this.keywords.split("  ");
    // create one instance for each word in the list
    for (n=0; n<this.wordList.length; n++) {
        // pick a word from the list
        var word = Object.environment.wordList[n];
        var x = random(600)-(300);
        var y = random(400)-(200);
        var z = random(Object.environment.fl*2)-Object.environment.fl;
        // create an instance of the keyWord object
        nombre = "word"+String(depth++);
        initialization = {txtword: word, x: x, y: y, z: z};
        space.attachMovie("keyWord", nombre, depth, initialization);
        trace(nombre);
    this.onEnterFrame = function() {
        this.cam.dz += 5;
        // move the camera to its destination
        this.cam.x += (this.cam.dx-this.cam.x)/10;
        this.cam.y += (this.cam.dy-this.cam.y)/10;
        this.cam.z += (this.cam.dz-this.cam.z)/30;

    change the highlighted text
    picData = new XML();
    picData.ignoreWhite = true;
    picData.onLoad = loadXML;
    picData.load("md_photos.xml");
    function loadXML() {
         _root.createEmptyMovieClip("thumbnails", 1);
         images = new Array();
         for (i=0; picData.firstChild.childNodes[i].firstChild.nodeValue != undefined; i++) {
              images.push(picData .firstChild.childNodes[i].firstChild.nodeValue);
         thumbnails._x = 750;
         thumbnails._y = 75;
         imageLoading = true;
         numObjects = images.length;
         objectsInScene = new Array();
         focalLength = 750;
         spin = 0;
         _root.thumbnailSize = 350/((numObjects)/9);
         displayPane = function () {
              var angle = this.angle+spin;
              var x = Math.cos(angle)*this.radius;
              var z = Math.sin(angle)*this.radius;
              var y = this.y;
              var scaleRatio = focalLength/(focalLength+z);
              this._x = x*scaleRatio;
              this._y = y*scaleRatio;
              this._xscale = -(this._yscale=100*scaleRatio);
              this._xscale *= Math.sin(angle);
              this.swapDepths(Mat h.round(-z));
         angleStep = 2*Math.PI/numObjects;
         for (i=0; i<numObjects; i++) {
              thumbnail = thumbnails.createEmptyMovieClip("thumbnail_"+i, i);
              myPic = thumbnail.createEmptyMovieClip("picHolder", 1);
              myPic.loadMovie(ima ges[i]);
              thumbnail.angle = angleStep*i;
              thumbnail.radius = 650;
              thumbnail.x = Math.cos(thumbnail.angle)*thumbnail.radius;
              thumbnail.z = Math.sin(thumbnail.angle)*thumbnail.radius;
              thumbnail.y = 0;
              thumbnail.display = displayPane;
              thumbnail.drawBox(_ root.thumbnailSize);
              thumbnail.buttonize (i);
              thumbnail.notLoaded = true;
              objectsInScene.push (thumbnail);
         panCamera = function () {
              spin -= 0.001;
              for (var i = 0; i<objectsInScene.length; i++) {
                 & nbsp; objectsInScene[i].display();
         thumbnails.onEnterFrame = panCamera;
         _root.onEnterFrame = function() {
              for (i=0; i<images.length; i++) {
                 & nbsp; if ((_root.thumbnails["thumbnail_"+i].picHolder.getBytesLoaded()/_root.thumbnails["thumbnail_"+i].picHolder.getBytesTotal() == 1) && _root.thumbnails["thumbnail_"+i].notLoaded) {
                 & nbsp;      if (_root.thumbnails["thumbnail_"+i].picHolder._width>=_root.thumbnails["thumbnail_"+i].picHolder._height) {
                 & nbsp;           _root.thu mbnails["thumbnail_"+i].picHolder._yscale = _root.thumbnails["thumbnail_"+i].picHolder._xscale=(100*(1-(_root.thumbnails["thumbnail_"+i].picHolder._width-_root.thumbnailSize)/(_root.thumbnails["thumbnail_"+i].picHolder._width)));
                 & nbsp;           _root.thu mbnails["thumbnail_"+i].picHolder._y = (_root.thumbnailSize-_root.thumbnails["thumbnail_"+i].picHolder._height)/2;
                 & nbsp;      }
                 & nbsp;      if (_root.thumbnails["thumbnail_"+i].picHolder._width<=_root.thumbnails["thumbnail_"+i].picHolder._height) {
                 & nbsp;           _root.thu mbnails["thumbnail_"+i].picHolder._yscale = _root.thumbnails["thumbnail_"+i].picHolder._xscale=(100*(1-(_root.thumbnails["thumbnail_"+i].picHolder._height-_root.thumbnailSize)/(_root.thumbnails["thumbnail_"+i].picHolder._height)));
                 & nbsp;           _root.thu mbnails["thumbnail_"+i].picHolder._x = (_root.thumbnailSize-_root.thumbnails["thumbnail_"+i].picHolder._width)/2;
                 & nbsp;      }
                 & nbsp;      if (_root.thumbnails["thumbnail_"+i].picHolder._width == _root.thumbnails["thumbnail_"+i].picHolder._height) {
                 & nbsp;           _root.thu mbnails["thumbnail_"+i].picHolder._yscale = _root.thumbnails["thumbnail_"+i].picHolder._xscale=(100*(1-(_root.thumbnails["thumbnail_"+i].picHolder._width-_root.thumbnailSize)/(_root.thumbnails["thumbnail_"+i].picHolder._width)));
                 & nbsp;           _root.thu mbnails["thumbnail_"+i].picHolder._x = _root.thumbnails["thumbnail_"+i].picHolder._y=0;
                 & nbsp;      }
                 & nbsp;      _root.thumbnails["thumbnail_"+i].picHolder._alpha = 80;
                 & nbsp;      _root.thumbnails["thumbnail_"+i].notLoaded = false;
                 & nbsp; }
                 & nbsp; if ((_root.thumbnails["thumbnail_"+i].picHolder.getBytesLoaded()/_root.thumbnails["thumbnail_"+i].picHolder.getBytesTotal()<1)) {
                 & nbsp; }
    levTextSpace:
    // register root as environment
    Object.environment = _root;
    // create camera object
    this.cam = {x:0, y:0, z:500, dx:0, dy:0, dz:-500};
    // set environmental constants
    this.fl = 1000;
    // create 'space' to which all words will be attached
    this.createEmptyMovieClip("space", 2);
    // center 'space' on the stage
    space._x = 800;
    space._y = 900;
    // a string of words related to the wind
    this.keywords = "no-nonsense  full-service partner  co-creation  innovation  keep it simple  technical expertise  integral design method  successful products  teamwork  designers engineers  design for (dis)assembly  sustainability  ecological  smart  ideation  feasability study  ergonomic analysis  imagineering  trade off matrix  prototyping  consultancy  technology  problemsolvers  open-minded  multi-disciplinary  imagination  creative minds  passionated  user centered  strategy  added value";
    // convert the string of words into an array of words
    this.wordList = new Array();
    this.wordList = this.keywords.split("  ");
    // create one instance for each word in the list
    for (n=0; n<this.wordList.length; n++) {
        // pick a word from the list
        var word = Object.environment.wordList[n];
    // changing the next 3 lines probably will change where the words appear
        var x = random(600)-(300);
        var y = random(400)-(200);
        var z = random(Object.environment.fl*2)-Object.environment.fl;
        // create an instance of the keyWord object
        nombre = "word"+String(depth++);
        initialization = {txtword: word, x: x, y: y, z: z};
        space.attachMovie("keyWord", nombre, depth, initialization);
        trace(nombre);
    this.createEmptyMovieClip("loopMC",this.getNextHighestDepth);
    loopMC.onEnterFrame = function() {
        this.cam.dz += 5;
        // move the camera to its destination
        this.cam.x += (this.cam.dx-this.cam.x)/10;
        this.cam.y += (this.cam.dy-this.cam.y)/10;
        this.cam.z += (this.cam.dz-this.cam.z)/30;

  • Filter Source Code or Scripts in Messages

    Hello everyone,
    our customer wants to filter all mails containing source code (VBA, C++, Java etc.) or any HTML, PHP or JavaScript-Scripts on his C370 appliance.
    I was thinking about using a dictionary for this. However, creating such a dictionary myself is above me knowledge regarding those programming languages. Does anyone know where such a dictionary file can be downloaded or is there a better way for the customer to achieve this?
    Thank you and best regards,
    Bjoern

    Hi Arun,
    I did not understand how this is related to personalization.
    A user has a role assigned to him/her and is getting the source code instead of links.
    Can you please explain how reseting the personalization will help.
    And regarding the server logs, for some reason this will take some time.
    Thanks,
    Suresh

  • MXML Code Hints in Dreamweaver

    Hey folks,
    In case anyone is interested, I have created a Dreamweaver
    extension which adds the .mxml document type along with MXML tag
    code hints. Check it out, I would be interested to see the number
    of Dreamweaver folks that want this. You can get to it here:
    http://www.skipslate.com
    Brice Mason

    I wouldn't be surprised at anything in DMX, honestly. If you
    are doing alot
    of CSS work, you should be in DW8 anyhow. Is there any chance
    you can
    upgrade?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Mack Merkur" <[email protected]> wrote in
    message
    news:el69eh$bnu$[email protected]..
    > This is really strange:
    > The code hints work fine for HTML, JS, PHP and other but
    not for CSS. I
    > have
    > the code hints enabled and their delay set to 0 (zero)
    seconds. Also i try
    > to
    > force the code hints menu to pop-up by pressing
    ctrl+space but it doesn't
    > work
    > either. The CSS file is beeing created in Dreamweaver
    from scratch.
    >
    > any ideas? I really need this to work since I do tons of
    CSSing
    > lately.
    >

  • Service Template: Automatic Machine Rebooting and Script Restarting via Exit Code in Script Application

    Hello,
    My question is on Script Applications in
    Service Templates:
    In VM Templates, in the Application Configuration tab, one can add a Script Application. This can be a PowerShell script, a batch script, etc.
    For each Script Application, it is possible (via the Advanced options) to make the
    machine reboot when the script exits with one of three
    exit codes: 1641, 3010 and 3011.
    Problem:
    For PowerShell or PS scripts, if I use ‘exit 3010’, the machine should reboot but it doesn’t…
    Bad workaround:
    Use a batch script which calls the PS script. Then, exit out of the batch script using ‘exit $LASTEXITCODE’. This works. The machine reboots.
    I can’t use the workaround. Is there a way to do this using just the PS script?
    -Rohan.

    In fact yes.
    You actually want SCVMM to orchestrate the reboot by sending the proper exit code.  Otherwise SCVMM gets all weird about things.
    It is in the advanced settings for the script and / or command.
    You need to make sure that your script tosses the 3011 or 3010 on exit.
    I do it with the 3011:
    # Exit 3011
    [Environment]::Exit(“3011”)
    In the XML you will find this:
    <vmmst:RebootExitCodeRegex>{1641}|{3010}|{3011}</vmmst:RebootExitCodeRegex>
    But you do not want to enable restarting the script on each reboot or you will find yourself in a loop.
    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.

  • Web Reference inside Script Task causes Binary code for script not found error

    I am attempting to access a SOAP web API (sales force) from a SSIS package. To do this I created a script task.
    Inside the script task I went to Add Service Reference. Then I click advanced to make it a web reference. Then I point it to the WSDL file and give it a name SFEnterprise. It successfully finds and adds the Web Reference to the script task.
    I leave scriptMain.cs alone and I have no warnrings and no errors. Now in the solution explorer I right-click the script task and hit BUILD. I see the message from Output that BUILD succeeded.
    I close the VSTA script editor and now I am back on the control flow window. However I have a red X on the script task with the following message. "The Binary code for the script is not found. Please open the script in the designer by clicking EditScript
    button and make sure it builds successfully"
    But it does build successfully! And I have not even added any custom code except for the web reference using the WSDL file.
    I am using SSIS 2012 and Visual Studio 2012. I have been reading about this binary code error message on Google searches and suggestions about delay validation and turning off pre-compile do not apply to SSIS 2012.
    Is SSIS not capable of doing this?

    I was wanting to use the 2.0 coding style of accessing the soap service which is supported by adding the web reference vs. adding a service reference. But using a service reference instead of web reference actually allows the script task to compile. This
    is really odd behavior. I wonder why one works and not the other.
    Changing my C# code over to service reference coding style to access the SOAP service was still returning an error. When I added a break point I found the error message "Could not find default endpoint element that references contract in the ServiceModel
    client configuration section"when calling new SoapClient();
    I found this page http://www.sqlis.com/sqlis/post/Where-is-my-appconfig-for-SSIS.aspx and after I copied the System.ServiceModel app settings from the script task app.config to the DTSDebugHost.exe.config it was able to successfully login to the endpoint
    during package debug mode.
    This means I will have to edit the SQL Server DTS config files on the prod SSIS server to get the package to actually run in the job agent.
    So for now I am good I think just plugging away at coding what the script task is actually supposed to do now that is can actually login.

  • Testing swc and mxml code

    Hi,
    I have some software classes to run commands on any mxml file.
    These classes are wrapped in a SWC file. This SWC file is referenced by any sample mxml application (by adding as SWC file).
    My problem is that I want to test these software classes against my sample mxml file. That is, I should test methods run by software classes on the mxml file.
    How can I accomplish this?
    Thanks,
    Pradeep

    Well,
    I am writing an agent to test Flex apps, similar to QTP,FunFX and FlexMonkey.
    So obviously this agent (library compiled to a SWC) can be linked and used to test any mxml project.
    I've developed some part of the agent and have a sample mxml file with all the components thrown in.
    The mxml file doesnt lead to any other file...it has just components to be tested.
    So I want to test my agent against this mxml file, for test driven development(TDD).
    I want to create a separate project to test my agent(library) and the sample mxml file.
    How can I achieve this?
    Thanks,
    Pradeep.
    PS: The library is a bit too big and complicated to be provided as a code snippet.

  • Coldfusion doesnt parse code when script is requested by flash

    I have coldfusion developer running on my localhost as a
    module in apache.
    I have an swf that calls a cfm file that pulls from the
    database and outputs xml.
    When I request the cfm file using a browser, coldfusion does
    its thing. But when I call the cfm file from flash, the cf code
    isnt run before it's served up, so I get the cf source code. It
    runs fine when on the remote server, which is running enterprise on
    IIS.
    Is there a setting in cf for types of hosts to parse for? Or
    is it something I have to change in my apache config?

    oooo nevermind
    I was requesting it as just a regular file, when requesting
    it from within the flash IDE, but once I put the flash in the html
    and went to the html page in my browser, it was requesting it on
    the server, so then it parsed!
    shouldve called '
    http://localhost/ajax.cfm',
    not '../ajax.cfm'

  • HOW TO FIND T-CODES FOR SCRIPT FORMS?

    HI EVERY BODY,
    "ME9F" IS THE T-CODE FOR PRINTING "MEDRUCK" FORM ALONG WITH THE DATA FROM PRINT PROGRAM.
    LIKE WISE WHAT ARE ALL THE OTHER T-CODES FOR SAP PROVIDED FORMS. PLEASE LET ME KNOW HOW TO FIND THESE T-CODES?
    THANKS IN ADVANCE,
    REGARDS,
    MOUNIKA.

    Hi Mounika,
    Please check this transaction as well.
    ME9A  - Message Output: RFQs                 
    ME9E  - Message Output: Sch. Agmt. Schedules 
    ME9F  - Message Output: Purchase Orders      
    ME9K  - Message Output: Contracts            
    ME9L  - Message Output: Sched. Agreements    
    PJNA  - Message Output                       
    WLN14 - Message Output Agency Documents      
    WLN15 - Message Output for List Documents   
    Hope this will help.
    Regards,
    Ferry Lianto

Maybe you are looking for