Controlling embedded Movieclips through as3

Hi everyone!
I'm starting to learn actionscript 3 programming  and am in the process of trying to create a simple game but am having trouble getting flash to call up various movieclip states.I have a movieclip called "Player" and inside that movieclip, I have Player_Stand,Player_Hit, and Player_Walk...
While I can get the master movieclip to move, I can't get it to play the embedded movieclips when I change states. I tried a more advanced method that did work where you stick all of the animations in one movieclip and then manually tell flash to advance each frame using gotoAndStop in a loop, but it would be easier to just have seperate movieclips that I could just call from a master movieclip file. I've tried various methods to solve this including having all of the movieclips on screen and then changing their visibility but that didn't work either. I'm sure it's something extremely simple that I'm overlooking and if you can point it out to me, I'd be very grateful!
Here's the code, and I'm attaching the fla if anyone wants to look at it. I'm foregoing OOP and classes for the sake of simplicity at the beginning.
http://www.filesonic.com/file/2609121934/FightingGame.zip
package
          import flash.display.MovieClip;
          import flash.events.Event;
          import flash.ui.Keyboard;
          import flash.events.KeyboardEvent;
          public class Main extends MovieClip
                    public var player:Player;
                    public var rightIsDown:Boolean = false;
                    public var leftIsDown:Boolean = false;
                    public var upIsDown:Boolean = false;
                    public var downIsDown:Boolean = false;
                    public var dHitIsDown:Boolean = false;
                    public var wJumpIsDown:Boolean = false;
                    public var playerSpeed:Number = 2.5;
                    public function Main()
                              init();
                              addEventListener(Event.ENTER_FRAME,GameLoop);
                    private function GameLoop(event:Event)
                              controlPlayer();
                    private function init()
                              player=new Player();
                              addChild(player);
                              player.x = stage.stageWidth / 2 - 150;
                              player.y = stage.stageHeight / 2 + 150;
                              stage.addEventListener(KeyboardEvent.KEY_DOWN,keyPressed,false, 0, true);
                              stage.addEventListener(KeyboardEvent.KEY_UP,keyReleased,false, 0, true);
                    private function controlPlayer():void
                              if (leftIsDown)
                                        player.x -= playerSpeed;
                                        player.scaleX=-1;
                                        player.gotoAndPlay(20);
                              if (rightIsDown)
                                        player.x+=playerSpeed;
                                        player.scaleX=1;
                                        player.gotoAndPlay(20);
                              if (upIsDown)
                                        player.y-=playerSpeed;
                                        player.gotoAndStop(20);
                              if (downIsDown)
                                        player.y+=playerSpeed;
                                        player.gotoAndStop(20);
                              if (! leftIsDown||! rightIsDown||! upIsDown||downIsDown)
                                        player.gotoAndStop(1);
                    function keyPressed(keyEvent:KeyboardEvent)
                              if (keyEvent.keyCode==Keyboard.RIGHT)
                                        rightIsDown=true;
                              if (keyEvent.keyCode==Keyboard.LEFT)
                                        leftIsDown=true;
                              if (keyEvent.keyCode==Keyboard.UP)
                                        upIsDown=true;
                              if (keyEvent.keyCode==Keyboard.DOWN)
                                        downIsDown=true;
                              if (keyEvent.keyCode==68)
                                        dHitIsDown=true;
                    private function keyReleased(keyEvent:KeyboardEvent)
                              if (keyEvent.keyCode==Keyboard.RIGHT)
                                        rightIsDown=false;
                              if (keyEvent.keyCode==Keyboard.LEFT)
                                        leftIsDown=false;
                              if (keyEvent.keyCode==Keyboard.UP)
                                        upIsDown=false;
                              if (keyEvent.keyCode==Keyboard.DOWN)
                                        downIsDown=false;
                              if (keyEvent.keyCode==68)
                                        dHitIsDown=false;

Here's just one observation of a situation that you probably don't intend.  If any one of the keys is not being pressed, you will be in frame 1.  Your only hope of getting to frame 20 is to hold down all the buttons at the same time.
                       if (! leftIsDown||! rightIsDown||! upIsDown||downIsDown) 
                                        player.gotoAndStop(1);

