Issues converting scroll bar components from AS2 to AS3

I am working on editing a document that has scroll bar components that I would like to convert from AS2 to AS3 since everytime I try to open the document it shows a WARNING and won't convert them and when I publish and look at the final document the scroll bar seems to act unusally since it is obviously still on AS2.
Here are two of the scripts I finally was able to find within it. Should I fix it and how so? This first is for the "Creative Scroll Area" and the second is for the "Creative Scrollbar"
package  {
          import flash.display.MovieClip;
          public class Creative Scroll Area extends MovieClip {
                    public function Creative Scroll Area() {
                              // constructor code
package  {
          import flash.display.MovieClip;
          public class Creative Scrollbar extends MovieClip {
                    public function Creative Scrollbar() {
                              // constructor code

Okay, well I know the code is making a scroll bar and a scroll area and under the "type" it says they are "compiled..." which is unusual since most of the other components I've worked with have been movie clips or bitmaps. Do I need to look up what AS3 components I need to replace the script from above? Because when I looked for that I couldn't specifically find what I needed or really understood if I was looking at the right information.
Here is something I found when trying to "debug" it:
WARNING: The component 'UIScrollBar' requires ActionScript 2.0, which is not supported in this version of Flash Professional.
WARNING: The component 'Creative Scrollbar' requires ActionScript 2.0, which is not supported in this version of Flash Professional.
WARNING: The component 'Creative Scroll Area' requires ActionScript 2.0, which is not supported in this version of Flash Professional.

Similar Messages

  • Convert simple animation code from as2 to as3

    Hi everyone,
    I have a simple animation that is controlled by the y movement of the mouse. The code for the animation is put in frame 1 and is as follows:
    var animationDirection:Boolean = false;
    var prevMousePosition:Boolean = false;
    var mouseListener = new Object();
    mouseListener.onMouseMove = function () {
    var curMousePosition = _ymouse;
    if(curMousePosition > prevMousePosition) {
    animationDirection = false;
    }else if(curMousePosition < prevMousePosition) {
    animationDirection = true;
    prevMousePosition = curMousePosition;
    Mouse.addListener(mouseListener);
    function onEnterFrame() {
    if(animationDirection && _currentframe < _totalframes) {
    nextFrame();
    }else if(!animationDirection && _currentframe > 1) {
    prevFrame();
    Is it possible to use this code in as3 or do I need to convert it? I am grateful for any help. Best wishes

    Yes, you need to convert the code. Here is what looks like a similar logic in AS3:
    import flash.events.Event;
    import flash.events.MouseEvent;
    var animationDirection:Boolean = false;
    var prevMousePosition:Boolean = false;
    addEventListener(Event.ENTER_FRAME, onEnterFrame);
    addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
    function onMouseMove(e:MouseEvent):void {
        var curMousePosition = mouseX;
        if (curMousePosition > prevMousePosition)
            animationDirection = false;
        else if (curMousePosition < prevMousePosition)
            animationDirection = true;
        prevMousePosition = curMousePosition;
    function onEnterFrame(e:Event):void
        if (animationDirection && _currentframe < _totalframes)
            nextFrame();
        else if (!animationDirection && _currentframe > 1)
            prevFrame();

  • Declare new color from AS2 to AS3

    Hi All,
    Could you let me know how to "convert" the following code from AS2 to AS3:
    var distracterBkgdColor = new Color(this.distracterBkgd_mc);
    Thanks!

    var ct:ColorTransform = this.distracterBkgd_mc.transform.colorTransform;ct.color = 0xrrbbgg;
    this.distracterBkgd_mc.transform.colorTransform=ct;

  • Please help 'Translate' These codes from AS2 to AS3 for me

    Hi, i need help 'translating' these codes from Action Script 2 to Action Script 3. Please Do it for me:
    toc    loadText = new LoadVars();
        loadText.load("Curie.txt");
        loadText.onLoad = function(success) {
            if (success) {
                // trace(success);
                Curie.html = true;
                Curie.htmlText = this.Curie;
    Please translate it for me, i need it ASAP thanks
    Kenneth

    Thank you for helping me
    Kenneth
    Date: Thu, 15 Oct 2009 05:49:14 -0600
    From: [email protected]
    To: [email protected]
    Subject: Please help 'Translate' These codes from AS2 to AS3 for me
    Take a look at that:
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/migration.html
    There is a LoadVars section on that.
    There is also a tutorial here:
    http://www.republicofcode.com/tutorials/flash/as3externaltext/
    Cheers,
    CaioToOn!
    >

  • Scroll Bar removal from Jive Forums

    Hi
    We are currently on Netweaver 7.0 SP15. We have downloaded Forums from service market place and deployed into our landscape. All the functionallities are working fine except that I get additional Vertical Scroll Bar.
    Has anyone else implemented this and we are using Light Framework Page.
    please advice.
    Thank you
    Regards
    Krishna Kanth

    Hi Krishna,
    Can you tell me how u have removed the vertical scroll in Jive forums.
    Thanks in advance,
    Regards,
    Rudradev Devulapelli.

  • How do I prevent scroll bar use from disabling front panel updates?

    I have two top-level VIs running simultaneously using different execution systems.  The first VI has a list box scroll bar.  When the scroll bar is used by the operator, updates to the second VI front panel are temporarily blocked.  This is due to the single user interface thread shared by both VIs.  I there anyway to allow the second VI to update its front panel while the first VI is bound to its scroll bar?

    Hi,
    Your problem seems to be a bit more complex. I created two vi's, one with a simple loop, the other with a list box (both running in different execution systems). The first isn't noticeably affected by moving the listbox' scrollbar.
    It there an increase in processor load when you move the scrollbar? That could stop the other vi from updating. Perhaps you can isolate the problem (remove all irrelevant code) and post the remaining vi's?
    Regards,
    Wiebe.
    "wwwbrown" <[email protected]> wrote in message news:[email protected]..
    I have two top-level VIs running simultaneously using different execution systems.&nbsp;&nbsp;The first VI&nbsp;has a list box scroll bar.&nbsp; When the scroll bar is used by the operator, updates to the second VI front panel are temporarily&nbsp;blocked.&nbsp; This is due to&nbsp;the single user interface thread shared by both VIs.&nbsp; I there anyway to&nbsp;allow the second VI to update its front panel while the first VI is bound&nbsp;to its scroll bar?

  • Major gaming system Migration from AS2 to AS3

    I have a major project entirely in AS2. It is made of a
    Multimedia Application, which provides access to functions needed
    to load games, save information, insert *.jpg files... The 50+
    games each have their own graphic.swf and engine.swf, where the
    graphics deal with gameplay and the engine communicates with the
    Multimedia Application.
    If the Multimedia Application is migrated to AS3 but the game
    swf files remain the same, will the functions still be able to
    communicate (call functions and send references to objects)?

    No, AS2 and AS3 are absolutely different animals. There are
    some techniques (search for as2 as3 bridge in the net) that create
    a bridge which are cumbersome in my view.

  • Please, HELP to convert code from AS2 to AS3!!!

    there is source code from paint application, thank to human who will convert this code, it's codeimportant for us.
    stop();
    var arrSloy:Array = new Array();
    //Initial
    //OnMove
    _root.onMouseMove = function() {
              if (checkPole() && onTool) {
                        Mouse.hide();
                        _root.kist._visible = true;
                        _root.eras._visible = true;
                        _root.pen._visible = true;
                        _root.line._visible = true;
              } else {
                        Mouse.show();
                        _root.kist._visible = false;
                        _root.eras._visible = false;
                        _root.pen._visible = false;
                        _root.line._visible = false;
              updateAfterEvent();
    //OnMove
    //New
    _root.panelMane.butNew.onRelease = function() {
              _root.newClip1.removeMovieClip();
              _root.clipMask.removeMovieClip();
              onTool = false;
              Mouse.show();
              _root.pen.removeMovieClip();
              _root.line.removeMovieClip();
              _root.gotoAndStop("newImg1");
    _global.XO = null;
    _global.YO = null;
    _global.WO = null;
    _global.HO = null;
    //creatNewPalitra
    function creatNewPalitra(color:String, w:Number, h:Number) {
              XO = 120;
              YO = 130;
              WO = w;
              HO = h;
              gotoAndStop(51);
              _root.createEmptyMovieClip("newClip1",0);
              newClip1.lineStyle(0,"0xFFFFFF");
              newClip1.beginFill(color);
              newClip1.moveTo(XO,YO);
              newClip1.lineTo(XO+w,YO);
              newClip1.lineTo(XO+w,YO+h);
              newClip1.lineTo(XO,YO+h);
              newClip1.lineTo(XO,YO);
              newClip1.endFill();
              _root.createEmptyMovieClip("clipMask",1);
              clipMask.lineStyle(0,"0xFFFFFF");
              clipMask.beginFill("0xFFFFFF");
              clipMask.moveTo(XO,YO);
              clipMask.lineTo(XO+w,YO);
              clipMask.lineTo(XO+w,YO+h);
              clipMask.lineTo(XO,YO+h);
              clipMask.lineTo(XO,YO);
              clipMask.endFill();
              newClip1.setMask(clipMask);
    function checkPole() {
              if (WO == null) {
                        return false;
              if ((_xmouse>=XO && _xmouse<=XO+WO) && (_ymouse>=YO && _ymouse<=YO+HO)) {
                        return true;
              } else {
                        return false;
    //New
    _root.panelTool.butCursor.onRelease = function() {
              onTool = false;
              Mouse.show();
              _root.kist.removeMovieClip();
              _root.pen.removeMovieClip();
              _root.line.removeMovieClip();
    //PEN
    creatClip = 10;
    _root.panelTool.butPen.onRelease = function() {
              onTool = true;
              _root.attachMovie("pensil","pen",1000000);
              Mouse.hide();
              _root.pen.startDrag(true);
              function drawPen() {
                        creatClip++;
                        lineSize = _root.panelProperties.poleSizeLine.text;
                        lineColor = _root.panelProperties.poleColorLine.text;
                        lineAlpha = _root.panelProperties.poleAlphaLine.text;
                        clip = _root.newClip1.createEmptyMovieClip("newClip"+creatClip, creatClip);
                        arrSloy.push(clip);
              _root.pen.onMouseDown = function() {
                        if (checkPole()) {
                                  drawPen();
                                  pen_draw_flag = true;
                                  clip.lineStyle(lineSize,lineColor,lineAlpha);
                                  clip.moveTo(this._x,this._y);
              _root.pen.onMouseUp = function():Void  {
                        pen_draw_flag = false;
              _root.pen.onMouseMove = function():Void  {
                        if (pen_draw_flag) {
                                  if (checkPole()) {
                                            clip.lineTo(this._x,this._y);
                                  updateAfterEvent();
    //BRUSH
    _root.panelTool.butkist.onPress = function() {
              onTool = true;
              _root.attachMovie("kister","kist",1000000);
              Mouse.hide();
              _root.kist.startDrag(true);
              function drawKist() {
                        creatClip++;
                        lineSize = _root.panelProperties.poleSizeLine.text;
                        lineColor = _root.panelProperties.poleFill.text;
                        lineAlpha = _root.panelProperties.poleAlphaLine.text;
                        clip = _root.newClip1.createEmptyMovieClip("newClip"+creatClip, creatClip);
                        arrSloy.push(clip);
              _root.kist.onMouseDown = function() {
                        if (checkPole()) {
                                  drawKist();
                                  kist_draw_flag = true;
                                  clip.lineStyle(lineSize,lineColor,lineAlpha);
                                  clip.moveTo(this._x,this._y);
              _root.kist.onMouseUp = function():Void  {
                        kist_draw_flag = false;
              _root.kist.onMouseMove = function():Void  {
                        if (kist_draw_flag) {
                                  if (checkPole()) {
                                            clip.lineTo(this._x,this._y);
                                  updateAfterEvent();
    //LINE
    _root.panelTool.butLiner.onRelease = function() {
              onTool = true;
              _root.attachMovie("liner","line",1000000);
              _root.line.startDrag(true);
              Mouse.hide();
              function drawLine() {
                        creatClip++;
                        lineSize = _root.panelProperties.poleSizeLine.text;
                        lineColor = _root.panelProperties.poleColorLine.text;
                        lineAlpha = _root.panelProperties.poleAlphaLine.text;
                        clip = _root.newClip1.createEmptyMovieClip("newClip"+creatClip, creatClip);
                        arrSloy.push(clip);
                        thisx = thisy=null;
              _root.line.onMouseDown = function() {
                        if (checkPole()) {
                                  drawLine();
                                  line_draw_flag = true;
                                  thisx = this._x;
                                  thisy = this._y;
              _root.line.onMouseUp = function():Void  {
                        line_draw_flag = false;
              _root.line.onMouseMove = function():Void  {
                        if (line_draw_flag) {
                                  if (checkPole()) {
                                            clip.clear();
                                            clip.lineStyle(lineSize,lineColor,lineAlpha);
                                            clip.moveTo(thisx,thisy);
                                            clip.lineTo(this._x,this._y);
                                  updateAfterEvent();
    //ERASER
    _root.panelTool.butEras.onPress = function() {
              onTool = true;
              _root.attachMovie("eraser","eras",1000000);
              Mouse.hide();
              _root.eras.startDrag(true);
              function drawEras() {
                        creatClip++;
                        lineSize = _root.panelProperties.poleSizeLine.text;
                        lineColor = "0xFFFFFF";
                        lineAlpha = "100";
                        clip = _root.newClip1.createEmptyMovieClip("newClip"+creatClip, creatClip);
                        arrSloy.push(clip);
              _root.eras.onMouseDown = function() {
                        if (checkPole()) {
                                  drawEras();
                                  eras_draw_flag = true;
                                  clip.lineStyle(lineSize,lineColor,lineAlpha);
                                  clip.moveTo(this._x,this._y);
              _root.eras.onMouseUp = function():Void  {
                        eras_draw_flag = false;
              _root.eras.onMouseMove = function():Void  {
                        if (eras_draw_flag) {
                                  if (checkPole()) {
                                            clip.lineTo(this._x,this._y);
                                  updateAfterEvent();
    //CURV
    _root.panelTool.butCurv.onRelease = function() {
              onTool = true;
              _root.attachMovie("liner","line",1000000);
              _root.line.startDrag(true);
              Mouse.hide();
              anchor1X = anchor2X=controlX=null;
              anchor1Y = anchor2Y=controlY=null;
              onClic = 0;
              function drawCurv() {
                        creatClip++;
                        lineSize = _root.panelProperties.poleSizeLine.text;
                        lineColor = _root.panelProperties.poleColorLine.text;
                        lineAlpha = _root.panelProperties.poleAlphaLine.text;
                        clip = _root.newClip1.createEmptyMovieClip("newClip"+creatClip, creatClip);
                        arrSloy.push(clip);
              _root.line.onMouseDown = function() {
                        if (onClic == 0) {
                                  if (checkPole()) {
                                            drawCurv();
                                            anchor1X = this._x;
                                            anchor1Y = this._y;
                                            onClic = 1;
                                            _root.attachMovie("point","point1",1000001);
                                            point1._x = anchor1X;
                                            point1._y = anchor1Y;
                        } else if (onClic == 1) {
                                  if (checkPole()) {
                                            anchor2X = this._x;
                                            anchor2Y = this._y;
                                            onClic = 2;
                                            _root.attachMovie("point","point2",1000002);
                                            point2._x = anchor2X;
                                            point2._y = anchor2Y;
                        } else if (onClic == 2) {
                                  if (checkPole()) {
                                            controlX = this._x;
                                            controlY = this._y;
                                            onClic = 0;
                                            curv_draw_flag = true;
                                            point1.removeMovieClip();
                                            point2.removeMovieClip();
                                            clip.lineStyle(lineSize,lineColor,lineAlpha);
                                            clip.moveTo(anchor1X,anchor1Y);
                                            clip.curveTo(this._x,this._y,anchor2X,anchor2Y);
              _root.line.onMouseUp = function():Void  {
                        curv_draw_flag = false;
              _root.line.onMouseMove = function():Void  {
                        if (curv_draw_flag) {
                                  if (checkPole()) {
                                            clip.clear();
                                            clip.lineStyle(lineSize,lineColor,lineAlpha);
                                            clip.moveTo(anchor1X,anchor1Y);
                                            clip.curveTo(this._x,this._y,anchor2X,anchor2Y);
                                  updateAfterEvent();
    //STAR
    _root.panelTool.butStar.onRelease = function() {
              onTool = true;
              _root.attachMovie("liner","line",1000000);
              Mouse.hide();
              _root.line.startDrag(true);
              function drawStar() {
                        creatClip++;
                        lineSize = _root.panelProperties.poleSizeLine.text;
                        lineColor = _root.panelProperties.poleColorLine.text;
                        lineAlpha = _root.panelProperties.poleAlphaLine.text;
                        clip = _root.newClip1.createEmptyMovieClip("newClip"+creatClip, creatClip);
                        arrSloy.push(clip);
              thisx = thisy=null;
              _root.line.onMouseDown = function() {
                        if (checkPole()) {
                                  drawStar();
                                  star_draw_flag = true;
                                  clip.lineStyle(lineSize,lineColor,lineAlpha);
                                  thisx = this._x;
                                  thisy = this._y;
                                  clip.moveTo(thisx,thisy);
              _root.line.onMouseUp = function():Void  {
                        star_draw_flag = false;
              _root.line.onMouseMove = function():Void  {
                        if (star_draw_flag) {
                                  if (checkPole()) {
                                            clip.moveTo(thisx,thisy);
                                            clip.lineTo(this._x,this._y);
                                  updateAfterEvent();
    //KVADRAT
    _root.panelTool.butRecttangle.onRelease = function() {
              onTool = true;
              _root.attachMovie("liner","line",1000000);
              _root.line.startDrag(true);
              Mouse.hide();
              function drawRecttangle() {
                        creatClip++;
                        lineSize = _root.panelProperties.poleSizeLine.text;
                        lineColor = _root.panelProperties.poleColorLine.text;
                        lineAlpha = _root.panelProperties.poleAlphaLine.text;
                        fillColor = _root.panelProperties.poleFill.text;
                        clip = _root.newClip1.createEmptyMovieClip("newClip"+creatClip, creatClip);
                        arrSloy.push(clip);
                        thisx = thisy=null;
              _root.line.onMouseDown = function() {
                        if (checkPole()) {
                                  drawRecttangle();
                                  kvadrat_draw_flag = true;
                                  thisx = this._x;
                                  thisy = this._y;
              _root.line.onMouseUp = function():Void  {
                        kvadrat_draw_flag = false;
              _root.line.onMouseMove = function():Void  {
                        if (kvadrat_draw_flag) {
                                  if (checkPole()) {
                                            clip.clear();
                                            clip.lineStyle(lineSize,lineColor,lineAlpha);
                                            clip.beginFill(fillColor,lineAlpha);
                                            clip.moveTo(thisx,thisy);
                                            clip.lineTo(this._x,thisy);
                                            clip.lineTo(this._x,this._y);
                                            clip.lineTo(thisx,this._y);
                                            clip.lineTo(thisx,thisy);
                                            clip.endFill();
                                  updateAfterEvent();
    //Clear
    _root.panelMane.butClear.onRelease = function() {
              for (a=0; a<arrSloy.length; a++) {
                        clip = arrSloy[a];
                        clip.removeMovieClip();
                        delete arrSloy[a];
    //Back
    _root.panelMane.butBack.onRelease = function() {
              i = arrSloy.length-1;
              clip = arrSloy[i];
              clip.removeMovieClip();
              arrSloy.pop();
    Thank you very much!!!

    Zhanbolat,
    In theory, conversion of this code is not difficult, especially because it is clear what the logic is designed to do. The issue is that you will not have an expected result once only this code is converted in isolation. This puppy uses some other objects that are written in AS2 including entities in the FLA library.
    In short, it looks like this application needs a total overhaul at every level in order for it to properly function as an AS3 program.
    With that said, although this is, again, not a difficult task, it is unlikely to find someone to do it for free. You may have a better luck if you start conversion yourself and post focused questions as you go.

  • Converting code from as2 to as3 and getting errors

    I am trying to get a counter that I found in as2 to work in as3 but I am getting errors when I publish.
    Here is my code:
    stop();
    var currSlide;
    addEventListener(Event.ENTER_FRAME, onEnterFrame);
    function onEnterFrame(evt:Event):void
    currSlide = root.rdinfoCurrentSlide +1;
    this.curSlide_txt.text = currSlide;
    this.totSlide_txt.text = root.rdinfoSlideCount;
    any suggestions?

    no code should be attached to objects.
    most of that looks like it's useless or worse than useless.   in particular, everything in the enterframe loop looks like it serves no purpose and repeatedly does useless things.  if it is doing something useful, it doesn't need to be done in a loop.
    and setting the rgb of a color instance does nothing useful.
    the only thing useful is setting brushColor when that brush movieclip is clicked.
    so, if you have a movieclip with class = "brush" in your library, you can use:
    var brushColor:uint;
    var blackBrush:brush=new brush();
    blackBrush.col = 0x000000;
    addChild(blackBrush);
    blackBrush.addEventListener(MouseEvent.CLICK,clickF);
    function clickF(e:MouseEvent):void{
    brushColor = MovieClip(e.currentTarget).col

  • Convert simple code from as2 to as3

    Hello, i am looking for some help here for something simple (i think)
    var txt:String = link1;
    btn.onRelease = function():Void {
    if( sample_id )
    getURL("http://www.website.com/registration?partner_id=" + sample_id + "sampleURLCode", "_blank");
    else
    getURL("http://www.website.com/registration?sampleURLCode", "_blank");
    Is there a way to make this simple code into AS3?

    Hi, Apparantly that's because the 'link1' and 'sample_id' variables are not within the scope of the code you posted above, Perhaps you have defined them outside on a different frame or class. You can either define them with the same code like:
    var sample_id:Number=1234;  //Use your own variable type and value here
    var link1:String = "your string or link URL here";
    var txt:String = link1;
    btn.addEventListener(MouseEvent.CLICK, gotoURL);
    function gotoURL(e:MouseEvent)
    if( sample_id )
          navigateToURL(new URLRequest("http://www.website.com/registration?sample_id=" + sample_id + "sampleURLCode"),"_blank");
    else
          navigateToURL(new URLRequest("http://www.website.com/registration?sampleURLCode"),"_blank");
    Or you can put a direct reference to your existing variable like (If your variables are defined on root/frame 1) :
    var link1:String = "your string or link URL here";
    var txt:String = MovieClip(this.root).link1;
    btn.addEventListener(MouseEvent.CLICK, gotoURL);
    function gotoURL(e:MouseEvent)
    if( MovieClip(this.root).sample_id )
          navigateToURL(new URLRequest("http://www.website.com/registration?sample_id=" + sample_id + "sampleURLCode"),"_blank");
    else
          navigateToURL(new URLRequest("http://www.website.com/registration?sampleURLCode"),"_blank");
    try that, or you can share your .fla !
    cheers

  • Converting short code from as2 to as3

    Some of these functions wont work in as3, and i would like it to be using gestures instead of mouse clicks.. Any help please?
        _root.attachMovie("brush","brush",10)
        _root.brush.onEnterFrame=function()
              Mouse.hide()
              startDrag(this,true)
              new Color (this.brushColor).setRGB(_root.brushColor)
        on(press)
              new Color(this).setRGB(_root.brushColor)
        onClipEvent (load) {
              myColor = 0x0000CC
              new Color(this).setRGB(myColor);
        on (release) {
              _root.brushColor= myColor;

    no code should be attached to objects.
    most of that looks like it's useless or worse than useless.   in particular, everything in the enterframe loop looks like it serves no purpose and repeatedly does useless things.  if it is doing something useful, it doesn't need to be done in a loop.
    and setting the rgb of a color instance does nothing useful.
    the only thing useful is setting brushColor when that brush movieclip is clicked.
    so, if you have a movieclip with class = "brush" in your library, you can use:
    var brushColor:uint;
    var blackBrush:brush=new brush();
    blackBrush.col = 0x000000;
    addChild(blackBrush);
    blackBrush.addEventListener(MouseEvent.CLICK,clickF);
    function clickF(e:MouseEvent):void{
    brushColor = MovieClip(e.currentTarget).col

  • Preloader (from as2 to as3)

    Hey ladies and gentlemen
    I'm currently converting one of my project to as3 and I hit a
    wall with this preloader problem.
    Before, with as2, I was using getBytesLoaded() and
    getBytesTotal() in a frame loop to display a progress bar and know
    when the loading was finished. I can't seem to find how to do this
    in as3.
    I read as3 language reference and some examples but they all
    deal with loading an external swf or file.
    I would think that the main swf would trigger progress events
    as it gets loaded so I made this little piece of code, which
    doesn't work.
    function ProgressHandler(theEvent:ProgressEvent)
    trace("bytes Loaded: " + theEvent.bytesLoaded + "
    bytesTotal: " + theEvent.bytesTotal);
    addEventListener(ProgressEvent.PROGRESS, ProgressHandler);
    stop();
    Can anyone point me back in the right direction?
    Thanks

    I just wanna make it clear that I'm trying to preload the
    main swf itself, I still can't find anything on the net about that.
    Anyone?
    Thanks!

  • Translation from AS2 to AS3

    Hi.
    Below I have a bit of code that determines the bandwidth that a user has.  It is written in ActionScript 2.  The problem is that I am unfamiliar with AS2, and I wanted to use this in conjunction with a live streaming video player built in AS3.  I was wondering if anyone could give me the equivalent code in AS3, or if there's any way to tell flash that a portion of the code will be written in AS2.
    Thank You,
    Ari Amiri
    nc = new NetConnection();
    nc.onStatus = function(info) {
        trace("Level: "+info.level+" Code: "+info.code);
        if (info.code == "NetConnection.Connect.Success") {
            trace("--- connected to: " + this.uri);
    nc.onBWDone = function(kbitDown, deltaDown, deltaTime, latency) {
        trace("onBWDone: kbitDown:"+kbitDown+" deltaDown:"+deltaDown+" deltaTime:"+deltaTime+" latency:"+latency);
        // app logic based on the bandwidth detected follows here
        detected_bw = kbitDown;
        // close the Netconnection to bwcheck
        this.close();
    nc.onBWCheck = function() {
        trace("onBWCheck");
        return ++counter; // Serverside, just ignore any return value, For now return the call count
    nc.connect("rtmp://localhost/bwcheck", true);
    stop();

    Yah very important point from NetDragon. As of version 3.0
    the netconnection " class was dynamic in ActionScript 2.0 but is
    now sealed. " so you can't just do something like:
    netconnection.client.somefunction = function() {...}
    The default netconnection.client = this, so you need to
    extend it with a custom class or an object to be able to add
    callback functions
    But be careful, I wrote an entire app that worked with the
    AS2.0 technique ...without an error from the compiler.....(flex
    2.0).

  • EventListener...: From AS2 to AS3..?

    I'm trying to rewrite som AS2 code so it will fit to AS3 but
    some minor problem occurs...
    Here's the AS2 code:
    panel.onRollOver = panelOver;
    function panelOver() {
    this.onEnterFrame = scrollPanel;
    delete this.onRollOver;
    The idea here is to create an EventListener in AS3 that will
    trigger when the pointer is rolling over the movieclip "panel".
    So far, so good...
    Here's the AS3 code so far:
    panel.addEventListener(MouseEvent.MOUSE_OVER, panelOver);
    function panelOver(myEvent:MouseEvent):void {
    this.onEnterFrame = scrollPanel;
    Now, the problem is to rewrite [delete this.onRollOver;] so
    it will work in AS3...
    Could it be something like:
    delete this.EventListener(panel)?
    I'm really struggling these days finding my way through AS3
    but I do feel that I'm starting to get a hang of it...
    Thank you for any help I get...!
    PS.
    I think I might run into some more problems after solving
    this one.. But we're all here to learn, aren't we?

    panel.removeEventListener(MouseEvent.MOUSE_OVER, panelOver);
    (parameters should match as in addEventListener)
    delete doesn't work.
    this.onEnterFrame = scrollPanel; wont work either. infact
    there is nothing called onEnterFrame in AS3..
    it would be like
    this.addEventListener(Event.ENTER_FRAME, scrollPanel);

  • Translating tellTarget from AS2 to AS3

    Hi all!
    I am truely a beginner and here is my problem.
    I have been working on a Flash website in coded in AS3. Now, I have found a stright-forward turorial on adding a Sound ON/OFF button coded i AS2!
    What I want to do is to translate the piece of AS2 code below to AS3:
    on (release) {
    tellTarget ("supernovastar.mp3") {
    stopAllSounds();
    on (release) {
    nextFrame();
    I am aware of the on (release) has been changes to EventListners in AS3 but I cannot figure the rest out.
    I am greatful for any advice and help!
    Thanks!

    tellTarget is AS1, not AS2, and is replaced with dot notation coding (aka OOP).  But since the command in this case is to stop all sounds, targeting an object doesn't seem necessary since it is a global command.  The replacement for it would be to import the SoundMixer class (early on) and call its stopAll() method.
    import flash.media.SoundMixer;
    SoundMixer.stopAll();
    For the second on(release) section, nextFrame is still valid in AS3

Maybe you are looking for

  • Extreme Slow Down In Speeds During Peak Hours

    1. Old LJU Single Master Socket, using new microfilter 2. Quite line test comes back silent 3. On an Unlimited Usage package 4. This problem has been occuring for the past couple of weeks now

  • How to create an entire new calendar?

    Can't seem to find an answer. I want to create a NEW new calendar. By new I mean the entire thing, not what iCal calls 'new calendar'. So I would have two separate calendars each w/ their own events and such.

  • Connecting Database with Struts

    package assignment.actions; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.Statement; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.Ht

  • All Adobe Programs Won't Launch

    I recently bought a copy of Adobe Master Collection CS6 about 3 months ago and all of a sudden none of my Adobe programs will launch. When I click to open the program it will load for about two seconds then a window will pop up saying amtlib.dll is m

  • Making your site have a keyword search

    How do I get my site to go to its address just by typing in a keyword in a browser. For example my site is www.lightingscoop.com, I want to type in lightingscoop in the address box and have it go to my site. How do i go about doing this? Most sites w