Aligning object to stage with actionscript

I have a dynamic text box pulling info from an xml file.
After the text loads the box resizes with autoSize.
Any ideas on how i can get the box to align to the center of
the stage after that with actionscript??
I've looked around and can't seem to find a solid yes or no
anywhere.
Or if that's impossible, is there any way to vertically align
the text, which would negate the need for the resize and align.
Thanks

nevermind....
worked a little more and got it to work with
mc_text.desc_txt._y=(Stage.height/2)-mc_text.desc_txt._height/2;

Similar Messages

  • Hide ou show objects on stage with actionscript...

    hi...
    I made a simple flash jukebox and i want the music buttons to
    appear as the mp3 files are loaded.
    This is the script i wrote:
    if(_framesloaded > 4)
    _root.musica1.visible = true; //musica1 movieclip instance
    name
    else _root.musica1.visible = false;
    if(_framesloaded > 8465)
    _root.musica2bt.visible = true; //musica2bt music button
    instance name
    else _root.musica2bt.visible = false;
    but it's not working...when the flash movie starts and when i
    run the download simulator all the buttons appear.

    already tried that :-( and it still doesn't work...
    so i changed the script to:
    if(_framesloaded > 5)
    _root.musica1._alpha = 100;
    } else {
    _root.musica1._alpha = 0;
    if(_framesloaded > 8465)
    _root.musica2bt._alpha = 100;
    } else {
    _root.musica2bt._alpha = 0;
    but i bounced into another problem, it will only do the test
    on the first frame, and i want it to change whenever the frame is
    loaded.
    Example:
    I have a 500frame timeline;
    The above code is on the first frame and the referenced frame
    is not loaded, but when i enter the 50frame the referenced frame my
    already be loaded but the object will still be hidden :-(
    how can i resolve this?
    how can i do that?

  • Aligning objects on stage throughout timeline

    I am new to Flash and am probably missing the obvious.
    I want to select objects on the stage and move them to a new
    position, or align them to a guide line. However, I want to do this
    for a whole series of frames in the timeline. In essence, select
    all frames in the timeline, and then select all objects on the
    stage, and align them to the left side and top side.
    However, it seems to only align objects in the current frame.
    I started with one circle on stage, then added more keyframes
    in the timeline, changing the color of the fill at different
    keyframes.
    Is there another way to do what I want?
    Thanks,
    Patrik

    I found it...Edit Multiple Frames.

  • Aligning objects in DW with CSS

    I can not seem to line up my graphics. I am new to CSS. I used one of the CSS templates from DW.
    Here is my site: http://charitybiblechurch.com/index2.html
    I made the background black (temporarily) so you could see where the objects are not touching.
    If you look at index.htm on the same site, this is what it should look like. Index.htm is just a jpg inside an html (a temporary fix)
    Any help would be appreciated.
    Thank you,
    MWG

    Copy & paste this code into a new document.  Note: I changed images to absolute URLs so I could see them.  You can change them back.
    <!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>Charity Bible Church, Caledonia, NY</title>
    <style type="text/css">
    /**zero out default browser values on everything**/
    * {margin:0; padding:0}
    body  {
    margin:0 auto;
    padding:0;
    font: 100% Verdana, Arial, Helvetica, sans-serif;
    margin: 0 auto;
    background-color: #590302;
    #container {
    overflow: hidden; /**for float containment**/
    background-color: #D4D4D4;
    width: 862px;
    margin: 0 auto;
    padding: 0;
    #container h1, #container h2 {font-size: xx-small; text-indent: -99999px;}
    #header {
    margin:0;
    padding:0;
    #sidebar1 {
    margin:0;
    padding:0;
    float: right;
    #mainContent {
    margin:0;
    padding:0;
    float: left;
    width: 570px;
    #footer {
    padding: 0;
    margin:0;
    #footer h3, #footer address {
    font-size: x-small;
    text-align:center;
    color: #641415;
    padding: 5px
    .fltrt {
    float: right;
    .fltlft {
    float: left;
    .clearfloat {
    clear:both;
    height:0;
    font-size: 1px;
    line-height: 0px;
    </style>
    <!--[if IE]>
    <style type="text/css">
    /* place css fixes for all versions of IE in this conditional comment */
    #mainContent { zoom: 1; }
    /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
    </style>
    <![endif]-->
    </head>
    <body>
    <div id="container">
    <h1>Charity Bible Church of Caledonia, NY</h1>
    <h2>Serving the Caledonia area with Truth, Love and Compassion</h2>
    <div id="header">
    <img src="http://charitybiblechurch.com/images/header.jpg" width="862" height="176" alt="header" />
    <!-- end #header --></div>
    <div id="mainContent">
    <p><img src="http://charitybiblechurch.com/images/main.jpg" width="570" height="329" alt="main" /></p>
    <p><img src="http://charitybiblechurch.com/images/heaven.jpg" width="293" height="70" alt="heaven" /><img src="http://charitybiblechurch.com/images/sermons.jpg" width="277" height="70" alt="listen to sermons" /></p>
    <!--end #mainContent --></div>
    <div id="sidebar1">
    <p><img src="http://charitybiblechurch.com/images/times.jpg" width="291" height="198" alt="times" /></p>
    <p><img src="http://charitybiblechurch.com/images/map.jpg" width="291" height="66" alt="map" /></p>
    <p><img src="http://charitybiblechurch.com/images/blog.jpg" width="291" height="65" alt="blog" /></p>
    <p><img src="http://charitybiblechurch.com/images/about.jpg" width="291" height="70" alt="about us" /></p>
    <!-- end #sidebar1 --></div>
    <hr class="clearfloat" />
    <div id="footer">
    <h3>&copy; 2011 Charity Bible Church</h3>
    <address>
    3164 State St. 
    Caledonia, NY  14423<br />
    PHONE: <a href="tel:585-502-8387">585-502-8387</a>
    <a href="mailto:[email protected]">E-Mail</a>
    </address>
    <!-- end #footer --> </div>
    <!-- end #container --> </div>
    </body>
    </html>
    Incidentally, using all images and no text isn't a good idea.  Images can't be read by translators, screen readers and search engines.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • Can't access object using "id" or "name" if created with actionscript

    How can you register an instance of an object with actionscript so that it's id or name value is accessible?
    I included a simple example where a Button is created using mxml and in the same way it is created using actionscript.  The actionscript object is inaccessible using it's "id" and "name" property.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
                   creationComplete="application1_creationCompleteHandler(event)">
        <fx:Script>
            <![CDATA[
                import mx.events.FlexEvent;
                protected function application1_creationCompleteHandler(event:FlexEvent):void
                    import spark.components.Button;
                    var asBtn:Button = new Button();
                    asBtn.label = "actionscript";
                    asBtn.x = 200;
                    asBtn.id = "asButton";
                    asBtn.name = "asButtonName";
                    addElement(asBtn);
                    trace("mxmlButton="+this["mxmlButton"].label); // returns: mxml  label
                    //trace("mxmlButton="+this["asButton"].label); // returns runtime error: ReferenceError: Error #1069: Property asButton not found on TestId and there is no default value.
                    //trace("mxmlButton="+this["asButtonName"].label); // returns runtime error: ReferenceError: Error #1069: Property asButtonName not found on TestId and there is no default value.
            ]]>
        </fx:Script>
        <s:Button
            id="mxmlButton"
            label="mxml label"
            alpha="0.8"/>
    </s:Application>

    Hi Dan,
    It is a very rare occurrence when I miss not being able to access an object (object property, really) using the ["name"] notation for objects created using actionscript.
    In MXML the compiler is conveniently adding an attribute to the class with the same name as the id, so you can conveniently refer to it using the [] notation. While we explicitly specify an application container to use, the MXML compiler creates a custom container which is a derivative of the base container and to that it adds properties for the children declared in MXML. I guess it also effectively calls "addElement" for us when  the container is being constructed.
    Your example assumes that using "addElement" to add the button to the application container is the same as declaring a variable (ie property ). It isn't, so there's no point in looking for an property of the name "as3Button" using the [] notation, because it doesn't exist. The container is managing a collection of children in it's display list and that's not the same as being accessible as properties of the container.
    Generally speaking, accessing properties using the ["name"] syntax isn't necessary.
    Paul
    [edit: you may wonder why "addElement" doesn't conveniently also add the "id" attribute to be an property of the container class. Unfortunately, it can't because the container class would need to be dynamic and it's not. A further complication would be that adding properties at runtime would invite naming clashes at runtime with associated mayhem. MXML can do this because the compiler generates the class and can trap name duplication at compile time.
    Great question, BTW.
    -last edit changed my "attributes" to be "properties" in line with Adobe's terminology]

  • How can I move two figures on the stage with remote shared object?

    Hi, I have a problem...
    I need to move two figures on the stage with shared object like the "Tutorial shared Object ball" on the adobe website but with more than one figure. All the client must see the figures moving. The figure are a circle (Cerchio) and a square (Quadrato).
    Help me, please. This is the script:
    package
      import flash.display.Sprite;
      import flash.net.SharedObject;
      import flash.events.NetStatusEvent;
      import flash.events.SyncEvent;
      import flash.net.NetConnection;
      import flash.events.MouseEvent;
      import flash.display.MovieClip
      //import flash.net.ObjectEncoding;
      public class BlocchiLogici extends Sprite
            private var pointer_so:SharedObject;
            private var pointer1_so:SharedObject;
            private var nc:NetConnection;
            private var good:Boolean;
            private var Cerchio:cerchio;
            private var Quadrato:quadrato;
            private var Rettangolo:rettangolo;
            private var Triangolo:triangolo;
            public function BlocchiLogici()
                 //NetConnection.defaultObjectEncoding=flash.net.ObjectEncoding.AMF0;
                 //Connect
                 var rtmpNow:String="rtmp://192.168.1.66/BlocchiLogici";
                 nc=new NetConnection  ;
                 nc.connect (rtmpNow);
                 nc.addEventListener (NetStatusEvent.NET_STATUS,doSO);
                 Cerchio=new cerchio ;
                 addChild (Cerchio);
                 Cerchio.x=50;
                 Cerchio.y=200;
                 Cerchio.addEventListener (MouseEvent.MOUSE_DOWN,beginDrag);
                 Cerchio.addEventListener (MouseEvent.MOUSE_UP,endDrag);
                 Quadrato=new quadrato ;
                 addChild (Quadrato);
                 Quadrato.x=100;
                 Quadrato.y=200;
                 Quadrato.addEventListener (MouseEvent.MOUSE_DOWN,beginDrag);
                 Quadrato.addEventListener (MouseEvent.MOUSE_UP,endDrag);
            private function doSO (e:NetStatusEvent):void
                 good=e.info.code == "NetConnection.Connect.Success";
                 if (good)
                       //Shared object
                       pointer_so=SharedObject.getRemote("point",nc.uri,false);
                       pointer_so.connect (nc);
                       pointer_so.addEventListener (SyncEvent.SYNC,doUpdate);
            private function doUpdate (se:SyncEvent):void
                 for (var cl:uint; cl < se.changeList.length; cl++)
                       trace(se.changeList[cl].code);
                       if (se.changeList[cl].code == "change")
                           if (Cerchio)
                            switch (se.changeList[cl].name)
                                 case "xpos" :
                                       Cerchio.x=pointer_so.data.xpos;
                                       break;
                                 case "ypos" :
                                       Cerchio.y=pointer_so.data.ypos;
                                       break;
                        else if (Quadrato)
                               switch (se.changeList[cl].name)
                                 case "xpos" :
                                       Quadrato.x=pointer_so.data.xpos;
                                       break;
                                 case "ypos" :
                                       Quadrato.y=pointer_so.data.ypos;
                                       break;
            private function beginDrag (e:MouseEvent)
                if (Cerchio)
                     Cerchio.addEventListener (MouseEvent.MOUSE_MOVE,moveMc);
                     Cerchio.startDrag ();
                else if (Quadrato)
                     Quadrato.addEventListener (MouseEvent.MOUSE_MOVE,moveMc);
                     Quadrato.startDrag ();
            private function endDrag (e:MouseEvent)
                if (Cerchio)
                     Cerchio.stopDrag ();
                else if (Quadrato)
                     Quadrato.stopDrag ();
            private function moveMc (e:MouseEvent)
                e.updateAfterEvent ();
                if (Cerchio)
                     pointer_so.setProperty ("xpos",Cerchio.x);
                     pointer_so.setProperty ("ypos",Cerchio.y);
                else if (Quadrato)
                     pointer_so.setProperty ("xpos",Quadrato.x);
                     pointer_so.setProperty ("ypos",Quadrato.y);
    I need of a server side file?
    Thanks.

    I solved it!!
    I duplicated the script....
    It's work perfectly..
    Emiliano.

  • Accessing shape data with actionscript

    Hello.
    I'm wondering, is it possible to access shape data with
    actionscript. I want to draw simple lines with "line tool"
    somewhere in my movieclip and then to access information about my
    lines with actionscript to get startX, startY and endX endY of
    every line. Is it possible?
    thank you.

    I do not believe so. Once you draw a primitive on the stage
    with the api I believe that is all you get. If you create a sprite
    object and then draw into that you might be able to get the sprite
    properties. You may also be able to do the same thing with a
    container movieclip. I don't think just drawing a line with the api
    on the stage will give you anything the reference.

  • Stop and Play All Child MovieClips in Flash with Actionscript 3.0

    I am stuck with the ActionScript here. I have a very complex animated flash movie for eLearning. These contain around 10 to 15 frames. In each frame I am having multiple movie clip symbols. The animation has been created using a blend of scripting and also normal flash animation.
    Now I want to create pause and play functionality for the entire movie. I was able to create the pause function but when i try to play the movie it behaves very strange.
    I was able to develop the pause functionality by refering to the below mentioned links:
    http://www.unfocus.com/2009/12/07/stop-all-child-movieclips-in-flash-with-actionscript-3-0 /
    http://www.curiousfind.com/blog/174
    Any help in this regard is highly appreciated as i am approaching a deadline.
    I am pasting the code below:
    import flash.display.MovieClip;
    import flash.display.DisplayObjectContainer;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    import fl.transitions.*;
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    import fl.transitions.TweenEvent;
    import flash.events.Event;
    import flash.events.MouseEvent;
    stop();
    // function to stop all movieclips
    function stopAll(content:DisplayObjectContainer):void
        if (content is MovieClip)
            (content as MovieClip).stop();
        if (content.numChildren)
            var child:DisplayObjectContainer;
            for (var i:int, n:int = content.numChildren; i < n; ++i)
                if (content.getChildAt(i) is DisplayObjectContainer)
                    child = content.getChildAt(i) as DisplayObjectContainer;
                    if (child.numChildren)
                        stopAll(child);
                    else if (child is MovieClip)
                        (child as MovieClip).stop();
    // function to play all movieclips
    function playAll(content:DisplayObjectContainer):void
        if (content is MovieClip)
            var movieClip:MovieClip = content as MovieClip;
            if (movieClip.currentFrame < movieClip.totalFrames) // if the main timeline has reached the end, don't play it
       movieClip.gotoAndPlay(currentFrame);
        if (content.numChildren)
            var child:DisplayObjectContainer;
            var n:int = content.numChildren;
            for (var i:int = 0; i < n; i++)
                if (content.getChildAt(i) is DisplayObjectContainer)
                    child = content.getChildAt(i) as DisplayObjectContainer;
                    if (child.numChildren)
                        playAll(child);
                    else if (child is MovieClip)
                        var childMovieClip:MovieClip = child as MovieClip;
                        if (childMovieClip.currentFrame < childMovieClip.totalFrames)
          //childMovieClip.play();
          childMovieClip.play();
    function resetMovieClip(movieClip:MovieClip):MovieClip
        var sourceClass:Class = movieClip.constructor;
        var resetMovieClip:MovieClip = new sourceClass();
        return resetMovieClip;
    pauseBtn.addEventListener(MouseEvent.CLICK, onClickStop_1);
    function onClickStop_1(evt:MouseEvent):void
    MovieClip(root).stopAll(this);
    myTimer.stop();
    playBtn.addEventListener(MouseEvent.CLICK, onClickPlay_1);
    function onClickPlay_1(evt:MouseEvent):void
    MovieClip(root).playAll(this);
    myTimer.start();
    Other code which helps in animating the movie and other functionalities are as pasted below:
    stage.addEventListener(Event.RESIZE, mascot);
    function mascot():void {
    // Defining variables
    var mc1:MovieClip = this.mascotAni;
    var sw:Number = stage.stageWidth;
    var sh:Number = stage.stageHeight;
    // resizing movieclip
    mc1.width = sw/3;
    mc1.height = sh/3;
    // positioning mc
    mc1.x = (stage.stageWidth/2)-(mc1.width/2);
    mc1.y = (stage.stageHeight/2)-(mc1.height/2);
    // keeps the mc1 proportional
    mc1.scaleX <= mc1.scaleY ? (mc1.scaleX = mc1.scaleY) : (mc1.scaleY = mc1.scaleX);
    stage.removeEventListener(Event.RESIZE, mascot);
    mascot();
    this.mascotAni.y = 100;
    function mascotReset():void
    // Defining variables
    var mc1:MovieClip = this.mascotAni;
    stage.removeEventListener(Event.RESIZE, mascot);
    mc1.width = 113.45;
    mc1.height = 153.85;
    mc1.x = (stage.stageWidth/2)-(mc1.width/2);
    mc1.y = (stage.stageHeight/2)-(mc1.height/2);
    // keeps the mc1 proportional
    mc1.scaleX <= mc1.scaleY ? (mc1.scaleX = mc1.scaleY) : (mc1.scaleY = mc1.scaleX);
    var interval:int;
    var myTimer:Timer;
    // function to pause timeline
    function pauseClips(secs:int, myClip:MovieClip):void
    interval = secs;
    myTimer = new Timer(interval*1000,0);
    myTimer.addEventListener(TimerEvent.TIMER, goNextFrm);
    myTimer.start();
    function goNextFrm(evt:TimerEvent):void
      myTimer.reset();
      myClip.nextFrame();
      myTimer.removeEventListener(TimerEvent.TIMER, goNextFrm);
    // function to pause timeline on a particular label
    function pauseClipsLabel(secs:int, myClip:MovieClip, myLabel:String):void
    interval = secs;
    myTimer = new Timer(interval*1000,0);
    myTimer.addEventListener(TimerEvent.TIMER, goNextFrm);
    myTimer.start();
    function goNextFrm(evt:TimerEvent):void
      myClip.gotoAndStop(myLabel);
      myTimer.removeEventListener(TimerEvent.TIMER, goNextFrm);
    MovieClip(root).pauseClips(4.5, this);
    // function to fade clips
    function fadeClips(target_mc:MovieClip, next_mc:MovieClip, from:Number, to:Number):void
    var fadeTW:Tween = new Tween(target_mc, "alpha", Strong.easeInOut, from, to, 0.5, true);
    fadeTW.addEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    function fadeFinish(evt:TweenEvent):void
      next_mc.nextFrame();
      fadeTW.removeEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    // function to fade clips with speed
    function fadeClipsSpeed(target_mc:MovieClip, next_mc:MovieClip, from:Number, to:Number, speed:int):void
    var fadeTW:Tween = new Tween(target_mc, "alpha", Strong.easeInOut, from, to, speed, true);
    fadeTW.addEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    function fadeFinish(evt:TweenEvent):void
      next_mc.nextFrame();
      fadeTW.removeEventListener(TweenEvent.MOTION_FINISH, fadeFinish);
    // function to show screen transitions
    function screenFx(target_mc:MovieClip, next_mc:MovieClip):void
    //var tweenTW:Tween = new Tween(target_mc,"alpha",Strong.easeInOut,0,1,1.2,true);
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Iris, direction:Transition.OUT, duration:1.2, easing:Strong.easeOut, startPoint:5, shape:Iris.CIRCLE});
    tranFx.addEventListener("allTransitionsOutDone",doneTrans);
    function doneTrans(evt:Event):void
      next_mc.nextFrame();
      tranFx.removeEventListener("allTransitionsOutDone",doneTrans);
    // function to show screen transitions inverse
    function screenFxInv(target_mc:MovieClip, next_mc:MovieClip):void
    var tweenTW:Tween = new Tween(target_mc,"alpha",Strong.easeInOut,0,1,1.2,true);
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Iris, direction:Transition.IN, duration:2, easing:Strong.easeOut, startPoint:5, shape:Iris.SQUARE});
    tranFx.addEventListener("allTransitionsInDone",doneTrans);
    function doneTrans(evt:Event):void
      next_mc.nextFrame();
      tranFx.removeEventListener("allTransitionsInDone",doneTrans);
    // function to zoom in
    function zoomFx(target_mc:MovieClip):void
    //var tweenTW:Tween = new Tween(target_mc,"alpha",Strong.easeInOut,0,1,1.2,true);
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Zoom, direction:Transition.IN, duration:3, easing:Strong.easeOut});
    //tranFx.addEventListener("allTransitionsInDone",doneTrans);
    /*function doneTrans(evt:Event):void
      next_mc.nextFrame();
    // Blinds Fx
    function wipeFx(target_mc:MovieClip):void
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Wipe, direction:Transition.IN, duration:3, easing:Strong.easeOut, startPoint:9});
    // Blinds Fx Center
    function fadePixelFx(target_mc:MovieClip):void
    var tranFx:TransitionManager = new TransitionManager(target_mc);
    tranFx.startTransition({type:Fade, direction:Transition.IN, duration:1, easing:Strong.easeOut});
    tranFx.startTransition({type:PixelDissolve, direction:Transition.IN, duration:1, easing:Strong.easeOut, xSections:100, ySections:100});

    This movie is an animated movie from the start to end. I mean to say that though it stops at certain keyframes in the timeline it stops for only a certain time and then moves on to the next animation sequence.
    Its not an application where the user can interact.
    On clicking the play button i want the movie to play normally as it was playing before. If the user has not clicked on the pause button it would anyhow play from start to finish.
    Is there anyway where i could send in the fla file?

  • Change the "Font size" in a TLF Textfield with actionscript?

    I could not realize how should I resize my TLF Textfiels in flash cs6 with actionscript??
    None of these worked:
    if (....)
         myTLFText.textSize++;
         myTLFText.fontSize++;
    Error: Access of possibly undefined property size through a reference with static type fl.text:TLFTextField.
    I appreciate your kind help please??

    Here is the part of code I am using to resize the textfield (and other elements).
    /******SET POSITION**********/
    function setPosition():void
          //Position appBG
          appBG.height = stage.stageHeight;
          appBG.width = appBG.height;
          //Fit the appTXT in middle of screen  (AppTXT is a MovieClip contains sourceText - RTLTextField)
          appTXT.sourceText.width = stage.stageWidth * 0.9;
          appTXT.sourceText.x = stage.stageWidth * 0.05;
          appTXT.sourceText.y = stage.stageHeight * 0.1;
          //Fit the maskText layer on top of text;
          maskText.width = appTXT.sourceText.width;
          maskText.height = stage.stageHeight * 0.8;
          maskText.x = stage.stageWidth * 0.05;
          maskText.y = stage.stageHeight * 0.1;
          //Set buttons in their proper position
          if (stage.stageWidth > stage.stageHeight)
                appBG.width = stage.stageWidth;
                appBG.height = appBG.width;
          appBG.x = stage.stageWidth / 2;
          appBG.y = stage.stageHeight / 2;
    Everything works fine, but when I install the apk on my Google nexus (800x1280), the font size looks VERY SMALL and I can hardly read it!
    If I increase the Font size pt (Red Arrow in above PrntScr) to 40. then it reads perfect on phones with 800x1280 screen size. Ok?  But then any OTHER smaller screen cell phones will see the font TOO BIG!
    So I need to set the Font size pt by CODE based on a percent of stageWidth to could solve this. thx.

  • Indesign CS5 - how to align objects

    Dear All,
    I have a problem with Indesign that is present from CS2 trough CS3 & CS4 version. I thought that CS5 version finaly will solve this issue, but it seems to me that nothing changed.
    When we have to align two objects lets say in Illustrator,  we may always mark the reference object by second click (then it is locked). In different software the sequence of marking objects for aligment is important (even better solution in my opinion than in Illustartor). But in Indesign things work different. If we align objects to the top - the most top object is reference. When we align to the left the object most to left is the base for aligment.
    I think that everyone learned to live with that by right placing the objects before aligment. Sometimes by centering (in past versions) we were forced to lock one of the objects before aligment. But now in CS5 locked object is not selectable. Besides that I never liked this long "work around" method.
    My question is how to easy align vertical centres of the objects shown on the picture below when I want object A to stay on place and object B to be centered to A. I don't want to use smart guides.
    Paul

    Hello Peter,
    thank you for fast feedback. I appreciate it.
    I don't want to use smartguides because when there are more objects around it will be confusing to guess if you have right center or not.
    Changing preferences for locked objects will not help much I guess. I like the way the locked objects are unselctable now and of course, as you mentioned, it is time consuming way to go.
    The case is, that I would like Adobe to add this issue to the wish list. If this "double click" way is good for Illustrator, why it is not implemented in Indesign, forcing users to use some magical, time consuming, workarounds.
    To be honest, I hopped that I miss the point in this case and someone will tell me some obvious shortcut to use by selecting the objects to get the things right.
    Paul

  • Code 91 - Caused Error: (Object variable or With block variable not set)

    Hi,
    We are using FDM 9.3.1. We have enabled batch processing.
    We are having following process being followed
    - Batch Loader script will pull the data from dwh table for each entity, scenario, year and period
    - Batch processing is set to serial and processlevel set to Up-To-Check
    - We had following five files created for Location - EMAFF100
    i. 1_EMAFF100_ACT_May-2011_RR.txt
    ii. 1_EMAFF100_ACT_Jun-2011_RR.txt
    iii. 1_EMAFF100_ACT_Jul-2011_RR.txt
    iv. 1_EMAFF100_ACT_Aug-2011_RR.txt
    v. 1_EMAFF100_ACT_Sep-2011_RR.txt
    Batch loader process completed the processing for May - 2011, Jul - 2011, Aug-2011, Sep-2011.
    But for Jun 2011 it has given the following error in the 'tbatchinformation' table and failed at import stage.
    40751.6239236111 1_EMAFF100_ACT_JUN-2011_RR.TXT 2 2 91-Object variable or With block variable not set
    When we checked the view error log from tool menu we found following
    ** Begin FDM Runtime Error Log Entry [2011-07-27-14:58:29] **
    ERROR:
    Code......................................... 91
    Description.................................. File [1_EMAFF100_ACT_Jun-2011_RR.txt] Caused Error: (Object variable or With block variable not set)
    Procedure.................................... clsBatchLoader.mFileCollectionProcess
    Component.................................... upsWBatchLoaderDM
    Version...................................... 931
    Thread....................................... 5600
    IDENTIFICATION:
    User......................................... ncreighton
    Computer Name................................ HYAPSDEV1
    App Name..................................... EMATTEST
    Client App................................... WebClient
    CONNECTION:
    Provider..................................... ORAOLEDB.ORACLE
    Data Server..................................
    Database Name................................ hydev_serv
    Trusted Connect.............................. False
    Connect Status.. Connection Open
    GLOBALS:
    Location..................................... EMAFF100
    Location ID.................................. 762
    Location Seg................................. 16
    Category..................................... ACT
    Category ID.................................. 13
    Period....................................... Jun - 2011
    Period ID.................................... 30/06/2011
    POV Local.................................... False
    Language..................................... 1033
    User Level................................... 1
    All Partitions............................... False
    Is Auditor................................... False
    We then re submitted data for Jun period and saw batch process got successfully completed and June data got imported successfully and also rest other processes got through.
    Can any one provide exact cause for this error? As we have automated the data load from DWH to FDM And then to HFM. Hence when such error comes it disturbs lot of processing there on. Appreciate your early response.
    Thanks in advance.

    Hi SAP collegues,
    At my site, BPC Excel created this problem too "Object Variable or With Block Variable not set" .
    It turned out that this is symptom of a a dys-functioning BPC COM Plug-in in XL2007 or XL2010!
    This is a consequence that your Excel recently crashed while using BPC. And it relates to an Excel Add-in becoming disabled when the applications crashes.  Please check the following.
    Note before doing the following, close all other open Excel and BPC sessions.
    Within Excel go to File à Options
    Select the Add-Ins option on the left
    Select the <<COM Add-ins >> option in the Manage drop down, and click Go
    Make sure that the Planning and Consolidation option is selected.  If not, mark this box and click OK.
    If you do not see anything listed, return to the Add-in screen and select the Disabled Items option, and see if Planning and Consolidation is listed there.
    Let me know if you have any queries,
    Kind Regards,
    robert ten bosch

  • Animating a button with actionScript

    I'm fairly stumped on this one - but probably quite simple to fix.
    I need to animate the scale of a button with actionScript 2.0. I've inherited a project that was done with actionScript 2.0 and have decided to stay with this generation rather than rewrite the whole project. Anyway - I've created a sound object, it plays audio from the library and 3 seconds after it starts playing, I want to animate the "next" button and make it pulse to attract the users attention.
    Doing this by putting the button in a movie clip is not working as I am losing it's button states and besides it's probably far more tighter to program it.
    When the user rolls over the button it stops pulsing but still retains it's up, over and down states.
    Any easy answer?

    Thanks for your help Ned.
    I ended up making an advanced button with movie clips and using programming for all the states.
    Movies are so much easier to control than buttons.
    But you have raised something I had overlooked...setTimeout( )
    I was using setInterval( ) and then doing clearInterval( ) within the function so it would only loop once, which of course was problematic if the user beat the 'clearInterval' code by clicking on the button too early.
    Actually used setInterval( ) to delay all sound on the project - now going to re-program all that.
    Thanks

  • Resizing and positioning a stage with a background image

    Hey guys,
    I'm trying to get some specific behaviour on a stage as I think it'll work out best for the application I am doing. The module I am working on right now consists of a stage with an imageview bound to the width and height and an image inside. I'm eventually looking to setup some animations and such which will overlay on the image but I want the window to be resizable in various ways.
    Right now, when the stage is created I manually set the width and height so the image fits perfectly in the stage. For resizing, I want the user to be able to drag either the height or width or diagonal sliders but have the original aspect ratio of the stage retained. I have the preserveRatio variable set to true in the ImageView which makes the image not become distorted, but the stage can be extended horizontally/vertically/diagonally to any ratio which I'd rather not have. In terms of fullscreening, I'd like to allow it and have the image centred.
    I've tried to see if the LayoutInfo class can help me out, but it doesn't seem to have any implementations which are too useful for what I am trying to do. So does anyone know how I can accomplish the above? I'm very new to JavaFX so if anyone can make any other suggestions in terms of the objects I am using and what's best practices for what I am trying to do, it would be much appreciated. I've looked into using PathAnimation and PathTransition for the animations I am using and while they'd do most of the job well, I need to be able to place objects, modify speeds, locations etc. so I'll probably just end up making some custom drawing methods.
    Thanks in advance,

    Similar request in [JavaFX rezising-scaling scene & elements|http://forums.sun.com/thread.jspa?threadID=5437642]...
    Mmm, I made various experiments. The difficulty is to watch both dimensions, because when one change, the other must be changed as well, but the watch is then triggered, making a cascade of changes... I solved it (partly) with a boolean disabling the secondary change.
    def image = Image
        url: "file:///D:/images/forest_0003_1024.jpg";
        preserveRatio: true
    def startSize = image.width / 3;
    var bResizingWidth: Boolean;
    var bResizingHeight: Boolean;
    var stw = bind scene.width on replace
    println("Width -> {stw}");
        ResizeStage(true);
    var sth = bind scene.height on replace
    println("Height -> {sth}");
        ResizeStage(false);
    var scene: Scene;
    var iv: ImageView;
    def stage = Stage
        title: "Proportional Stage"
        scene: scene = Scene
            content: iv = ImageView
                image: image
                preserveRatio: true
                fitWidth: startSize
    def frames: java.awt.Frame[] = java.awt.Frame.getFrames();
    //~ println(frames[0]);
    def insets = frames[0].getInsets();
    //~ println("T={insets.top} L={insets.left} B={insets.bottom} R={insets.right} ");
    def insetX = insets.left + insets.right;
    def insetY = insets.top + insets.bottom;
    function ResizeStage(bIsWidth: Boolean): Void
        if (stage.width == 0) return; // Init, nothing to do
        if (bResizingHeight and bIsWidth) // One dim is changed, don't react on setting of other dim
            bResizingHeight = false;
            return; // Just ignore secondary change
        if (bResizingWidth and not bIsWidth) // Idem
            bResizingWidth = false;
            return; // Just ignore secondary change
        if (bIsWidth)
            bResizingWidth = true;
        else
            bResizingHeight = true;
        println("Stage: {stage.width} x {stage.height}");
        def ratio = image.width / image.height;
        if (bIsWidth)
            stage.height = scene.width / ratio + insetY;
            println("H {scene.width} -> {stage.height}");
        else
            stage.width = scene.height * ratio + insetX;
            println("W {scene.height} -> {stage.width}");
        iv.fitWidth = scene.width;
    }There are still some glitches, but it roughly works...
    [EDIT] Changed to avoid resizing the dimension that the user is changing. Result is more logical but slightly worse... (?)
    Edited by: PhiLho on 29 mai 2010 13:24

  • Generic function to place a component on the stage in ActionScript-3.0

    Hi all,
               I am new to flash and ActionScript 3.0.I am learning ActionScript 3.0.
               My requirement/need  is the AS3 code for placing any type of Component(viz., Button, CheckBox, ComboBox, ListBox, radiobutton, Slider, Scrollbar,Label,TextField, etc.,) on the stage with desired width,height, X and Y parameters(values) which we mention in "Properties" tab of Properties Window in flash.          Hence, What i need is, (say)a generic ActionScript 3.0 method/function, which places any of the components present in "Components Panel" onto the stage.
                    i.e., As per my idea, the function prototype or signature may be like this:
                         function addComponent(int <width>, int <height>, int <XPos>, int <YPos>)
               Plzzz... Can anyone help me in this context....  It is a general query i think so. i.e., A basic programmer's task for defining a function for my requirement.           I think,                if I want to add a Button onto the stage at 100,100 pixel position and the button component's width and height are 50,50 respectively, (i.e., button.X=button.Y=100 && button.width=button.height=50).
               So, a button must be placed at 100,100,             then, the sample code looks like this:
                                  Button <btn_instance> = new Button();     //creates Button instance
                                  <btn_instance>.addComponent(50,50,100,100);// properties of button.
    I hope someone will help me.
    Thanks in advance..
    Srihari.Ch

    (OTTOMH) you could have a function similar to:
    function placeComponent( container:DisplayObjectContainer, component:UIComponent, w:int, h:int, xpos:int, ypos:int ):void
      container.addChild( component );
      component.move( xpos, ypos );
      component.setSize( w, h );
    called with:
    var b:Button = new Button();
    placeComponent( this, b, 100, 20, 200, 200 );
    You were alost there

  • Can't get rid of jagged edges of aligned objects

    I have the annoying problem of jagged edges on aligned objects in Illustrator. This image demonstrates it well: http://i.imgur.com/AIyK6vK.png
    You can see the white background shining through where objects align to each other. I thought this was only a display thing which wouldn't show up on print or export, but I get the same aweful results when exporting to png, pasting as a smart object in PS etc. How do I fix this?
    Thanks!

    I've tried that aswell and it looks a bit better, but that isn't always (never?) a good solution.
    Jacob, I've had no luck with the other thread, I was already using smart guides. This is a strange problem. I've not seen a lot about this anywhere else, don't you guys have this issue?
    There is one better solution than a background layer. Select all objects and offset the path buy a very small number, maybe 0,01 mm but that is also more of a "hack" than a real solution..

Maybe you are looking for

  • Quicktime not playing Apple ProRes (Proxy) 1080p video - help!

    Hey guys I have a Apple ProRes (Proxy) 1080p video sent to me via Firevilla from a friend in the states - which simply says - "will not play - quicktime does not understand the format and may need additional software." All my software updates have be

  • Unable to start tomcat server

    hi, i want to develop simple application using servlets.i ve installed apache tomcat4.1 version.i ve compiled my servlet program successfully.but when i am trying to start tomcat server,it is showing some error.i ve set the callspath too. the error i

  • Can't input in Khmer (Cambodian) to AL32UTF8 DB from Forms 10g?

    We have a application in English. We want to sell this to a Cambodian customer. They want to enter data in BOTH English and Khmer. Our application is in Forms 10g R2 (Forms [32 Bit] Version 10.1.2.0.2 (Production)). In order to do this can we use a 1

  • Moving home movies to ipad2

    I thought moving videos (home movies) to my ipad2 would be as easy as moving photos to it but it just ain't so. In fact I can't do it.  I have my movie in .m4v which is what ipad wants but when I try to sync it with my computer via itunes, it shows u

  • Bbm/customer services

    i've knocked my bbm off by accident,however i already paid,so when i call orange costumer services to activate it again,it's telling me i need 25 pence to make the call however i dont have 25 pence on my phone as im on pay as you go? what should i do