Flash Action Script Key Press Restrictions

Hello, so I am making a Pacman game and am using the following script for the movement of my character.
onClipEvent (enterFrame) {
          speed = 10;
          if (Key.isDown(Key.LEFT))
                    this._x -= speed;
                    _root.char.gotoAndStop(2);
          if (Key.isDown(Key.RIGHT))
                    this._x += speed;
                    _root.char.gotoAndStop(1);
          if (Key.isDown(Key.UP))
                    this._y -= speed;
                    _root.char.gotoAndStop(3);
          if (Key.isDown(Key.DOWN))
                    this._y += speed;
                    _root.char.gotoAndStop(4);
The problem that I'm having is that when I press the right and down keys, or any other two keys that result in diagonal movement, the character moves in that direction.  I only want the character to be able to move right, left, up and down.  The   _root.char.gotoAndStop(3); part of the script is just so that the character faces in that direction.  Is there any way to restrict the number of keys that can be pressed at once to one? Or to make it so that only the first of the two keys or the second of the two keys pressed is used? If not, is there any way to make a RIGHT and DOWN key press result in diagonal movement that also faces the character that way? Or stops the character entirely? I would throuroughly appreciate any help on the matter! Thanks in advance!
Walt

One way would be to incorpate "else" 's for the last three conditionals.  That would make it so that the first key determined to be down would be the key that determines the movement.
onClipEvent (enterFrame) {
          speed = 10;
          if (Key.isDown(Key.LEFT))
                    this._x -= speed;
                    _root.char.gotoAndStop(2);
          } else  if (Key.isDown(Key.RIGHT))          {
                   this._x += speed;
                    _root.char.gotoAndStop(1);
          } else if (Key.isDown(Key.UP))          {
                    this._y -= speed;
                    _root.char.gotoAndStop(3);
          } else if (Key.isDown(Key.DOWN))           {
                    this._y += speed;
                    _root.char.gotoAndStop(4);

Similar Messages

  • Video bookmark (videomark) using flash/action script?

    Video bookmark is called videomark.
    Anybody did videomark using flash?.
    Is there any good place, i can learn more about videomark in
    flash?.

    yeah..........
    Can I have a small example on this ... so that it would be very easy for me to understand....
    I am a new bee in flash action scripting......
    Thanks & Regards

  • Can access c++ library from flash action script by using SWC lib?

    We want to develope a Flash application based on Windows CE 6.0 R3. The application aims to communicate with middleware libraries written in C/C++. Is it possible to create SWC file using the c++ library file so that we can load this as a component in fla project for accessing the library functions from flash action script 3.0? OR Is there any simple way to access c++ library from action script?
    Thanks,
    Saumini

    I don't think Alchemy will help you.  The reason is Alchemy does not give socket capabilities beyond what Flash provides.

  • How do you auto reconnect a live video stream broadcast in flash action script 3?

    how do you auto reconnect a live video stream broadcast in flash action script 3?
    so i don't have to ask people to refresh the page if the connection drops
    i copy pasted the live video stream broadcast files and script from here;
    http://www.adobe.com/devnet/adobe-media-server/articles/beginner_live_fms3.html
    http://www.adobe.com/content/dotcom/en/devnet/adobe-media-
    server/articles/beginner_live_fms3/_jcr_content/articlePrerequistes/multiplefiles
    /node_1278314297096/file.res/beginner_live_fms3.zip
    i don't know what i'm doing

    Why don't you use several layers with appropriate alpha properties, and move these layers according to the mouse events?

  • Help... link URL from XML to Flash Action Script 2

    I am trying to link a different URL to each of my files in XML and use this XML in Flash were I created a carousel. In the carousel, when you click on a picture I would like to insert a specific URL. Each picture will have a different URL (http://------------).
    Here are my codes:
    XML:
    <icons>
    <icon image="icon1.png" tooltip="Planning" />
    <icon image="icon2.png" tooltip="Investments" />
    <icon image="icon3.png" tooltip="Education" />
    <icon image="icon4.png" tooltip="Insurances" />
    <icon image="icon5.png" tooltip="Mortgages" />
    <icon image="icon6.png" tooltip="Retirement" />
    <icon image="icon7.png" tooltip="Business Owner" />
    <icon image="icon8.png" tooltip="Banking" />
    </icons>
    Flash Action Script 2:
    import mx.utils.Delegate;
    var numOfItems:Number;
    var radiusX:Number = 250;
    var radiusY:Number = 75;
    var centerX:Number = Stage.width/2;
    var centerY:Number = Stage.height/2;
    var speed:Number = 0.01;
    var perspective:Number = 60;
    var home:MovieClip = this;
    var tooltip:MovieClip = this.attachMovie("tooltip","tooltip",10000);
    tooltip._alpha = 0;
    var xml:XML = new XML();
    xml.ignoreWhite = true;
    xml.onLoad = function()
    var nodes = this.firstChild.childNodes;
    numOfItems = nodes.length;
    for(var i=0;i<numOfItems;i++)
      var t = home.attachMovie("item","item"+i,i+1);
      t.angle = i * ((Math.PI*2)/numOfItems);
      t.onEnterFrame = mover;
      t.toolText = nodes[i].attributes.tooltip;
      t.icon.inner.loadMovie(nodes[i].attributes.image);
      t.ref.inner.loadMovie(nodes[i].attributes.image);
      t.icon.onRollOver = over;
      t.icon.onRollOut = out;
      t.icon.onRelease = released;
    function over()
    home.tooltip.tipText.text = this._parent.toolText;
    home.tooltip._x = this._parent._x;
    home.tooltip._y = this._parent._y - this._parent._height/2;
    home.tooltip.onEnterFrame = Delegate.create(this,moveTip);
    home.tooltip._alpha = 100;
    function out()
    delete home.tooltip.onEnterFrame;
    home.tooltip._alpha = 0;
    function released()
    function moveTip()
    home.tooltip._x = this._parent._x;
    home.tooltip._y = this._parent._y - this._parent._height/2;
    xml.load("icons.xml");
    function mover ()
    this._x = Math.cos(this.angle) * radiusX + centerX;
    this._y = Math.sin(this.angle) * radiusY + centerY;
    var s = (this._y - perspective) / (centerY+radiusY-perspective);
    this._xscale = this._yscale = s * 100
    this.angle += this._parent.speed;
    this.swapDepths(Math.round(this._xscale) + 100);
    this.onMouseMove = function()
    speed = (this._xmouse-centerX)/10000;
    Thanks so much for the help.

    You should be able to add that data into your xml tags and then extract it in the AS2 onLoad function...
    XML:
    <icons>
    <icon image="icon1.png" tooltip="Planning" linkURL="http://www.someURL.com/somePage.html" />
    AS2:
    xml.onLoad = function()
    etc....
    t.onEnterFrame = mover;
    t.toolText = nodes[i].attributes.tooltip;
    t.urlLink = nodes[i].attributes.linkURL;
    etc...

  • New to flash / action script 3

    hi guys,
    got sick of playing flash games and want to learn to create.
    i downloaded a gif of sub zero from mortal kombat...the gif has all the frames for each action like jumping / punching etc.
    i have imported it into flash and i have organised the key frames so when i press enter it looks pretty smooth.
    will i be able to control it like this with keyboard using action script? or do i have to convert it to a vector graphic?
    or is this just not possible.
    can anybody please recommend me a good flash/as3 book to read please...i know there are lots...
    thanks
    jonininireland

    imm for an easy gif control try to import it as a movie clip , Gif images must be framed inside your - character Movie clip -
    try to learn about cross images technique for animating chracters.
    of course u'll be able to control game by keyboard ha ! .
    see:http://as3gamedev.blogspot.com/
    Read :Essential Guide to Flash Games
    try:Develop Flash Games
    Good luck
    Mhood

  • Flash Action Script

    I have 3 problems on action script on the following :
    a) I have two instances on the stage. I want to link these 2
    instances by drawing a line by clicking the mouse and drag from
    one instance to another.
    b) I have 2 instances A & B on the stage. I want to drag
    instance A and place it on instance B, Instance A is unmovable
    after
    placing on instance B.
    c) I have an instance on stage which is made visible = false
    on load. onRelease of button this instance is visible = true. I go
    to next frame, then I go back to previous frame, the
    instance become visible = false again. How does the action Script
    like by
    letting the instance visible = true when I go to previous
    frame.
    By dafei

    Flash CS3 works with events.
    To handle clicks you have to capture the click event
    To load a link you have navigateToURL:
    http://livedocs.adobe.com/flex/2/langref/flash/net/package.html#navigateToURL()

  • Captivate 8 - module FLASH - Action Script

    Bonjour,
    J'utilise Captive 8 pour créer des modules de formation e-learning.
    Le problème est que ma société ne peut pas passer à IE11 pour afficher les modules en HTML5.
    Pour pouvoir créer des modules, il faut que la publication en SWF se fasse avec Action Script 2 et Captivate 8 utilise Action Script3 que mon module de compilation (obligatoire de passer par là) ne gère pas.
    Y a-t-il une solution ?
    Merci de m'aider.

    Bonjour,
    merci de votre réponse et voici donc un descriptif complet de mon "problème".
    1) j'utilise Captivate8 AS3 pour générer des modules en SWF et en HTML5.
    2) j'utilise un outil spécifique MyRenda du Cerfi ensuite pour compiler mon module afin de l'insérer dans MyTeacher (CERFI)
    3) MyRenda compile avec ISPRING qui ne gère pas AS3 pour créer des modules en FLASH
    Vu que ma société utilise encore la version de IE8 pour le portail applicatif (impératif pour des raisons applicatifs métiers), je ne peux pas générer des SWF et vu que IE8 ne supporte pas le HTML5, je ne peux pas publier mes modules de formations.
    Ma question :
    Est-il possible de modifier AS3 en AS2 pour Captivate8 ? ou est-il possible d'obtenir une version antérieure de Captivate qui utilise encore AS2 ?
    En espérant avoir été claire, je reste à disposition.

  • Send data from html to flash action script

    Hi,
    I would like my flash to act differently depending on what
    html page it is on. Can I send information from html code to action
    script?

    Hi,
    Yes you can, by using FLASHVARS. Refer the attached code for
    example. Also you can use Javascript setVariable method of Flash
    object to set values in between i.e. after the page has loaded, as
    in case of FLASHVARS these are sent to flash just at the begining
    i.e. once SWF loads. In the attached exmple i've sent 2 variables
    to Flash one is 'username' and other is 'userId', thse will be
    fetched inside flash movie as _root.username and _root.userId.
    Note: I've added flashvars as PARAM and also as an attribute
    for EMBED tag (used by Mozilla, NS etc)
    Hope this helps.
    Thanks,
    Sumeet

  • Flash Action Script hitTest Change Variable

    Hello! I am making a flash game which is my own take on Pacman.  I at trying to make a wall that when the character hits, the character doesn't move at all.  When I put code on the wall itself, the character would hit it, then move forward 10 pixels while the key was pressed and spring back 10 pixels when it wasn't pressed.  Is there any way to make something completely solid? This is the code I was using before. 
    onClipEvent (enterFrame) {
              if (this.hitTest(_root.char))
                        _root.char._x += 10;
    The code on the character (char) was
    onClipEvent (enterFrame) {
              var a_variable = 10;
              if (Key.isDown(Key.LEFT))
                        this._x -= a_variable;
                        _root.char.gotoAndStop(2);
              else if (Key.isDown(Key.RIGHT))
                        this._x += a_variable;
                        _root.char.gotoAndStop(1);
              else if (Key.isDown(Key.UP))
                        this._y -= a_variable;
                        _root.char.gotoAndStop(3);
              else if (Key.isDown(Key.DOWN))
                        this._y += a_variable;
                        _root.char.gotoAndStop(4);
    I am wondering if there is a way to set the variable a_variable to 0 when the character hits the wall. 
    Thanks.
    ~Walt

    Yes you're completely right, I fixed it because I noticed that the stage was null, after fixing that it basicly solved the issue.

  • Flash Action Script 3 is giving me 1120 error help please!

    I am having trouble coding this tutorial. I have changed it a little to fit my photos. I am getting this error 1120 below:
    Scene 1, Layer 'actions', Frame 1, Line 1    1120: Access of undefined property btn1.
    Scene 1, Layer 'actions', Frame 1, Line 2    1120: Access of undefined property btn2.
    Scene 1, Layer 'actions', Frame 1, Line 3    1120: Access of undefined property btn3.
    Scene 1, Layer 'actions', Frame 1, Line 4    1120: Access of undefined property btn4.
    I don't really understand the coding and need help fixing this problem. I believe their code is wrong because my gallery will not work from the tutorial.
    The code I have is below:
    stop(); btn1.addEventListener(MouseEvent.CLICK,play1); function play1(event:MouseEvent):void{ gotoAndStop ("rosie") }
      btn2.addEventListener(MouseEvent.CLICK,play2); function play2(event:MouseEvent):void{ gotoAndStop ("mel") }
      btn3.addEventListener(MouseEvent.CLICK,play3); function play3(event:MouseEvent):void{ gotoAndStop ("liz") }
      btn4.addEventListener(MouseEvent.CLICK,play4); function play4(event:MouseEvent):void{ gotoAndStop("kayla") } ;
    The code that was given to me is below: (Source:How to create a simple image gallery in flash cs5) :
      stop(); btn1.addEventListener(MouseEvent.CLICK,play1); function play1(event:MouseEvent):void{ gotoAndStop ("young") } btn2.addEventListener(MouseEvent.CLICK,play2); function play2(event:MouseEvent):void{ gotoAndStop ("thoughtful") } btn3.addEventListener(MouseEvent.CLICK,play3); function play3(event:MouseEvent):void{ gotoAndStop ("dancing") } btn4.addEventListener(MouseEvent.CLICK,play4); function play4(event:MouseEvent):void{ gotoAndStop ("old") }
    Can anyone help me with this tutorial or coding! That would be great. Thanks!!

    Flash CS3 works with events.
    To handle clicks you have to capture the click event
    To load a link you have navigateToURL:
    http://livedocs.adobe.com/flex/2/langref/flash/net/package.html#navigateToURL()

  • I am looking for FLASH Action Script Assistance.

    What's the best source to find a person to assist with Compiler errors related to Flash scripts?

    Compiler errors: I have attempted to correct Source according to the suggestions by the compiler errors to no avail.
    The SOURCE CODE appears below the COMPILER ERRORS.
    Symbol 'slidingMenu', Layer 'as', Frame 1, Line 32, Column 17
    1084: Syntax error: expecting identifier before greaterthan.
    Symbol 'slidingMenu', Layer 'as', Frame 1, Line 46, Column 10
    1084: Syntax error: expecting identifier before greaterthan.
    Symbol 'slidingMenu', Layer 'as', Frame 1, Line 62, Column 17
    1084: Syntax error: expecting identifier before greaterthan.
    Symbol 'slidingMenu', Layer 'as', Frame 1, Line 77, Column 10
    1084: Syntax error: expecting identifier before greaterthan.
    Symbol 'slidingMenu', Layer 'as', Frame 1, Line 94, Column 17
    1084: Syntax error: expecting identifier before greaterthan.
    Symbol 'slidingMenu', Layer 'as', Frame 1, Line 95, Column 17
    1084: Syntax error: expecting identifier before greaterthan.
    Symbol 'slidingMenu', Layer 'as', Frame 1, Line 95, Column 21
    1084: Syntax error: expecting rightparen before leftbrace.
    Symbol 'slidingMenu', Layer 'as', Frame 1, Line 125, Column 32
    1084: Syntax error: expecting rightparen before and.
    Symbol 'slidingMenu', Layer 'as', Frame 1, Line 127, Column 36
    1084: Syntax error: expecting rightparen before and.
    Symbol 'slidingMenu', Layer 'as', Frame 1, Line 147, Column 28
    1084: Syntax error: expecting identifier before greaterthan.
    Symbol 'slidingMenu', Layer 'as', Frame 1, Line 147, Column 34
    1084: Syntax error: expecting rightparen before _root.
    Symbol 'slidingMenu', Layer 'as', Frame 1, Line 170, Column 17
    1084: Syntax error: expecting identifier before greaterthan.
    Symbol 'slidingMenu', Layer 'as', Frame 1, Line 171, Column 17
    1084: Syntax error: expecting identifier before greaterthan.
    Symbol 'slidingMenu', Layer 'as', Frame 1, Line 171, Column 21
    1084: Syntax error: expecting rightparen before leftbrace.
    Symbol 'slidingMenu', Layer 'as', Frame 1, Line 186, Column 32
    1084: Syntax error: expecting rightparen before and.
    Symbol 'slidingMenu', Layer 'as', Frame 1, Line 188, Column 36
    1084: Syntax error: expecting rightparen before and.
    Symbol 'slidingMenu', Layer 'as', Frame 1, Line 208, Column 28
    1084: Syntax error: expecting identifier before greaterthan.
    Symbol 'slidingMenu', Layer 'as', Frame 1, Line 208, Column 34
    1084: Syntax error: expecting rightparen before _root.
    ========================================================================================== ================================
    Source for slidingMenu
    slidingMenu.RollOverBoxes = function(boxNumber:Number) {
    if (_root.link<>boxNumber) {
    _root.my_motion_finished = 0;
    var cBox:MovieClip = eval('box'+boxNumber);
    cBox.title_main.gotoAndPlay("s1");
    for (var i = 1; i<=7; i++) {
    var cBox:MovieClip = eval('box'+i);
    xkoord = cBox.my_x;
    if (_root.splash_flag == 1) {
    if (boxNumber == 1) {
    slidingMenu.move_all(126);
    } else {
    slidingMenu.move_all(-126);
    if (i<>boxNumber) {
    if (i<boxNumber) {
    _root.myTween = new Tween(cBox, "_x", Strong.easeOut, cBox._x, xkoord-small_height_over, time_for_animation2, false);
    cBox.my_x = xkoord-small_height_over;
    } else {
    _root.myTween = new Tween(cBox, "_x", Strong.easeOut, cBox._x, xkoord+small_height_over, time_for_animation2, false);
    cBox.my_x = xkoord+small_height_over;
    _root.myTween.onMotionFinished = function() {
    _root.my_motion_finished = 1;
    slidingMenu.RollOutBoxes = function(boxNumber:Number) {
    if (_root.link<>boxNumber) {
    _root.my_motion_finished2 = 0;
    var cBox:MovieClip = eval('box'+boxNumber);
    //cBox.title_main.gotoAndPlay("s2");
    cBox.title_main.gotoAndPlay("s2");
    for (var i = 1; i<=7; i++) {
    var cBox:MovieClip = eval('box'+i);
    xkoord = cBox.my_x;
    if (_root.splash_flag == 1) {
    if (boxNumber == 1) {
    slidingMenu.move_all(-126);
    } else {
    slidingMenu.move_all(-126);
    if (i<>boxNumber) {
    if (i<boxNumber) {
    _root.myTween = new Tween(cBox, "_x", Strong.easeOut, cBox._x, xkoord+small_height_over, time_for_animation2, false);
    cBox.my_x = xkoord+small_height_over;
    } else {
    _root.myTween = new Tween(cBox, "_x", Strong.easeOut, cBox._x, xkoord-small_height_over, time_for_animation2, false);
    cBox.my_x = xkoord-small_height_over;
    _root.myTween.onMotionFinished = function() {
    _root.my_motion_finished2 = 1;
    // Functions
    slidingMenu.moveBoxes = function(boxNumber:Number) {
    if (_root.link<>boxNumber) {
    if (boxNumber<>7) {
    small_height = 568;
    small_height_over = 0;
    } else {
    small_height = 208;
    small_height_over = 360;
    if (boxNumber == 7) {
    _root.splash_flag = 1;
    slidingMenu.move_all(-126);
    } else {
    _root.splash_flag = 0;
    if (boxNumber == 5) {
    //slidingMenu.move_all(196-boxNumber*593+780);
    slidingMenu.move_all(136-(boxNumber-1)*593);
    } else {
    if (boxNumber == 1) {
    //slidingMenu.move_all(196-boxNumber*593+320);
    slidingMenu.move_all(136-(boxNumber-1)*593);
    } else {
    slidingMenu.move_all(136-(boxNumber-1)*593);
    _root.my_motion_finished3 = 0;
    k = 1;
    //-1239.0
    //eval('box'+_root.link).title_main.gotoAndPlay("s2");
    for (var i = 1; i<=7; i++) {
    var cBox:MovieClip = eval('box'+i);
    if (_root.start_status == 0 and i<>boxNumber) {
    //cBox.title_main.gotoAndPlay("s3");
    } else if (_root.link_prev == 0 and i == boxNumber) {
    //cBox.title_main.gotoAndPlay("s6");
    if (i == boxNumber) {
    _root.link_prev = _root.link;
    _root.link = boxNumber;
    cBox.pages.gotoAndPlay("s1");
    //if (_root.link<>0) {
    //cBox.title_main.gotoAndPlay("s2");
    var cBox2:MovieClip = eval('box'+_root.link_prev);
    cBox2.title_main.gotoAndPlay("s2");
    _root.pic_num_prev = _root.pic_num;
    _root.pic_num = 1;
    _root.pic_num2_prev = _root.pic_num2;
    _root.pic_num2 = 1;
    _root.pic_num3_prev = _root.pic_num3;
    _root.pic_num3 = 1;
    _root.pic_num4_prev = _root.pic_num4;
    _root.pic_num4 = 1;
    if (_root.pic_num_prev<>1 or _root.pic_num2_prev<>1 or _root.pic_num3_prev<>1 or _root.pic_num4_prev<>1) {
    cBox2.title_main.area.gall.play();
    cBox2.pages.gotoAndPlay(cBox2.pages._totalframes-cBox2.pages._currentframe);
    _root.scroller.gotoAndStop(2);
    xkoord = cBox.my_x;
    if (i<=boxNumber) {
    _root.myTween = new Tween(cBox, "_x", Back.easeOut, cBox._x, (k)*(small_height)-200, time_for_animation, false);
    cBox.my_x = (k)*(small_height)-200;
    } else {
    _root.myTween = new Tween(cBox, "_x", Back.easeOut, cBox._x, (k)*(small_height)+big_height-232, time_for_animation, false);
    cBox.my_x = (k)*(small_height)+big_height-232;
    _root.myTween.onMotionFinished = function() {
    _root.my_motion_finished3 = 1;
    k++;
    _root.start_status = 1;
    slidingMenu.appearBoxes = function(boxNumber:Number) {
    if (_root.link<>boxNumber) {
    if (boxNumber<>7) {
    if (boxNumber == 1) {
    slidingMenu.move_all(396-boxNumber*93);
    } else {
    slidingMenu.move_all(336-boxNumber*93);
    } else {
    slidingMenu.move_all(-426);
    _root.my_motion_finished3 = 0;
    k = 1;
    //-1239.0
    //eval('box'+_root.link).title_main.gotoAndPlay("s2");
    for (var i = 1; i<=7; i++) {
    var cBox:MovieClip = eval('box'+i);
    if (_root.start_status == 0 and i<>boxNumber) {
    //cBox.title_main.gotoAndPlay("s3");
    } else if (_root.link_prev == 0 and i == boxNumber) {
    //cBox.title_main.gotoAndPlay("s6");
    if (i == boxNumber) {
    _root.link_prev = _root.link;
    _root.link = boxNumber;
    cBox.pages.gotoAndPlay("s1");
    //if (_root.link<>0) {
    //cBox.title_main.gotoAndPlay("s2");
    var cBox2:MovieClip = eval('box'+_root.link_prev);
    cBox2.title_main.gotoAndPlay("s2");
    _root.pic_num_prev = _root.pic_num;
    _root.pic_num = 1;
    _root.pic_num2_prev = _root.pic_num2;
    _root.pic_num2 = 1;
    _root.pic_num3_prev = _root.pic_num3;
    _root.pic_num3 = 1;
    _root.pic_num4_prev = _root.pic_num4;
    _root.pic_num4 = 1;
    if (_root.pic_num_prev<>1 or _root.pic_num2_prev<>1 or _root.pic_num3_prev<>1 or _root.pic_num4_prev<>1) {
    cBox2.title_main.area.gall.play();
    cBox2.pages.gotoAndPlay(cBox2.pages._totalframes-cBox2.pages._currentframe);
    _root.scroller.gotoAndStop(2);
    xkoord = cBox.my_x;
    if (i<=boxNumber) {
    _root.myTween = new Tween(cBox, "_x", Strong.easeOut, cBox._x, (k)*(small_height)-200, 5+int(70-k*5), false);
    cBox.my_x = (k)*(small_height)-200;
    } else {
    _root.myTween = new Tween(cBox, "_x", Strong.easeOut, cBox._x, (k)*(small_height)+big_height-232, time_for_animation+int(k*20), false);
    cBox.my_x = (k)*(small_height)+big_height-232;
    _root.myTween.onMotionFinished = function() {
    _root.my_motion_finished3 = 1;
    k++;
    _root.start_status = 1;
    slidingMenu.StopBoxes = function() {
    for (var i = 1; i<=7; i++) {
    var cBox:MovieClip = eval('box'+i);
    //_root.myTween = new Tween(cBox, "_x", Back.easeOut, cBox._x, xkoord-small_height_over, 1, false);
    _root.myTween.continueTo(1, 1);
    slidingMenu.move_all = function(num) {
    var cBox:MovieClip = _root.box1;
    _root.myTween_move_all = new Tween(cBox, "_x", Back.easeOut, cBox._x, num, 25, false);
    //slidingMenu.moveBoxes();

  • Porting JS (mobile services) for Flash (Action Script)

    Hi!
    There is JS-class for mobile services
    ajax.aspnetcdn.com/ajax/mobileservices/MobileServices.Web-1.2.5.min.js
    May be anybody know is there port of this for Flash-projects (for example, for AIR)
    Thanx!

    Ensure your event listener (or as u call it, key catcher) is referencing the instance of the button....so for example, if the original button is called "button" and the one you have on the stage is an instance of "button" with the instance name "buttonInstance", ensure the event handler is attached to the instance on stage...
    It sounds like the event is not even being triggered as the trace is not being executed...this tells me that the event is not being "heard" by the listener.
    Why not email your lecturer with your code and ask them for some direction? The worst thing that will happen is that they won't reply to your email. If that fails, go and see them in person. Persistence is a valuable attribute.

  • How to create a line in flash action script 3.0

    i am trying to create a line that can be draggable and  extedable from start and end points of line. some one help plzz

    what problem are you having?

  • Action script flash

    hello
    i have made one touch screen frame using infrared for my project i am a U.G student of electronics and communication and i have made this touch screen frame to count the coordinates so i passed my coordinates to com port and i want to pass this coordinates to flash action script game called wall pong but i dont know the flash action script as i haven't studied the action script so how can i pass this coordinates to flash i can able to pass the coordinates to net port .but from that i couldn't pass it to flash game i have download the code from the internate. but i couldn't understand. what should i do??? can any one help me out??

    to communicate with any kind of non-standard hardware you will have to run some kind of virtual server that listens to your device and prepares it for flash.
    Look into WiiFlash, it manages to get Flash communicating with a WiiMote:
    https://code.google.com/p/wiiflash/
    It will certainly give you an idea how to jumpstart your won project

Maybe you are looking for

  • Error while installing oracle R2 on linux

    hi guy's, first of all plz forgive me if i am placing this at wrong place. actually i am trying to install oracle database 10g R2 on RHEL5 x86 platform.i complated all prerequisite for installing oracle on linux specified at http://www.oracle-base.co

  • Sound effects no longer play in Rosetta emulation games

    While sorting out the data transferred from my recently deceased Powerbook G4 17", I accidently started up Audacity 1.2.3 which is a Power PC only version. It only partially loaded with its icon in the Dock but nothing else. I had to force quit the p

  • How to place a WebPart in Publishing Page Content

    Hi, when you use a publishing page you are able through the ribbon to add existing webparts into the content of the publishing page. I would like to add programmatically a webpart into the content of the publishing page. I couldnt find anyting to tha

  • Bank Charges in PO

    Dear Experts, I have a scenario where in for a PO i will open LC aginst my Vendor in Bank & i paid some bank charges to bank . My PO is 100Rs and Bank charge is 20Rs & Total is 120Rs which should add to my material cost. this is getting add while pos

  • Can someone show me how to add a video skin to this code?

    <object width="640px" height="360px">     <param name="allowFullScreen" value="true"/>     <param name="wmode" value="transparent"/>     <param name="movie" value="http://www.kinglyd3signz.com/kinglydsvideos/video/Meet%20Dan5.swf"/>     <embed src="h