converting as3 in as3

Can u please convert as3 in 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 is 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 the volume to the last used value

setVolume (intLastVolume);

Update scrubber and fill position/width

VolumContrl.mcVolumeScrubber.x = (53 * intLastVolume) + 341;

VolumContrl.mcVolumeFill.mcFillRed.width is VolumContrl.mcVolumeScrubber.x - 394 + 53;.

}

function volumeScrubberClicked(e:MouseEvent):void {}

scrub the value true volume indicator

bolVolumeScrub = true;

begin to slide

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 of the progress/volume fill

VolumContrl.mcVolumeFill.mcFillRed.width is VolumContrl.mcVolumeScrubber.x - 394 + 53;.

record the volume if it is 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 is VolumContrl.mcVolumeScrubber.x - 394 + 53;.

}

function setVolume(intVolume:Number_=_0):void {}

create the object soundtransform with the volume of

the parameter

var sndTransform = new SoundTransform (intVolume);

Assign the object to the NetStream audio processing

nsStream.soundTransform = sndTransform;

mask/poster button mute and reactivate according to the

volume

If (intVolume > 0) {}

VolumContrl.btnMute.visible = true;

VolumContrl.btnUnmute.visible = false;

} else {}

VolumContrl.btnMute.visible = false;

VolumContrl.btnUnmute.visible = true;

}

}

Ask someone to do it for you, it is a bit much, especially when many changes are at the base. You must convert as much of it as you can first, then ask for help with the rest.  x, y, width, height (jn AS3) become FLF _x, _visible, _width, _height (in AS2)

If you are looking for the AS2 startDrag method you should be able to deternmine how to change that.

Since it is more a question of AS2, and only people looking for help with AS2 would be likely to find it useful, you should post in AS1/2 forums instead of here.

Tags: Adobe Animate

