Convert as3 to as3

Can u please convert as3 to as3
Code here:
const DEFAULT_VOLUME:Number                                        = 0.6;
var intLastVolume:Number                                        = DEFAULT_VOLUME;
VolumContrl.btnMute.addEventListener(MouseEvent.CLICK, muteClicked);
VolumContrl.btnUnmute.addEventListener(MouseEvent.CLICK, unmuteClicked);
VolumContrl.mcVolumeScrubber.btnVolumeScrubber.addEventListener(MouseEvent.MOUSE_DOWN, volumeScrubberClicked);
VolumContrl.mcVolumeScrubber.x = (52 * DEFAULT_VOLUME) + 341;
VolumContrl.mcVolumeFill.mcFillRed.width = VolumContrl.mcVolumeScrubber.x - 394 + 52;
setVolume(DEFAULT_VOLUME);
function muteClicked(e:MouseEvent):void {
          setVolume(0);
          // update scrubber and fill position/width
          VolumContrl.mcVolumeScrubber.x                                        = 341;
          VolumContrl.mcVolumeFill.mcFillRed.width          = 1;
function unmuteClicked(e:MouseEvent):void {
          // set volume to last used value
          setVolume(intLastVolume);
          // update scrubber and fill position/width
          VolumContrl.mcVolumeScrubber.x = (53 * intLastVolume) + 341;
          VolumContrl.mcVolumeFill.mcFillRed.width = VolumContrl.mcVolumeScrubber.x - 394 + 53;
function volumeScrubberClicked(e:MouseEvent):void {
          // set volume scrub flag to true
          bolVolumeScrub = true;
          // start drag
          VolumContrl.mcVolumeScrubber.startDrag(false, new Rectangle(341, 19, 53, 0));
function mouseReleased(e:MouseEvent):void {
          bolVolumeScrub                    = false;
          bolProgressScrub          = false;
          // stop all dragging actions
          VolumContrl.mcVolumeScrubber.stopDrag();
          // update progress/volume fill
          VolumContrl.mcVolumeFill.mcFillRed.width          = VolumContrl.mcVolumeScrubber.x - 394 + 53;
          // save the volume if it's greater than zero
          if((VolumContrl.mcVolumeScrubber.x - 341) / 53 > 0)
                    intLastVolume = (VolumContrl.mcVolumeScrubber.x - 341) / 53;
function updateDisplay(e:TimerEvent):void {
if(bolVolumeScrub) {
                    setVolume((VolumContrl.mcVolumeScrubber.x - 341) / 53);
                    VolumContrl.mcVolumeFill.mcFillRed.width = VolumContrl.mcVolumeScrubber.x - 394 + 53;
function setVolume(intVolume:Number = 0):void {
          // create soundtransform object with the volume from
          // the parameter
          var sndTransform                    = new SoundTransform(intVolume);
          // assign object to netstream sound transform object
          nsStream.soundTransform          = sndTransform;
          // hides/shows mute and unmute button according to the
          // volume
          if(intVolume > 0) {
                    VolumContrl.btnMute.visible                    = true;
                    VolumContrl.btnUnmute.visible          = false;
          } else {
                    VolumContrl.btnMute.visible                    = false;
                    VolumContrl.btnUnmute.visible          = true;

Asking someone to do it all for you is a bit much, especially when alot of the changes are basic. You should convert as much of it as you can first then ask for help with the rest.  x,y,visible,width,height (jn AS3) become _x,_y,_visible,_width,_height (in AS2)
If you look up the startDrag method in AS2 you should be able to deternmine how to change that.
Since this is more of an AS2 question, and only people looking for help with AS2 would be likely to find it useful, you should post in the AS1/2 forums instead of here.

Similar Messages

  • Checking convert from AS2 - AS3

    I am praticing to convert AS2 to AS3 code . Here moviclip instance name is handle_mc. Here I have AS2 code and trying to convert into AS3. Will u please look at my code of AS3. Is my code is correct ?
    AS2 Code 
    stop();
        var t1:Number = 0;
        handle_mc.onPress = function() {
            if (t1>=0) {
                if ((getTimer()-t1)<300) {
                    popContent_mc.play();
                } else {
                    _root.main.pop_mc.startDrag();
            } else {
                t1 = 0;
            var time:Number = getTimer();
            t1 = time;
        handle_mc.onRelease = function() {
            _root.main.pop_mc.stopDrag();
    AS3 Code
    stop();
        var t1:Number = 0;
        function press_handle_mc(event:KeyEvent)
            if (t1>=0) {
                if ((getTimer()-t1)<300) {
                    popContent_mc.play();
                } else {
                    _root.main.pop_mc.startDrag();
            } else {
                t1 = 0;
            var time:Number = getTimer();
            t1 = time;
        function click_handle_mc(event,MouseEvent)
            root.main.pop_mc.stopDrag();
        handle_mc.addEventListener(KeyEvent.PRESS,press_handle_mc);
        handle_mc.addEventListener(MouseEvent.CLICK,click_handle_mc;

    No, you still have AS2 code elements in your AS3 code.  If you really are trying to learn this, and not just seeing if you can get people to do your design work for you, then you should be running the code, seeing what errors occur, and then researching how to fix them one at a time.  The compiler will be happy to tell you where you have problems.  That is how you will learn it.

  • Non video Seekbar code in as2. Can someone convert it to as3?

    Hi all,
    I am a newbie in Flash. Found a code from somewhere that is written to use seekbar to control the complete timeline in as2. Just need help from somone to convert it into as3.
    This code is placed in the slider button that is held to move forward or back the animation.
    on (press)
        dragging = 1;
        _parent._parent.stop();
        _parent._parent.ani.stop();
        _parent._parent.roll.ps.gotoAndStop(2);
    on (release, releaseOutside)
        dragging = 0;
        if (_parent._parent.st == 1)
            _parent._parent.roll.ps.gotoAndStop(1);
            _parent._parent.play();
            _parent._parent.ani.play();
        } // end if
    This function is placed in a symbol that contains a slider, named mcslider. It works perfectly in as2.
    function min(cfr)
        cframe = cfr;
        smod = cframe / 30;
        seco = Math.floor(smod);
        minut = seco / 60;
        minu = Math.floor(minut);
        if (minu < 10)
            minute = "0" + minu;
        else
            minute = minu;
        } // end else if
        return (minute);
    } // End of the function
    function sec(cfr)
        cframe = cfr;
        smod = cframe / 30;
        seco = Math.floor(smod);
        minut1 = seco % 60;
        minu1 = Math.floor(minut1);
        if (minu1 < 10)
            second = "0" + minu1;
        else
            second = minu1;
        } // end else if
        return (second);
    } // End of the function
    i = 0;
    seco = 0;
    m_e = 0;
    s_e = 0;
    minute = 0;
    second = 0;
    mtotal = 0;
    onEnterFrame = function ()
        total = _parent._totalframes;
        knob._x = _parent._currentframe * segmentWidth - segmentWidth;
        cfr = _parent._currentframe;
        s_e = sec(cfr);
        m_e = min(cfr);
        s_e1 = sec(cfr);
        m_e1 = min(cfr);

    var tl:MovieClip=this;
    tl.addEventListener(Event.ENTER_FRAME,enterframeF);
    paramF(tl,1,0,tl.totalFrames,slider.track.width);  // create a horizontal slider movieclip that contains a track movieclip and a thumbscroll movieclip that do the obvious and have left-sided reg point
    paramF(slider,0,1,slider.track.width-slider.thumbscroll.width,tl.totalFrames);
    var scrollRect:Rectangle=new Rectangle(0,0,slider.track.width-slider.thumbscroll.width,0);
    function enterframeF(e:Event):void{
    slider.thumbscroll.x=tl.m*tl.currentFrame+tl.b;
    slider.thumbscroll.addEventListener(MouseEvent.MOUSE_DOWN,scrolldownF);
    slider.thumbscroll.addEventListener(MouseEvent.MOUSE_UP,scrollupF);
    function scrolldownF(e:MouseEvent):void{
    tl.removeEventListener(Event.ENTER_FRAME,enterframeF);
    slider.thumbscroll.startDrag(false,scrollRect);
    slider.addEventListener(Event.ENTER_FRAME,scrollF);
    function scrollupF(e:MouseEvent):void{
    tl.addEventListener(Event.ENTER_FRAME,enterframeF);
    slider.thumbscroll.stopDrag();
    slider.removeEventListener(Event.ENTER_FRAME,scrollF);
    function scrollF(e:MouseEvent):void{
    tl.gotoAndStop(Math.round(slider.thumbscroll.x*slider.m+slider.b));
    function paramF(mc:MovieClip,x1:Number,y1:Number,x2:Number,y2:Number):void{
    mc.m=(y1-y2)/(x1-x2);
    mc.b=y2-mc.m*x2;

  • How to convert AS2 to AS3

    Hi I am new to flash AS3. I have a program in AS2 and wants to convert it in AS3. I change the settings from File->Publish Settings. and selected "Flash player 9 and Action Script 3" and after that I am getting some error message and WARNING
    WARNING: Actions on button or MovieClip instances are not supported in ActionScript 3.0. All scripts on object instances will be ignored.
    WARNING: Text field variable names are not supported in ActionScript 3.0. The variable 'NumResults' used for an unnamed text field will not be exported.
    Please suggest me how do I resolve this WARNINGs.

    You are likely to find those are just a few top level errors/warnings you'll get when you try to turn an AS2 file directly into an AS3 file.  There's probably a long line of others regarding syntax and properties that will pop up once you start trying to compile the file.
    AS3 does not allow code to be attached to objects like earlier versions of AS did, so you need to find each object (usually buttons) that has code attached to it, give instance names to those objects, and create that code as event listener/handler pairs.
    AS3 does not allow textfields to carry vars as identifiers, so again you need to assign instance names to the textfields and use the "text" property to assign or read String values to/from them.  So if you have variables that relate to textfield values, then those variables have to be equated to the text property of the textfields... var textVar = text_field.text   OR  text_field.text = textVar

  • Help Converting AS2 to AS3 Drag and Drop Event

    Hi All,
    This is the second post on help for converting AS2 to AS3. This code is used in Captivate to allow a drag and drop action between two areas (User presses down, drags, and releases in a second area - They are not dragging any object). If anyone can help me convert this please let me know.
    Source for Drag and Drop: (Note: Single MovieClip)
    // pause the Captivate movie
    _root.rdcmndPause = 1;
    // when the user's mouse is let go check if there was a successful drop
    _root.onMouseUp = function(){
              // If the source area's center coordinate is nearby the destination area's center coordinate then advance the slide
              if ( Math.abs(_root.sourceX + _root.sourceWidth  / 2 + _root.sourceParentX - (_root.destX + _root.destWidth  / 2)) < (_root.destWidth  / 2) &&
                         Math.abs(_root.sourceY + _root.sourceHeight / 2 + _root.sourceParentY - (_root.destY + _root.destHeight / 2)) < (_root.destHeight / 2) )
                        _root.rdcmndNextSlide = 1;
              } else {
                        // show error movie clip for 2 seconds (60 frames at 30 frames per second)
                        _root.showErrorMessage = 60;
      mc.onEnterFrame = function(){
              // continuously update the source area's coordinates and size
              _root.sourceX = mc._x;
              _root.sourceY = mc._y;
              _root.sourceWidth = mc._width;
              _root.sourceHeight = mc._height;
              _root.sourceParentX = _parent._x;
              _root.sourceParentY = _parent._y;
    mc.onPress = function(){
              // Uncomment following line to have control click capabilities
              //if(key.isDown(Key.CONTROL))
              // when user clicks on the source area click start the drag
                        startDrag(this);
    mc.onRelease = function(){
              // stop drag when user releases the source area
              stopDrag();
    Source for Destination Area (Single MovieClip named destArea)
    // Set a root variable to control when the error message is displayed
    _root.showErrorMessage = -1;
    // Use setCoords variable so we only set the destination coordinates once
    var setCoords = 0;
    destArea.onEnterFrame = function(){
              if (setCoords == 0){
                        // set the destination x, y, width, and height
                        _root.destX = _parent._x;
                        _root.destY = _parent._y;
                        _root.destWidth = _parent._width;
                        _root.destHeight = _parent._height;
              // destination coordinates have been set, change setCoords so it doesn't get set again
              setCoords = 1;
    Code for the Error Message (Single MovieClip named errorMessage)
    // Don't display the error message initially
    errorMessage._alpha = 0;
    errorMessage.onEnterFrame = function (){
              // If the drag and drop method detects a missed drop
              // then show this error message by setting _alpha to 100
              if (_root.showErrorMessage > 0){
                        errorMessage._alpha = 100;
                        // decrementing this variable controls the time the
                        // error message will be displayed
                        _root.showErrorMessage--;
              } else {
                        // Don't display the error message
                        errorMessage._alpha = 0;

    use:
    MovieClip(parent.parent.parent).rdcmndPause=1;
    this.addEventListener(KeyboardEvent.KEY_DOWN,keydownF);
    function keydownF(e:KeyboardEvent):void{
    fscommand("KEYPRESSED", e.keyCode);
    if(e.keyCode==32){
    MovieClip(parent.parent.parent).rdcmndNextSlide=1;

  • Please need help converting AS2 to AS3 code

    Hi, I want to convert an AS2 code to AS3. Someone can tell
    what is wrong. (it is about a speed effect) - Thanks a lot.
    mport flash.filters.BlurFilter;
    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    var duration:Number = 15;
    var t1:Tween = new Tween(mcToTween1, "_x", Elastic.easeIn,
    133, 367, duration, 0);
    var t2:Tween = new Tween(mcToTween1, "blur", Elastic.easeIn,
    0, 0, 1, true);
    t1.onMotionChanged = function() {
    oldx = x;
    oldy = y;
    x = mcToTween1._x;
    y = mcToTween1._y;
    speedx = Math.round(Math.abs((x-oldx)));
    speedy = Math.round(Math.abs((y-oldy)));
    mcToTween1.filters = [new BlurFilter(speedx*2, speedy*2, 1)];
    trace(speedx);
    t1.onMotionFinished = function() {
    t1.yoyo();
    };

    use:
    MovieClip(parent.parent.parent).rdcmndPause=1;
    this.addEventListener(KeyboardEvent.KEY_DOWN,keydownF);
    function keydownF(e:KeyboardEvent):void{
    fscommand("KEYPRESSED", e.keyCode);
    if(e.keyCode==32){
    MovieClip(parent.parent.parent).rdcmndNextSlide=1;

  • Convert AS2 To AS3

    So I made this basic game a few years ago which was in AS2 and Flash 6.  Now I want to convert this game from AS2 to AS3 but I have no idea where to start.  The code is approximalty 4k lines long and I don't know what to change to make it work in AS3.  What do you guys suggest?

    Are you using external .as files and classes or are you using frame scripts directly in the timeline? Are you used to any other object oriented programming languages? Knowing more about other languages you might know would help a lot.
    AS2 very informal and specialized to Flash. It relates to pretty much no other language out there, like JavaScript seldom relates. They're c-esque but only in a very distant 3rd cousin style.
    AS3 is much more OOP oriented and typed versus the less formal, error-prone loose dynamic nature of AS2. While your game would benefit greatly from the speed increases and error reduction, I think you're really swinging for the fence on this one. While some classes may resemble their AS2 counterpart and the core global functions work the same, everything else is different. Starting off trying to convert 4,000 lines of code is a little steep.
    As mentioned, the resources to learn AS3 are excessive and plentiful from video training to tutorials to the API reference itself. Google has it all.
    I think you really should lower your target and just try some really simple, basic things. Draw a shape, add a listener, do something basic when clicked, etc. You'll get a good idea of how different things are with the new display list rather than tearing your hair out converting your as2 game.

  • Convert code to as3

    Hello guys.
    Could you help me to take this code to as3?
    Thanks
    on (press) {
        i = Number(i)+1;
        duplicateMovieClip("/circle", "circle" add i, i);
        setProperty("circle" add i, _x, getProperty("/mousexy", _x));
        setProperty("circle" add i, _y, getProperty("/mousexy", _y));

    i created a CircleClass.as and put inside this code
    package
        public class CircleClass
            public function CircleClass()
    after that i put in .fla the code  you told me
    stage.addEventListener(MouseEvent.MOUSE_DOWN,f);
    function f(e:Event):void{
    var circle_mc:CircleClass=new CircleClass();
    addChild(circle_mc);
    circle_mc.x=e.stageX;
    circle_mc.y=e.stageY;
    I got this error
    TypeError: Error #1034: Type Coercion failed: cannot convert CircleClass@2ec2f31 to flash.display.DisplayObject.
        at movt_fla::MainTimeline/f()[movt_fla.MainTimeline::frame1:9]

  • Converting AS2 to AS3?  Can it be done?

    Hi,
    First I'm not a Flash developer, I'm asking this question to help another group trouble shoot a problem. While I know this sounds dumb, I need an official answer to they can close this solution as some type of an option to solve this problem.
    I was given several swfs from an elearning course in hopes that they could someone be put into Captivate and wrapped for an LMS.  Apparently the Flash developer isn't able to code these files for the LMS (weird yes, but not my task in this problem)  In looking at the swfs I was given they all say they were created using AS2 and of course, Captivate only supports AS3. 
    Short of redoing the Flash files in AS3 is there any other way to take something written Flash using AS2 and output it to a swf that is AS3?
    Thanks for indulging me with your time.

    You cannot "Convert" an as2.swf to an as3.swf.
    You would need to have the original .fla file that created the as2.swf and manually export it to as3.
    The actionScript may need converting depending on several things. Hard to give an exact answer.
    An example of something needing conversion would be as something simple as a something referenced in a function may be doing something like...
    _parent.movieClipName._visible = true ;
    needs to be changed to
    parent.movieClipName.visible = true;
    because the underscore needed in certain name references was removed in AS3.
    There are too many things that could need changing to name them all.
    Another approach that "may" work as a creative workaround (hack) ...
    You could create a new as3.fla and export a new as3.swf that can actually
    load the original as2.swf file into the new as3.swf
    Then just load the new as3.swf into Captivate.
    Here is a link that will help and there is an example available to download
    http://www.kirupa.com/forum/showthread.php?295698-loading-an-AS2-swf-into-an-AS3-swf
    HTH

  • Convert as1 to as3

    I have found a good scroll text with image but i need to have it in as3.
    Is it possible to convert a file compiled with as1 to as3? (I'm new of Flash).
    Thanks

    that's an example of smoothing scrolling with easing.  that requires a display object (like a movieclip or sprite) to scroll.
    here's code to do that:
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    import flash.events.Event;
    // width of display
    var w:int = mc.width;
    // height of display
    var h:int = 200;
    // your scrollbar instance with top left reg point and containing a scrubber movieclip with top left reg point
    var sb:MovieClip;
    // your movieclip to be scrolled
    var mc:MovieClip;
    // easing speed, 0 to 1
    var speed:Number = .1
    var offset:Number;
    var scrubberUpBool:Boolean;
    var mask_mc:MovieClip = new MovieClip();
    with(mask_mc.graphics){
        beginFill(0x000000);
        drawRect(0,0,w,h);
        endFill();
    mask_mc.x = mc.x;
    mask_mc.y = mc.y;
    mc.parent.addChild(mask_mc);
    mc.mask = mask_mc;
    var maxScrubberY:Number = sb.height-sb.scrubber.height;
    paramsF(sb.scrubber,0,mc.y,maxScrubberY,mc.y-mc.height+h);
    sb.scrubber.addEventListener(MouseEvent.MOUSE_DOWN,scrubberDownF);
    function scrubberDownF(e:MouseEvent):void{
    offset = sb.scrubber.y-sb.mouseY;
        scrubberUpBool = false;
        stage.addEventListener(MouseEvent.MOUSE_UP, scrubberUpF);
        this.addEventListener(Event.ENTER_FRAME,scrollF);
    function scrubberUpF(e:MouseEvent):void{
        stage.removeEventListener(MouseEvent.MOUSE_UP, scrubberUpF);
        scrubberUpBool = true;
    function scrollF(e:Event):void{
        var mY:Number = Math.min(sb.mouseY+offset,maxScrubberY);
        mY = Math.max(mY,0);
        if(!scrubberUpBool){
            sb.scrubber.y = mY;
        mc.y = (1-speed)*mc.y+speed*(sb.scrubber.m*sb.scrubber.y+sb.scrubber.b);
        if(scrubberUpBool && Math.abs(sb.scrubber.m*sb.scrubber.y+sb.scrubber.b-mc.y)<1){
            mc.y = sb.scrubber.m*sb.scrubber.y+sb.scrubber.b;
            this.removeEventListener(Event.ENTER_FRAME,scrollF);
    function paramsF(mc:MovieClip,x1:Number,y1:Number,x2:Number,y2:Number):void{
        mc.m = (y1-y2)/(x1-x2);
        mc.b = y1-mc.m*x

  • Convert AS2 to AS3 (XML / Slideshow)

    Hi everyone,
    I've created a slideshow in AS2 (with some help from a
    tutorial) but it is in AS2 unfortunately. I need it to be in AS3
    and I've tried to read some online tutorials and other online
    materials on AS3 and the difference, but I just seem to run my head
    against the wall every time.
    I don't know if it's a comprehensive task to ask but I take
    my chances and try anyway. Please let me know if this is way too
    much to convert / translate
    I've attached my AS2 code
    I short it has to load images from a XML file where a tag
    with caption (image title) and a tag with the delay settings.
    So far I’ve discovered that the XML loading in the very
    beginning is completely different in AS3 so I founded a tutorial on
    how to load XML data into flash. That is working alright but my
    next problem is to reset all the other variables (like caption,
    delay etc.) and I’ve read that XML in AS3 has a much faster
    and smarter way to load the tags. Now I just have to found out how
    that’s done :-)
    Thanks in advance
    eDevantie

    Are you using external .as files and classes or are you using frame scripts directly in the timeline? Are you used to any other object oriented programming languages? Knowing more about other languages you might know would help a lot.
    AS2 very informal and specialized to Flash. It relates to pretty much no other language out there, like JavaScript seldom relates. They're c-esque but only in a very distant 3rd cousin style.
    AS3 is much more OOP oriented and typed versus the less formal, error-prone loose dynamic nature of AS2. While your game would benefit greatly from the speed increases and error reduction, I think you're really swinging for the fence on this one. While some classes may resemble their AS2 counterpart and the core global functions work the same, everything else is different. Starting off trying to convert 4,000 lines of code is a little steep.
    As mentioned, the resources to learn AS3 are excessive and plentiful from video training to tutorials to the API reference itself. Google has it all.
    I think you really should lower your target and just try some really simple, basic things. Draw a shape, add a listener, do something basic when clicked, etc. You'll get a good idea of how different things are with the new display list rather than tearing your hair out converting your as2 game.

  • Converting AS2 to AS3 Please!

    Hi guys.
    I having a major problem in trying to convert an old AS2 code into AS3.
    It would be great if you guys could help in anyway you can.
    onClipEvent (enterFrame)
        this;
        if (_x > 520)
            setProperty(this, _x, -20);
        } // end if
        this;
        if (_x < -20)
            setProperty(this, _x, 520);
        } // end if
        setProperty(this, _x, _x + Number(1.250000E+000));

    In the timeline of the object in question, try:
    addEventListener(Event.ENTER_FRAME, moveX);
    function moveX(evt:Event):void {
        if(x > 520){
             x = -20;
        if(x < -20){
             x = 520;
        x += 1.25;

  • Soundboard Help! - Convert AS2 to AS3 - Stop All Sounds On button release

    Im making a soundboard and I chose AS3 by accident.  What I need the code to do is STOP the CURRENT sound from playing
    if another is pressed.
    the code that worked for AS1 and AS2 was
    onMouseDown = function () {
    stopAllSounds();
    I tried messing around with this in AS3:
    import flash.media.SoundMixer;
    "mouseUp" (MouseEvent.MOUSE_UP), "click" (MouseEvent.CLICK)
    SoundMixer.stopAll();
    but It doesnt do anything.
    import flash.media.SoundMixer;
    SoundMixer.StopAll();
    ^^^
    plays the sound once and messes the sound up after playing for only half  a second or not at all
    thanks a lot for help

    this as2 code:
    onMouseDown = function () {
    stopAllSounds();
    // would be the following in as3:
    this.addEventListener(MouseEvent.MOUSE_DOWN,f);
    function f(e:Event):void{
    SoundMixer.stopAll();

  • Help Converting AS2 to AS3 (Spacebar Action in Captivate)

    Hi All,
    There seems to be a lot of these posts on this forum so I thought I would see if anyone could help me out. I had some code developed for me that was in AS2 and I need this in AS3 due to the upgrade in software. Below is the AS2 code:
    _parent._parent._parent.rdcmndPause = 1;
    myListener = new Object();
    myListener.onKeyDown = function () {
              fscommand("KEYPRESSED", Key.getCode());
        If (Key.getCode() == 32)
                        _parent._parent._parent.rdcmndNextSlide = 1;
              EndIf
    Key.addListener(myListener);
    The code is simple really. It was suppose to allow the Spacebar to be used as an input key to go to the next slide in Captivate. There is a single MovieClip in the file. Please let me know.
    Thanks

    use:
    MovieClip(parent.parent.parent).rdcmndPause=1;
    this.addEventListener(KeyboardEvent.KEY_DOWN,keydownF);
    function keydownF(e:KeyboardEvent):void{
    fscommand("KEYPRESSED", e.keyCode);
    if(e.keyCode==32){
    MovieClip(parent.parent.parent).rdcmndNextSlide=1;

  • Can This be Converted from CS4 AS3 to Flash8 AS2?

    Is This Possible To Work In Flash8 AS2?
    import flash.events.Event; addEventListener(Event.ENTER_FRAME, update); var accel = 2 var speed = 0.06 var friction = 0.94 function update(e:Event):void { if (mouseX>400){body.fridge.rotationY += speed + accel} if (mouseX<100){body.fridge.rotationY += speed - accel} if (mouseY<100){body.fridge.rotationX += speed + accel} if (speed>2){speed = 2} if (speed<-2){speed = -2} body.fridge.rotationY *= friction body.fridge.rotationX *= friction }

    no.  flash8 doesn't support 3d manipulation of 2d objects.

Maybe you are looking for