Similar Messages

  • Controlling movieclip through button

    Dear all,
    I'm experiencing some problems with what I would have thought
    to be relatively simple in Flash 8.0. I would like to control a
    movieclip through a button.
    I have found some tutorials on the web but I couldn't manage
    to get anything working completely. As I understand you add a
    button and a movieclip and name both instances. The actionscript
    for the button should be something like:
    on (release) {
    butterfly-mc.stop();
    This seems to work, but when I add a second button which
    should start again, using butterfly-mc.start();, it just won't
    start again.
    I'm thinking this might be some kind of scoping problem
    (defining some local actions directly on the movieclip seems to
    work fine) and the .stop() might be stopping the complete animation
    but this is a long shot and I don't know how I could verify or
    overcome this.
    This is my first project in Flash so any hints would be very
    welcome!
    Best,
    Joris

    @adobe: if i put the button instance in a another container
    (example: _root.somemc.mybutton) the code runs in normal context
    and "this" returns really "the instance i have clicked"... -
    is it a Bug or i'm a Idiot ;)
    @Joris:
    put your instance's to stage - give them the Names you want
    and write your code somewhere on the main timeline as follow (for
    the button):
    mybutton.onRelease = function():Void{
    this._parent.butterflymc.stop();
    "mybutton" is the instanceName of your Button
    and everthing will be ok ;)...
    Sorry for my bad english... i hope someone can understand my
    question.

  • Controlling Variable Movieclips (within Variable Movieclips...)

    okay, so i have a really complicated question, but hopefully it's just complicated for me and not for you brainiacs out there. ;)
    on my main timeline there is a movieclip ("sampleMc") which contains a number of labeled frames containing movieclips of gallery images (for example "dyerBikiniMc"). in turn, each of THESE movieclips contain a number of frames of detail shots of the main image (for example "dyerBikini00Mc, dyerBikini01Mc, dyerBikini02Mc, etc.").
    on the main timeline i have a gallery navigation bar with thumbnail buttons determining which image will be displayed. there's also a right arrow shaped button "detailsBtn" that i'd like to allow the user to click frame-by-frame through the detail shots of the image. i also have a before/after toggle button on the main timeline that needs to control the movieclip one level below that, where the before/after images of that particular detail shot are stored!
    so the question is, how do i program a button to do something inside a movieclip, if the movieclip (and even its immediate parent and grandparent, for that matter) are variable?
    i hope that makes sense (it only barely does to me). i would be very grateful to get some suggestions on this!
    robin

    Yeah, I switched to the webforums too after getting to much garbage from 'rich' formatting and what not.
    Personally I would try to make updating a little as a hassle as possible. This sadly usually means doing more work to get the whole thing initially up and running. The updating and the imagesize (will the be zoomable?) you require all data to be external I suppose.
    I think I'd go for an XML file with a structure looking like:
    <samples>
        <!-- title & thumbnail for the toplevel menu -->
        <sample title="dyerBikiniMc" src="thumb_dyerBikiniMc.jpg">
            <!-- detail info, thumb, before and after -->
            <detail src="thumb_dyerBikiniMc001.jpg">
                <before src="dyerBikiniMc001B.jpg" />
                <after src="dyerBikiniMc001A.jpg" />
            </detail>       
            <!-- detail info, thumb, before and after -->
            <detail src="thumb_dyerBikiniMc002.jpg">
                <before src="dyerBikiniMc002B.jpg" />
                <after src="dyerBikiniMc002A.jpg" />
            </detail>
            <!-- etc. -->
        </sample>
    </samples>
    The main menu should filter out all the src attributes from the sample nodes and display those images.
    Once an item is shown, the submenu should filter all the src attributes from the detail nodes that belong to that particular sample.
    Once a detail is choosen, the before and after images would be loaded and shown. The last maybe just on top of each other with a button toggeling the visibility of the topmost.
    All objects below the top level menu displaying images should be made so that if they show new images, the old ones are removed/unloaded.
    It does require some code though but with the proper self defined classes it would not need to be really much.
    Alternative could be to make a self contained clip for each sample including all navigation and have the main menu load such a container as needed and unloading it when an other sample is requested.
    All loading, except for the xml loading, would be done with the Loader class.
    hth,
    Manno

  • I want to make a slideshow to view on my television with image's duration ranging from seconds to an hour or more and I want to use my iPhone or iPad mini to control the television through my Apple tv.  I've been unable to locate an app that will do this.

    I want to make a slideshow to view on my television with image's duration ranging from seconds to an hour or more and I want to use my iPhone or iPad mini to control the television through my Apple tv.
    I've been unable to locate an app that will do this.  The Photos app that comes with the phone or iPad has extremely limited duration controls.  PhotoStream seems to load everything from my phone or iPad not allowing me to just load up a set group of images.
    iPhoto for iPad is getting some terrible recent reviews.  I tried a couple other free apps but they don't use Airplay.
    I can do something like this with iPhoto and my MB Air, but it's kind of ugly to have the computer open in order to connect by Airplay to my Apple TV.  I've thought the iPad or iPhone would be a lower profile controller.
    Am I out of luck?

    Thanks for your help.  Since I'm uninterested in loading all my photos (the only option) into photostream, I won't be able to use the settings in ATV.  I guess I'm just stuck with using iPhoto on my MB Air.  Thanks again.
    paul

  • I am looking to control a 4-way hydraulic solenoid valve. Do I need a PID control toolset, or can i control the system through my 16E4 daq card and scxi chasis

    I am looking to control a 4-way hydraulic solenoid valve. Do I need a PID control toolset, or can i control the system through my 16E4 daq card and scxi chasis

    I think you're asking 2 different questions.
    The PID control toolset is for using PID loops for control; it's just software.
    The DAQ card and scxi chassis are hardware. If you have the appropriate signal conditioning cards in your chassis to control/monitor your solenoid valve, then you can run a PID loop.
    I believe the simple answer is: the PID control toolset is the best way to do control, but there are simple PID VI's (even on this website) that you can download and use for simple control.
    Mark

  • Scroll Bar Controlling multiple movieclips?

    Instead of a scroll bar just controlling one movieclip..How could we get it to control multiple movieclips?
    public class MainScroll extends Sprite
              //private var mc_content:Sprite;
              private var content_mc:MovieClip;
              private var content2_mc:MovieClip;
              private var _scrollBar:FullScreenScrollBar;
              //============================================================================================================================
              public function MainScroll()
              //============================================================================================================================
                   addEventListener(Event.ADDED_TO_STAGE, onAddedToStage, false, 0, true);
              //============================================================================================================================
              private function init():void
              //============================================================================================================================
                   SWFWheel.initialize(stage);
                   //_copy = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque quam leo semper non sollicitudin in eleifend sit amet diam. "; 
                   content_mc = new mc_content();
                   content2_mc = new mc_content2();
                   content_mc.x = 110;
                   content_mc.y = 29;
                   content2_mc.x = 10
                   content2_mc.y = 29
                   addChild(content_mc);
                   addChild(content2_mc);
                   // Scrollbar code 
                   // Arguments: Content to scroll, track color, grabber color, grabber press color, grip color, track thickness, grabber thickness, ease amount, whether grabber is "shiny"
                   _scrollBar = new FullScreenScrollBar(content_mc, 0x000000, 0x408740, 0x73C35B, 0xffffff, 15, 15, 4, true);
                   addChild(_scrollBar);
              //============================================================================================================================
              private function onAddedToStage(e:Event):void
              //============================================================================================================================
                   init();
                   removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);

    Ok,
    Here is that code:
         import flash.display.*
         import flash.events.*;
         import flash.geom.Rectangle;
         import gs.OverwriteManager;
         import gs.TweenFilterLite;
         public class FullScreenScrollBar extends Sprite
              private var _content:DisplayObjectContainer;
              private var _trackColor:uint;
              private var _grabberColor:uint;
              private var _grabberPressColor:uint;
              private var _gripColor:uint;
              private var _trackThickness:int;
              private var _grabberThickness:int;
              private var _easeAmount:int;
              private var _hasShine:Boolean;
              private var _track:Sprite;
              private var _grabber:Sprite;
              private var _grabberGrip:Sprite;
              private var _grabberArrow1:Sprite;
              private var _grabberArrow2:Sprite;
              private var _tH:Number; // Track height
              private var _cH:Number; // Content height
              private var _scrollValue:Number;
              private var _defaultPosition:Number;
              private var _stageW:Number;
              private var _stageH:Number;
              private var _pressed:Boolean = false;
              //============================================================================================================================
              public function FullScreenScrollBar(c:DisplayObjectContainer, tc:uint, gc:uint, gpc:uint, grip:uint, tt:int, gt:int, ea:int, hs:Boolean)
              //============================================================================================================================
                   _content = c;
                   _trackColor = tc;
                   _grabberColor = gc;
                   _grabberPressColor = gpc;
                   _gripColor = grip;
                   _trackThickness = tt;
                   _grabberThickness = gt;
                   _easeAmount = ea;
                   _hasShine = hs;
                   init();
                   OverwriteManager.init();
              //============================================================================================================================
              private function init():void
              //============================================================================================================================
                   createTrack();
                   createGrabber();
                   createGrips();
                   addEventListener(Event.ADDED_TO_STAGE, onAddedToStage, false, 0, true);
                   _defaultPosition = Math.round(_content.y);
                   _grabber.y = 0;
              //============================================================================================================================
              public function kill():void
              //============================================================================================================================
                   stage.removeEventListener(Event.RESIZE, onStageResize);
              //============================================================================================================================
              private function stopScroll(e:Event):void
              //============================================================================================================================
                   onUpListener();
              //============================================================================================================================
              private function scrollContent(e:Event):void
              //============================================================================================================================
                   var ty:Number;
                   var dist:Number;
                   var moveAmount:Number;
                   ty = -((_cH - _tH) * (_grabber.y / _scrollValue));
                   dist = ty - _content.y + _defaultPosition;
                   moveAmount = dist / _easeAmount;
                   _content.y += Math.round(moveAmount);
                   if (Math.abs(_content.y - ty - _defaultPosition) < 1.5)
                        _grabber.removeEventListener(Event.ENTER_FRAME, scrollContent);
                        _content.y = Math.round(ty) + _defaultPosition;
                   positionGrips();
              //============================================================================================================================
              public function adjustSize():void
              //============================================================================================================================
                   this.x = _stageW - _trackThickness;
                   _track.height = _stageH;
                   _track.y = 0;
                   _tH = _track.height;
                   _cH = _content.height + _defaultPosition;
                   // Set height of grabber relative to how much content
                   _grabber.getChildByName("bg").height = Math.ceil((_tH / _cH) * _tH);
                   // Set minimum size for grabber
                   if(_grabber.getChildByName("bg").height < 35) _grabber.getChildByName("bg").height = 35;
                   if(_hasShine) _grabber.getChildByName("shine").height = _grabber.getChildByName("bg").height;
                   // If scroller is taller than stage height, set its y position to the very bottom
                   if ((_grabber.y + _grabber.getChildByName("bg").height) > _tH) _grabber.y = _tH - _grabber.getChildByName("bg").height;
                   // If content height is less than stage height, set the scroller y position to 0, otherwise keep it the same
                   _grabber.y = (_cH < _tH) ? 0 : _grabber.y;
                   // If content height is greater than the stage height, show it, otherwise hide it
                   this.visible = (_cH + 8 > _tH);
                   // Distance left to scroll
                   _scrollValue = _tH - _grabber.getChildByName("bg").height;
                   _content.y = Math.round(-((_cH - _tH) * (_grabber.y / _scrollValue)) + _defaultPosition);
                   positionGrips();
                   if(_content.height < stage.stageHeight) { stage.removeEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelListener); } else { stage.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelListener); }
              //============================================================================================================================
              private function positionGrips():void
              //============================================================================================================================
                   _grabberGrip.y = Math.ceil(_grabber.getChildByName("bg").y + (_grabber.getChildByName("bg").height / 2) - (_grabberGrip.height / 2));
                   _grabberArrow1.y = _grabber.getChildByName("bg").y + 8;
                   _grabberArrow2.y = _grabber.getChildByName("bg").height - 8;
              //============================================================================================================================
              // CREATORS
              //============================================================================================================================
              //============================================================================================================================
              private function createTrack():void
              //============================================================================================================================
                   _track = new Sprite();
                   var t:Sprite = new Sprite();
                   t.graphics.beginFill(_trackColor);
                   t.graphics.drawRect(0, 0, _trackThickness, _trackThickness);
                   t.graphics.endFill();
                   _track.addChild(t);
                   addChild(_track);
              //============================================================================================================================
              private function createGrabber():void
              //============================================================================================================================
                   _grabber = new Sprite();
                   var t:Sprite = new Sprite();
                   t.graphics.beginFill(_grabberColor);
                   t.graphics.drawRect(0, 0, _grabberThickness, _grabberThickness);
                   t.graphics.endFill();
                   t.name = "bg";
                   _grabber.addChild(t);
                   if(_hasShine)
                        var shine:Sprite = new Sprite();
                        var sg:Graphics = shine.graphics;
                        sg.beginFill(0xffffff, 0.15);
                        sg.drawRect(0, 0, Math.ceil(_trackThickness/2), _trackThickness);
                        sg.endFill();
                        shine.x = Math.floor(_trackThickness/2);
                        shine.name = "shine";
                        _grabber.addChild(shine);
                   addChild(_grabber);
              //============================================================================================================================
              private function createGrips():void
              //============================================================================================================================
                   _grabberGrip = createGrabberGrip();
                   _grabber.addChild(_grabberGrip);
                   _grabberArrow1 = createPixelArrow();
                   _grabber.addChild(_grabberArrow1);
                   _grabberArrow2 = createPixelArrow();
                   _grabber.addChild(_grabberArrow2);
                   _grabberArrow1.rotation = -90;
                   _grabberArrow1.x = ((_grabberThickness - 7) / 2) + 1;
                   _grabberArrow2.rotation = 90;
                   _grabberArrow2.x = ((_grabberThickness - 7) / 2) + 6;
              //============================================================================================================================
              private function createGrabberGrip():Sprite
              //============================================================================================================================
                   var w:int = 7;
                   var xp:int = (_grabberThickness - w) / 2;
                   var t:Sprite = new Sprite();
                   t.graphics.beginFill(_gripColor, 1);
                   t.graphics.drawRect(xp, 0, w, 1);
                   t.graphics.drawRect(xp, 0 + 2, w, 1);
                   t.graphics.drawRect(xp, 0 + 4, w, 1);
                   t.graphics.drawRect(xp, 0 + 6, w, 1);
                   t.graphics.drawRect(xp, 0 + 8, w, 1);
                   t.graphics.endFill();
                   return t;
              //============================================================================================================================
              private function createPixelArrow():Sprite
              //============================================================================================================================
                   var t:Sprite = new Sprite();               
                   t.graphics.beginFill(_gripColor, 1);
                   t.graphics.drawRect(0, 0, 1, 1);
                   t.graphics.drawRect(1, 1, 1, 1);
                   t.graphics.drawRect(2, 2, 1, 1);
                   t.graphics.drawRect(1, 3, 1, 1);
                   t.graphics.drawRect(0, 4, 1, 1);
                   t.graphics.endFill();
                   return t;
              //============================================================================================================================
              // LISTENERS
              //============================================================================================================================
              //============================================================================================================================
              private function mouseWheelListener(me:MouseEvent):void
              //============================================================================================================================
                   var d:Number = me.delta;
                   if (d > 0)
                        if ((_grabber.y - (d * 4)) >= 0)
                             _grabber.y -= d * 4;
                        else
                             _grabber.y = 0;
                        if (!_grabber.willTrigger(Event.ENTER_FRAME)) _grabber.addEventListener(Event.ENTER_FRAME, scrollContent);
                   else
                        if (((_grabber.y + _grabber.height) + (Math.abs(d) * 4)) <= stage.stageHeight)
                             _grabber.y += Math.abs(d) * 4;
                        else
                             _grabber.y = stage.stageHeight - _grabber.height;
                        if (!_grabber.willTrigger(Event.ENTER_FRAME)) _grabber.addEventListener(Event.ENTER_FRAME, scrollContent);
              //============================================================================================================================
              private function onDownListener(e:MouseEvent):void
              //============================================================================================================================
                   _pressed = true;
                   _grabber.startDrag(false, new Rectangle(0, 0, 0, _stageH - _grabber.getChildByName("bg").height));
                   stage.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMoveListener, false, 0, true);
                   TweenFilterLite.to(_grabber.getChildByName("bg"), 0.5, { tint:_grabberPressColor } );
              //============================================================================================================================
              private function onUpListener(e:MouseEvent = null):void
              //============================================================================================================================
                   if (_pressed)
                        _pressed = false;
                        _grabber.stopDrag();
                        stage.removeEventListener(MouseEvent.MOUSE_MOVE, onMouseMoveListener);
                        TweenFilterLite.to(_grabber.getChildByName("bg"), 0.5, { tint:null } );
              //============================================================================================================================
              private function onMouseMoveListener(e:MouseEvent):void
              //============================================================================================================================
                   e.updateAfterEvent();
                   if (!_grabber.willTrigger(Event.ENTER_FRAME)) _grabber.addEventListener(Event.ENTER_FRAME, scrollContent, false, 0, true);
              //============================================================================================================================
              private function onTrackClick(e:MouseEvent):void
              //============================================================================================================================
                   var p:int;
                   var s:int = 150;
                   p = Math.ceil(e.stageY);
                   if(p < _grabber.y)
                        if(_grabber.y < _grabber.height)
                             TweenFilterLite.to(_grabber, 0.5, {y:0, onComplete:reset, overwrite:1});
                        else
                             TweenFilterLite.to(_grabber, 0.5, {y:"-150", onComplete:reset});
                        if(_grabber.y < 0) _grabber.y = 0;
                   else
                        if((_grabber.y + _grabber.height) > (_stageH - _grabber.height))
                             TweenFilterLite.to(_grabber, 0.5, {y:_stageH - _grabber.height, onComplete:reset, overwrite:1});
                        else
                             TweenFilterLite.to(_grabber, 0.5, {y:"150", onComplete:reset});
                        if(_grabber.y + _grabber.getChildByName("bg").height > _track.height) _grabber.y = stage.stageHeight - _grabber.getChildByName("bg").height;
                   function reset():void
                        if(_grabber.y < 0) _grabber.y = 0;
                        if(_grabber.y + _grabber.getChildByName("bg").height > _track.height) _grabber.y = stage.stageHeight - _grabber.getChildByName("bg").height;
                   _grabber.addEventListener(Event.ENTER_FRAME, scrollContent, false, 0, true);
              //============================================================================================================================
              private function onAddedToStage(e:Event):void
              //============================================================================================================================
                   stage.addEventListener(Event.MOUSE_LEAVE, stopScroll);
                   stage.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelListener);
                   stage.addEventListener(Event.RESIZE, onStageResize, false, 0, true);
                   stage.addEventListener(MouseEvent.MOUSE_UP, onUpListener, false, 0, true);
                   _grabber.addEventListener(MouseEvent.MOUSE_DOWN, onDownListener, false, 0, true);
                   _grabber.buttonMode = true;
                   _track.addEventListener(MouseEvent.CLICK, onTrackClick, false, 0, true);
                   removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
                   _stageW = stage.stageWidth;
                   _stageH = stage.stageHeight;
                   adjustSize();
              //============================================================================================================================
              private function onStageResize(e:Event):void
              //============================================================================================================================
                   _stageW = stage.stageWidth;
                   _stageH = stage.stageHeight;
                   adjustSize();

  • Print in A4 size paper through AS3 using Flash CS5

    Hi all,
    Is any idea to print a job in A4 paper size by defult through AS3 using Flash CS5?

    Hi Shakeel,
    I am already having customised page format .
    It works fine when I choose Standard Device type EPLQ550
          But EPLQ550 is probably not supporting Arabic text.   It Gives ########
    Thats why I changed to Standard Device type ARSWIN
        Now Arabic text looks ok..... but Printer is not getting initialised after the first check. it skps.
    Pl suggest
    Thanks
    SK

  • Ability to control LabVIEW VIs through a standard Web browser

    Ability to control LabVIEW VIs through a standard Web browser?
    Do you know where I can get information on doing this?
    I want to be able to control Labview Vis through the web.
    Best regards,
    Krispiekream
    Solved!
    Go to Solution.

    http://zone.ni.com/devzone/cda/tut/p/id/4791
    Best regards,
    Krispiekream

  • Controlling the desktop through http

    i would like to control the desktop through http. is this possible? i think the robot class can be used here but i do not know how can i connect from a different pc. i also think that i have to make a server for the pc that i want to control. can someone guide me through this? and can i view the desktop? e.g.: if a video is playing in the remote desktop, can i also see the video? thanks

    anyone?

  • BitmapData.draw() and embedded MovieClip

    I can't capture the content of an embedded MovieClip, the
    following code creates a Bitmap that shows only the results of the
    changes methods of Graphics, although the clip is correctly
    embedded. Have you tackled similar problems? Thanks.
    [Embed(source="aMovieClip.swf")]
    private static var AMovieClip:Class;
    var aMovieClip:MovieClip = new AMovieClip();
    aMovieClip.graphics.lineStyle(6, 0xff0000);
    aMovieClip.graphics.lineTo(100,100); //i don't need this, but
    this is the only things that you will see, a red line
    var bitmapData:BitmapData = new BitmapData(aMovieClip.width,
    aMovieClip.height,true, 0xFFFFFF);
    bitmapData.draw(aMovieClip);

    It seems that the functions that were failing were
    getBounds() and accessing the transform.concatenatedMatrix in the
    loaded swf in the process of preparing to draw the bitmap.

  • Can i control mt iPhone through i cloud using my laptop

    can i control mt iPhone through i cloud using my laptop

    scrapman26 wrote:
    i was told it can take between 5 and 72 hours for the carrier unlock is done.
    And have you waited that long? If not, then that's why it's not done yet.

  • Embedding fonts in AS3 with absolute paths

    I'm having difficulty embedding fonts in AS3. For instance,
    using absolute paths:
    [Embed(source="C:\WINDOWS\Fonts\CONSOLA.TTF",
    fontName="Consolas", mimeType="application/x-font-truetype")]
    ... I get the error message: "Error: unable to resolve
    'C:WINDOWSFontsCONSOLA.TTF' for transcoding.
    I'm hoping the backslashes are missing from the error just
    because the compiler doesn't return them, and not that it's losing
    them. I've tried various TTFs with the same result. Even tried
    copying code from the AS3 Cookbook letter for letter. :)
    Thoughts?

    I have a similar issue happening. I am using AS3 and have
    this code in my file:
    // package, import statements etc...
    // the line below is the problematic line
    [Embed(systemFont="..\\..\\..\\fonts\\arial.ttf",
    fontName="Arial (True Type)",
    mimeType="application/x-font-truetype")]
    // now declare my class
    public class ImageRotator extends UIComponent
    // etc.
    The class compiles fine but when I try to run it I get the
    following runtime error:
    "Error: Error #2136: The SWF file
    file:///C:/projects/photogallery_screensaver/bin/photogallery_screensaver.swf
    contains invalid data."
    I've tried several things including changing the location of
    the font file, using a different font file, embedding a systemFont.
    But I always get the same error.
    Help please!
    Thanks,
    Dan

  • Embedding Fonts in AS3

    Maybe someone here can help me understand this a bit
    better.....
    These questions are based on the AS3 Cookbook recipe 9.17
    (Embedding Fonts)...
    According to the cookbook, embedding fonts in AS3 requires
    using the [Embed] metatag "inside an AS file outside the class
    declaration". I can't figure out (based on the cookbook), what I'm
    doing wrong... I've attached my entire class so go ahead and see
    what I'm doing wrong...or not understanding here...
    It's the entire class at this point.... still migrating my
    stuff from AS2 to AS3....

    SymTsb,
    Can you provide a working AS and Fla? If not, do you mind
    posting your code? I'm having similar problems and have been
    searching for a solution for days now. I tried copying the code
    above and applying KGlad's suggestion, but it still doesn't work.
    I went to the library panel and added a new Font. In the name
    field I added "_arialBold". Then I hit OK. I then right clicked and
    selected linkage. I checked off "Export for AS"and "Export in first
    frame". In the class field I put "_arialBold". The base class was
    "flash.text.Font". In the class you created, I replaced every
    instance of the word "Vivacious" with "_arialBold". I added KGlads
    code one line after you defined the TextFormat.
    In my fla, I imported your class and then created a new
    instance of your class. I ran the file... blank screen...
    Help
    V

  • My iPad screen is extremely damaged, I need to wipe iPad clean but can't see the screen. Can I control iPad settings through my pc/iTunes?

    My iPad screen is extremely damaged, I need to wipe iPad clean but can't see the screen. Can I control iPad settings through my pc/iTunes?

    You can try an alternative.
    This is the quickest thing that came to mind, but if you want to wipe it with no care of the data on the device at all:
    Place device in recovery mode (turn off device > hold home button + plug in to iTunes (WHILE HOLDING BUTTON)).
    iTunes will give you an error saying it detected a device in recovery mode, you need to restore to use device. Restoring device is a factory reset. AKA a wipe of the device
    article for recovery mode: http://support.apple.com/kb/ht4097

  • Calling from App_Code/Data folder files through as3

    Can i call in App_Code/Data folder files through as3  ? (from Hosting server)
    Like this....
    var myXML:XML;
    var myLoader:URLLoader = new URLLoader();
    myLoader.load(new URLRequest("App_Data/xmlfile.xml"));
    myLoader.addEventListener(Event.COMPLETE, processXML);
    function processXML(e:Event):void
              myXML = new XML(e.target.data);
              mytext.text = myXML;
    or
    var myLoader:Loader = new Loader();
    var url:URLRequest = new URLRequest("App_Code/sample.swf");
    myLoader.load(url);                                  
    addChild(myLoader);
    myLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
    function ioErrorHandler(e:IOErrorEvent):void{
      trace(e.text);
    i'm getting errors.......

    this is xml error:
    Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: http://www.websitename.com/App_Data/xmlfile.xml
    this is swf error:
    SecurityError: Error #2000: No active security context.

Maybe you are looking for

  • HP All in One officejet 4630 not printing

    Hi all, I bought my officejet 4630 earlier and haven't been able to print anything at all. When I press print it sends it the document to the printer but a few minutes later comes back with an error message. It scans fine and is connected through a U

  • Apps not showing up / won't download

    Hi, I have a blackberry bold 9700 with OS 5.0.0.602 (platform 5.1.0.112) When I go into app world on the phone and I click on an app to download the screen goes blank,all i see for e.g is "WhatsApp Messenger" to the top but the rest of the screen is

  • Manipulating subject in mail using VBA

    Hi, I have the need for a VBA code for Outlook, that will take the subject line, identify a casenumber XXXX123456, and put [] on the casenumber. For example: Subjectline: Printerproblems XXXX123456 Subjectline: Printerproblems [XXXX123456] (The casen

  • Error in float value

    Hi, I am a newbie in JAVA. When I wrote the following code in java it gives me error: public class FloatTest public static void main(String[] args) float f=3.14; System.out.println(f); It gives me an error saying possible lose of precision. Aren't fl

  • Barcoding

    Dear abap Gurus 1.  How to create Bar coding ?Can u send me step by step process its very urgent for me please? 2.Bdc upload the data for ct04 tcode i want bdc upload program? Can u send me program ?