Similar Questions

  • Was to convert AS3 document HTML5 Canvas dropped?

    I can't find it under orders >AS3 convert document HTML5 Canvas more. Therefore, it is possible to convert AS3 to HTML5? Thanks in advance.

    He said now convert other Formats of documents... and you can choose between as many other formats that you have installed at the moment.

  • How can I convert AS3 to AS2?

    Hello

    I have the following script in AS3 & I want it in AS2... is it possible?

    Pls help...

    package
    {
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.display.MovieClip;

    import of gs. TweenLite;

    SerializableAttribute public class extends MovieClip accordion
    {

    var speed: Number = 1;

    public void Accordion()
    {
    tour_mc.addEventListener (MouseEvent.MOUSE_OVER, overHandler, false, 0, true);
    front_mc.addEventListener (MouseEvent.MOUSE_OVER, overHandler, false, 0, true);
    resta_mc.addEventListener (MouseEvent.MOUSE_OVER, overHandler, false, 0, true);
    inv_mc.addEventListener (MouseEvent.MOUSE_OVER, overHandler, false, 0, true);
    wd_mc.addEventListener (MouseEvent.MOUSE_OVER, overHandler, false, 0, true);
    fd_mc.addEventListener (MouseEvent.MOUSE_OVER, overHandler, false, 0, true);
    }

    protected function overHandler(event:MouseEvent):void
    {
    if(Event.Target == tour_mc)
    {
    TweenLite.to (tour_mc, speed, {x: 0, y:0});})
    TweenLite.to (front_mc, speed, {x: 610, y:0});})
    TweenLite.to (resta_mc, speed, {x: 640, y:0});})
    TweenLite.to (inv_mc, speed, {x: 670, y:0});})
    TweenLite.to (wd_mc, speed, {x: 700, y:0});})
    TweenLite.to (fd_mc, speed, {x: 730, y:0});})

    }
    another if (event.target is front_mc)
    {
    TweenLite.to (tour_mc, speed, {x: 0, y:0});})
    TweenLite.to (front_mc, speed, {x: 30, y:0});})
    TweenLite.to (resta_mc, speed, {x: 640, y:0});})
    TweenLite.to (inv_mc, speed, {x: 670, y:0});})
    TweenLite.to (wd_mc, speed, {x: 700, y:0});})
    TweenLite.to (fd_mc, speed, {x: 730, y:0});})
    }
    another if (event.target is resta_mc)
    {
    TweenLite.to (tour_mc, speed, {x: 0, y:0});})
    TweenLite.to (front_mc, speed, {x: 30, y:0});})
    TweenLite.to (resta_mc, speed, {x: 60, y:0});})
    TweenLite.to (inv_mc, speed, {x: 670, y:0});})
    TweenLite.to (wd_mc, speed, {x: 700, y:0});})
    TweenLite.to (fd_mc, speed, {x: 730, y:0});})
    }
    another if (event.target is inv_mc)
    {
    TweenLite.to (tour_mc, speed, {x: 0, y:0});})
    TweenLite.to (front_mc, speed, {x: 30, y:0});})
    TweenLite.to (resta_mc, speed, {x: 60, y:0});})
    TweenLite.to (inv_mc, speed, {x: 90, y:0});})
    TweenLite.to (wd_mc, speed, {x: 700, y:0});})
    TweenLite.to (fd_mc, speed, {x: 730, y:0});})
    }
    another if (event.target is wd_mc)
    {
    TweenLite.to (tour_mc, speed, {x: 0, y:0});})
    TweenLite.to (front_mc, speed, {x: 30, y:0});})
    TweenLite.to (resta_mc, speed, {x: 60, y:0});})
    TweenLite.to (inv_mc, speed, {x: 90, y:0});})
    TweenLite.to (wd_mc, speed, {x: 120, y:0});})
    TweenLite.to (fd_mc, speed, {x: 730, y:0});})
    }
    another if (event.target is fd_mc)
    {
    TweenLite.to (tour_mc, speed, {x: 0, y:0});})
    TweenLite.to (front_mc, speed, {x: 30, y:0});})
    TweenLite.to (resta_mc, speed, {x: 60, y:0});})
    TweenLite.to (inv_mc, speed, {x: 90, y:0});})
    TweenLite.to (wd_mc, speed, {x: 120, y:0});})
    TweenLite.to (fd_mc, speed, {x: 150, y:0});})
    }
    }
    }
    }

    Thanks in advance

    Here's a basic outline of how you might proceed.  I don't understand the nomenclature of the class, or all buttons.

    tour_mc.onRollOver = front_mc.onRollOver = overHandler; Add in the rest of the mc

    function overHandler() {}
    if(This == tour_mc) {}
    trace ("interpolations for tour_mc");
    } else if(this == front_mc) {}
    trace ("interpolations for front_mc");
    } / / and so on for the rest of the mc

    }

  • What is the root when you convert AS3.0 Create js?

    Hi all

    Does anyone know what MovieClip (root) .play (); When converting to create JS for Html5 Canvas is?

    Thank you very much.

    You must enclose your variable to the main timeline:

    this.animVar = 1;

    You can then use, exportRoot.animVar or this.parent.animVar on the main timeline

  • Converting AS3 AS2, mouse event

    Anyone know how to convert this code in AS2, I need it to work with my AS2 component:

    button_instance.addEventListener (MouseEvent.Click, loadNewXML)
    button_instance2.addEventListener (MouseEvent.Click, loadNewXML)

    function loadNewXML(e:MouseEvent):void {}
    Switch (e.Target)
    case button_instance:
    myGallery.contentXML = 'content.xml ';
    break;
    case button_instance2:
    myGallery.contentXML = "yourNewXmlLocation2.xml";
    break;
    }

    The error I get is the class or interface 'MouseEvent' could not be loaded (line 4)

    and ' {' waited (line 6)}

    kglad wrote:

    Try:

    button_instance.onRelease = loadNewXML;
    button_instance2.onRelease = loadNewXML;

    function loadNewXML (): Void {}
    {Switch (this._name)}
    case 'button_instance ':
    myGallery.contentXML = 'content.xml ';
    break;
    case 'button_instance2 ':
    myGallery.contentXML = "yourNewXmlLocation2.xml";
    break;
    }

    }

  • I have written in AS3 and AS2 games. How can I convert them into HTML5/javascript?

    I have written several games in Flash/AS3 and AS2 to play in browsers; They also work on Facebook. I now need to convert because Flash is no longer supported by the tablets and phones; I need to be able to produce versions Android and iOS. Rather than rewrite all this code, I think that the solution can use PhoneGap, but first I have to produce versions that work in javascript/HTML5.

    Help creative cloud with that?

    Thank you

    Mariana

    It depends on the complexity of your games. Generally, a safer bet would be to change the UI and produce games native for iOS and Android using Flash Professional and AIR. If they are fairly simple, you can manually rewrite the game using JavaScript to target the canvas - and keep all the assets they are in Flash Professional.

    There is no reliable solution to automatically convert AS3 JS.

  • AS3, convert java script

    Hello

    I want to convert as3 code Flash, java script to use the html5 canvas.

    Any help please?

    It is an as3 code:

    var randNum:Number = Math.floor (Math.random () * 149) + 1;

    var fixedFrame:Number = randNum + 1;

    gotoAndStop (fixedFrame);

    I try cela, but does not:

    Function myFunction() {}

    var randNum = Math.floor (Math.random () * 150) + 1;

    var fixedFrame = randNum + 1;

    _this.gotoAndPlay (fixedFrame);

    }

    Impossible to put this in the first image and expect it to work.  managers further down the timeline probably did not load, yet.

    Use the preload class to check.

  • Convert checking of AS2 - AS3

    I'm sliding to convert AS3 AS2 code. Here's moviclip instance name handle_mc. Here I have code AS2 and trying to convert it to AS3. U review it please my AS3 code. 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 elements of AS2 code in your AS3 code.  If you really try to learn it and not just to see if you can get people to do your design work for you, then you must be running the code, see what are the mistakes occur and then research on the way to correct it at the time.  The compiler will be happy to tell you where you have problems.  That's how you learn it.

  • Easy way to convert a Flash AS3 for Flash Canvas HTML5/JS quiz game

    Can someone tell me the best and easily (or tool) to convert a quiz game made in Flash with AS3 CC on a Flash Canvas file for export to HTML5/Javascript? This game loads the questions and answers from an external XML file. Thank you.

    There is no easy way. Canvas mode uses a slightly different scripting language (JavaScript) and completely different graphics API (CreateJS). Canvas mode also lacks all integrated in the GUI widgets. The quiz must be reprogrammed from scratch, except perhaps for sections of pure logic.

  • setProperty ("", FLF,-45 "); What does "" means and how to convert it to as3

    the standard format of as2 is like that

    setProperty (myClip, _width, 200);

    and his as3 format is

    myClip.width = 200;

    but here, it should be

    "".width =-45.

    but it displays error. in this case, what is the solution? How can I convert it to as3

    setProperty("",_y,-45);  AS1

    This.y = - 45;  AS3

    but because this code can be attached to an object (instead of a timeline), you must assign an instance name (for example, objectname in the properties panel) and use that name in your code that is attached to the timeline that contains the object:

    ObjectName.y = - 45;

    or, better yet, move all the code to a timeline

    or, better yet, use class files

  • Simple code: can convert you this to AS3?

    AS2:
    onClipEvent (enterFrame)
    {
    If (this.hitTest (_root.door1))
    {
    _root.enemys2.gotoAndPlay (1144);
    } / / end if
    }

    You can do this convert it to as3? Thank you!

    you will need remove all code objects.

    this.addEventListener (Event.ENTER_FRAME, enterframeF);

    function enterframeF(e:Event):void {}

    {if (this.hitTestObject (MovieClip (root) .door1))}

    MovieClip (root).enemys2.gotoAndPlay (144);

    It is no longer necessary to stop this loop:

    this.removeEventListener (Event.ENTER_FRAME, enterframeF);

    }

    }

  • Cannot convert a clip simple targeting AS3 to HTML5 (really new to HTML5 Flash CC)

    Please, I beg you! A good soul can convert this to HTML5? I've tried everything! I need to see where I am going wrong... It works perfect in as3, but every time I tried to convert it into js, it stops... Someone? :/

    buttonOne.addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndPlayAtFrame);

    function fl_ClickToGoToAndPlayAtFrame(event:MouseEvent):void
    {mc.gotoAndPlay (2) ;}}

    Stop();

    I already tried this:

    var _this = this;
    this.buttonOne.addEventListener("click", fl_ClickToGoToAndPlayAtFrame);
    function fl_ClickToGoToAndPlayAtFrame(event) { // Note: Types are not supported either.
      _this.mc.gotoAndPlay(2);
    }

    It works in a empty fla, but not on the i'm working:

    I just want to call the mc (with effect) and at the same time, go to section 348 and play... I'm downloading the original fla that I am working on... Please, help me find what's the problem?

    www.agenciacreh.com.br/downloads/Home.fla (here the fla file!)

    Thank you!

    Hello

    This could be a problem do not specify an instance name on the first image where this instance is placed at providing the instance name to a frame later. Flash takes the instance name what is the setting in which the instance is named but CreateJS it does not bind this way.

    Joined the work file.

    Thank you!

    Mohan

  • Flash Pro CC can convert the inline code AS3 FLA HTML5?

    Flash Pro CC isn't able to convert external AS3 codebase in HTML5. It allows to convert written or referenced on timeline Flash AS3 code?

    Laughing out loud

    There are a few limited goto that can be encapsulated in a comment of js that is converted to JavaScript, but for all practical purposes, is not the answer.

  • Can I convert AS2 FLA in AS3 FLA?

    Is it possible that I can convert my flash document that was built with Action Script 2.0 in a Document Flash Action Script 3.0 using Flash CS6?

    The only way I can imagine to convert the file using Flash CS6 is if the AS2 code used in the file would be the same code that you write an AS3 file.  So you could change the settings of publication of AS2 to AS3 and save/compile the file.  I can't hazard a guess as to the likelihood of the code in the file which is authoritative for AS2 and AS3, but it is possible that if the code is very basic (play(), stop(), etc., gotoAndPlay()).

  • Convert as1 in as3

    I found a scrolling text good picture but I need to have it in as3.

    Is it possible to convert a file compiled with as1 to as3? (I'm new to Flash).

    Thank you

    You can download a fla with this code: http://www.kglad.com/Files/forums/test.fla

Maybe you are looking for

  • How do I know if a wire is connected to a control (in the case of the Subvi)?

    Hello I know if it is possible to know if a thread (calling VI) is connected to the Subvi control or not. -There is any function to test a control for whether or not it is connected by calling VI? OR -J' I test the values of the control's default set

  • Ranger 3D

    Hello! Is there someone else who has already developed application for storing 3D (used Ranger Toolkit for Labview?)

  • end of file error encountered on real time

    I have a question ad with a deployment to the PSC controller. I had a successful deployment that requires a few tweeks. When I may have a few changes, I had some problems that resulted in an error "end of file". Here's what I know. Updated the CFP wi

  • JPEG attachments

    Whenever I received other JPEG attachments (same 1st time) and I opened all my pictures developed.  I went to these picture files, opened, and they were empty.  In addition, all these photos on saved movie maker were 'x '.  Which means that these pho

  • Lost on Windowsn 7 Home Premium product key

    I have windows 7 Home premium on my laptop and for some reason any product key has been abandoned. I still have the disc of windows 7 that I bought but it says that I can't use this product key. It's the computer, it was originally used on. is there