AS3's lack of popularity

I have a little experience with AS2 and recently started
learning AS3. I like AS3 I'm glad I decided to learn it. Does
anyone here have any idea why there are more than 10 times more
post in the AS1 and AS2 forum?

Because AS1 and AS2 have been around almost 10 times
longer.

Similar Messages

  • What is wrong with as3

    this is not a question about 'how i do X'. is rather a 'discussion' (flame or whatever, but to defend or argue about aspects, not people) about 'what is wrong with as3' and what aspects whould be taken into consideration for updates. right now i am using as3, and since i paid for this license, i choose this tool over some alternatives and i am using it to do stuff for other people who pay me to do it, i think it can be helpful for all of us if some actions are started in the right direction. i have already posted about 'all people in adobe are dumbasses that do not know how to make a scripting tool and are messing up my work', but i was pissed at the time (i still am pissed) but i believe this is not the right aproach. instead, if this goes to the right people in adobe, we all may get something in the future, like better and easier todo apps and web presentations.
    pre: not only about the as3 specification, but COMPLY with the specification that you set. for example, some time ago there were problems with matrix transforms. this was corrected later with a patch. but this means it is not even doing what is is supposed to do
    1. scriptable masks and movement, sprites and child sprites: there is a sprite with a mask, the mask is a shape drawn via script, something like
    somemask=new shape();
    somemask.graphics.beginfill();
    (...etc)
    somesprite.mask=somemask;
    just like that. now add some child sprites to 'somesprite', and make 'somesprite' move, scale and rotate. there you will have something like a kaleidoscope, but not what you expected to do with your script. as the child sprites move in the parent mask, you will see that the child sprites appear or dissapear kind of randomly, and if the child sprites are textfields, it may be that the text is rendered outside the mask, or partially rendered outside the mask (as in only part of the text), rendered with the wrongf rotation or in the wrong place. some child sprites are clipped correctly, some dissapear totally when only a part should dissapear (clipped) etc.
    way around: have not tried it yet, but i have the impression that bitmaps have different criteria for clipping, so i am thinking of trying this: appli an empty filter (a filter with params so it does not have any effect on the sprite or in the textfield) so the sprite is rendered as bitmap before doing anything else with it. as i said, i have not done it yet, but it may be a way around this problem, to avoid all this inconsistency with clipping
    1-b. inconsistency between hierarchy and coordinates, specially masks: you apply a mask to a sprite, yet the sprite has a set of coordinates (so 'x' in the sprite means an x relative to its container), yet the mask applied to the very same sprite, as another reference as reference for coordinates (like the stage)
    2. painting via script: in any other languaje, in any other situation, something like:
    beginFill(params);
    (...stuff 1)
    endFill();
    beginFill(params);
    (...stuff 2)
    endFill();
    (...etc)
    means: render region of block 1, then render region of block 2 etc, and no matter what, it should be consistent, since there is noplace for ambiguity. if you read it, you may think what that means, even if you dont run it you may have an idea of the picture you want to draw, but not with as3. as3 somehow manages to screw something that simple, and mixes all the blocks, and somehow uses the boundaries of one block as boundaries for other block. is like all blocks are dumped into whatever, and then uses all lines defined into it as boundaries for a unique block. it changes all boundaries and generates inconsistency between what is shown and redraw regions of the resulting picture, like lines that go to the end of the screen and then dont go away in the next frames, even tough the beginfill endfill block should prevent it
    3. event flow: i dont know what was the policy behind as3 event flow design. it is in no way similar or an extension to previous event flow, neither with any event flow in any other plattform. i dont know how most people start with as3; in my case, i unpacked, installed and when i tried to do something with what i already knew i could not, so i started reading the as3 docs, and since is like 800 pages long, i just read the basics and the rest i would 'wing it'. in the part of the event flow, there was something about bubbling and stuff, it was not clear at all and when i tried to do what is was said in the documentation (like preventing events to 'bubble', as is called in the documentation), i could not see any effect but i could see it was a mess. flash is not the only thing out there to work with pictures or to work with mouse events, but is the only one that deals with things like 'target' and 'currentTarget'. my first experience on needing this was when i was dealing with my own event handlers (so the only thing that had control over mouse was the stage, and i would admin everything via script). there were events generated everywhere, the stage got events that were not genrated directly over the stage, but got there not with stage coordinates but the coordinates relative to the sprite that generated the event. so if i hover the mopuse over the stage, and the stage has some things on it how does it work? i get multiple event calls, like it was hovering multiple times over the stage in a single frame, but in each call with different coordinates? and what if i set all child sprites as mouseenabled=false or compare like 'if (event.target != event.currenttarget)', what if i move the mouse over a child, does it prevent the move mouse event at all? or does it filter only the event call with only stage coordinates? in my case, every time i move over another clip (with mouseenabled = true), the stage gets it as 'mouse up', even tough there was never a mouse release, what the hell? do even the people at adobe know how to handle events with their own tool when they require it? why does an event 'bubble' when i have not specifically tell it to do it? mi thought is that this event flow was very poorly conceived, and tough the intention may have been that there were different cases and it shopuld cover all cases, they actually introduced new problems that were not present in traditional ways to handle it, and it is neither the easier way to handle things, and this way, a very simple problem turns into a very ugly thing because it must handle things that were not neccesary to handle, or were implicit in other situations.
    4. legacy: since as3, all interaction is different, and if you want to do things in the new plattform, using the new features, what you already knew just goes to the garbage can. when a new tool arrives, it should be an extension to previous tools (which is a reason to update instead of just buying a new tool from a different vendor). if everything i had or knew just means nothing from now on, then i can not say 'i know flash script', and my previous knowledge gives me no advantage when aproaching the new version. as3 is a new aproach that requires doc reading and stuff, even if you knew something about previous as specifications or other oo languajes. if you decide to change things from now on, like the things mentioned in this post, instead of just throwing away everything the users alerady knew about the tool, do like in java releases, they mark some things as 'deprecated', they keep working as they should, give a warning, but also a message saying this feature is deprecated, we suggest you use this library instead.
    5. lack of previous functionality: if you 'update' something, it meand all previos functionality is still there (probably improved, but not with bugs if it was working fine), plus something else. now it seems backwards, there are some things that could be done in previous versions but not in this one, like 'duplicatemovieclip'
    6. inconsistency with scripting/programming paradigms: (ok, fancy work, but fits perfectly here): as3 proposed ways to handle things, but the people who designed it got 'too creative', and they did something that is not consistent neither with previous versions of as or with other languajes. the documentations is full of things like 'it looks like x languaje or languaje family, but instead of using XXX word, you must use YYY'. great, what is this? namespaces 'work like', but 'differently' for example from java, .net, .c. its got the idea that a namespace means a grouped functionality but there are rules about where should be placed the file (ok, java has this also, .net takes care of it automatically if all files are registered in the project), but what you got is a mess that 'if you know other languajes you got the general idea, but nonetheless, even if you knew this or previosu versions of as, you still have to read whatever we decided arbitrarily just to be different'. namespaces, event handling, vars definition which is not like previous scripting neither like fully typed languajes.. is just a mess.
    7. lack of scripting and graphics integration: unlike flash and adobe tools that just got on the graphics side leaving all the scripting integratuion apart, most tools from other vendors integrate very well interacton with what is on the screen. the script editor: very poor. autocompletion? a drop down list that does not heklp at all, appears in the wrong places, and when you need it to go, it does not go (so if i want to move away from the uncalled drop down list, i have to click somewhere else, making developement slowewr instead of helping, so the drop down list does not capture all events when i dont want to). in other ides you double click somewhere and it will go to the part of code relevant to that event or whatever. for example microsoft tools, ok i am antimicrosoft, and one of the reasons was that when windows 95 got to market proposing itself as the ONLY pc os you could use if you wanted to keep useing the apps you already had, it was a lousy product full of flaws but you had to keep using it because you had no choice. what is so different from what is happening with flash just now? yet the ide of c# is awesome, works very well and seems reliable.
    adobe people: not all user are designers that just make pretty pictures. if it is not intended for scripting then why is it there. and if there are corrections to be done, they should patch all versions, not only the last one. previous version users also paid for their versions.

    Well, there is no point in arguing.
    I personally believe AS3 does exactly what it promises to do within limits (read: reasonable limits) of ECMA type of language. And sometimes it doesn’t do what we expect it to for it cannot possibly emulate everyone’s thinking process. The task, I guess, is to learn to think in terms of AS3 – not to try to make AS3 think like us. No language covers all the grounds. And no, it is not Java - with no negative or positive connotation. It is what it is. Period. I just hope that AS5 will be more Java like.
    You are right about the fact that it is not necessary to know all the aspects of language in order to perform the majority of tasks. But it is paramount to have a clear idea about such fundamental concepts as display list model and events. For instance, depth swap has no meaning in terms of AS3 because display list object stacking is controlled automatically and there is no need for all these jumping through hoops one has to perform in order to control depth in AS2. There no more gaps in depths and one always know where to find things.
    Similarly, there is no point in having duplicateMovieClip method. More conventional OOP ways of object instantiation accomplishes just that and much more. Just because OOP object instantiation needs to be learned doesn’t mean past hacks have place in modern times. duplicateMovieClip is a horse carriage standing next to SUV. What one should choose to travel?
    Events are implemented to the tee in the context of ECMA specifications. I consider Events model as very solid, it works great (exactly as expected) and never failed me. True, it takes time to get used to it. But what doesn’t?
    By the way, speaking about events, contrary to believe in Adobe’s inconsideration to their following. Events are implemented with weakly reference set to false although it would be better to have it set to true. I think this is because there are smart and considerate people out there who knew how difficult it would be for programming novices to deal with lost listeners.
    I think AS3 is million times better than AS2. And one of the reasons it came out this way is that Adobe made a very brave and wise decision to break totally loose from AS2’s inherent crap. They have created a totally new and very solid language. If they had tried to make it backward compatible – it would be a huge screw up, similar to how our friends at Microsoft are prostituting VB and VBA – extremely irritating approach IMHO.
    Also, Flash legacy issues shouldn’t be overlooked. Flash did not start as a platform for programmers. Entire timeline concept in many ways is not compatible with the best OOP practices and advancements. I think for anyone who is used to writing classes the very fact of coding on timeline sounds awkward. It feels like a hack (and AS2 IS a pile of hacks) – the same things can be nicely packaged into classes and scale indefinitely. As such I wouldn’t expect Adobe to waste time on hacking timeline concept issues by making smarter editor. They have made a new one – FlexBuilder – instead. Serious programmers realize very soon that Flash IDE is not for developing industrial strength applications anyway. So, why bother with channeling great minds into polishing path to the dead end?
    I would like to state that all this is coming form a person who knew Flash when there was no AS at all. And I applaud every new generation of this wonderful tool.
    I believe Adobe does a great job making transition from timeline paradigm to total OOP venue as smooth as possible. And no, they don’t leave their devoted followers behind contrary to many claims. They are working on making developing Flash applications as easy as possible for people of all walks. Welcome Catalyst!
    Of course there is not enough information about AS3 capabilities and features. But, on the other hand, I don’t know any area of human kind activities that does.

  • Creative Audigy lack of specifics and vaguen

    First of all, let me just say that i've never known a hardware card maker that can be so popular
    while at the same time be some of the most incredibly vague people on the planet. Its absolutely
    amazing. Case example:
    Exhibit A. I'm a computer tech and I come
    across an Audigy card in computer that i'm
    fixing so I need the *correct* drivers.
    Exhibit B. I have an Audigy cd-rom disk from apreviously owned card. I try to install the driverbut they're obviously incorrect but ALAS! the
    cd-rom i'm holding say its for an Audigy.
    Exhibit C. The drivers don't work correctlyso I check my windows Control Panel to seeif theres a way to *specifically" identifyit but the only thing it says is "Sound BlasterAudigy". Lovely. So, which brand could it be?
    Exhibit D. Ok, I need the correct drivers fora *specific* Audigy brand and I go to the Creativewebsite to do a search for Audigy drivers. Whatdo I find? About 0 different Audigy cards. Great.Here we go with the lack of specifics and vagueness....
    Exhibit E. So I proceed to take the card out ofthe computer and look at the model number toidentify it. It says "Soundblaster Audigy Model SB0090" and below that it also says"Audigy SB394 Advanced HD". So i'm thinkinghmmmm could this be an SB0090 or an SB394 butI soon find out its an SB0090 because an SB394is a "Firewire chip", which leads me to....
    Exhibit F. I find a link on the Creative websitethe says "Identify your product" and behold Ifind the SB0090 listed but its only listed as "Sound Blaster Audigy card with gold jack connectorand 394 port"..... so its off to the loony bin again.Again, which brand Creative? Still theres 0 differentbrands and still no way to specifically identify it!
    Exhibit G. Maybe I can tell by looking atthe pictures of the products provided on thewebsite. What do I find? Several differentcards that all look the same! They have the "gold jack connectors and 394 port" aswell as the "Advanced HD".
    So what is it's A "Gamer"? An "LS"? A "Platinum"or could it be an Audigy 2? WAKE UP CREATIVE,YOUR SOOOO VAGUE! Heres proof in summary:
    . Windows Control Panel - "Sound Blaster Audigy"But which brand?
    2. On the card itself - says "Sound Blaster AudigyModel SB0090".... but leads to nowhere becauseCreative's "Identify Your Product" only says:
    3. "gold jack connectors 394" but theresmore than one brand (Firewire) that look the
    same in the pictures!
    And here I am still with an unknown "Audigy" brand and no drivers that I can be sure willcorrectly work. Amazing, because if I were the owner of this card instead of the computertech, i'd probably throw your "Audigy" in the garbage (but i'd probably hit it with a sledgehammer a few times first).Message Edited by ZauR on 2-04-2004 09:55 PM

    ZauR,
    The Audigy downloads are listed by the packages that they came in. This was done to insure that customers that purchased a specific type of card (say an Audigy Gamer) would know that they were going to the right place. The driver pages for all but the LS is the same. So it isn't really a case of being vague, we are actually being rather specific (as a single listing for "Audigy" would be vague). Since there was never a retail package that was just an "Audigy" there is no listing like that.
    For the SB0090, I would suggest going to the Audigy Gamer download page (it is what I use for my SB0090) but really any of the pages except for the LS will work. The Audigy LS is the only Audigy card that requires different drivers and software.
    Jeremy

  • Lack of Mac & Linux Support Hurting Javafx 2.0 Early Adoption and traction.

    Lack of Mac & Linux Support Hurting Javafx 2.0 Early Adoption and traction.
    Oracle needs to come out with a Mac & Linux Beta built, or let developers know the real story behind Mac OS and Javafx 2.0.

    I too would like to at least be able to try the Mac/Linux ports, even knowing that they are behind the Windows version. But just knowing that Oracle is committed to them is enough to ease any nervous feeling that I'm choosing the wrong tech.
    I have no problems with the fact that Oracle is concentrating on Windows first. It makes sense. If you have to pick one platform to focus on while you are getting the kinks out, it makes sense for it to be the most popular platform. That's Windows. But there mustn't be too long of a wait for the others. (E.g. if they were in a public beta stage when the Windows version is at final release, that would help boost confidence in the platform.)
    So long as they don't make the same mistakes that were made with Swing, where there are too many assumptions that all platforms work the same - so things like Mac's screen menu bar had to be fit in after the fact by Apple using awkward hacks. (I notice that now even popular Linux distros (Ubuntu) are using the screen menu bar concept, though they have managed to fit that into the window manager in such a way that it didn't seem to cause much problems.)

  • Need to get rid of persistent images created with as3 - pls help

    I have used the following as3 code, courtesy of Jody Hall at theflashconnection.com .  It's a drag and drop that works great. Problem is the drag and drop images persist when I move on to other frames. How do I clear the images when finished so they don't appear in subsequent frames? Thank you in advance.
    import flash.events.MouseEvent;
    import flash.display.MovieClip;
    import flash.media.Sound;
    import flash.media.SoundChannel;
    var sndExplode:explode_sound;
    var sndExplodeChannel:SoundChannel;
    var dragArray:Array = [host1, agent1, physical1, social1, host2, agent2, physical2, social2, host3, agent3, physical3, social3];
    var matchArray:Array = [targethost1, targetagent1, targetphysical1, targetsocial1, targethost2, targetagent2, targetphysical2, targetsocial2, targethost3, targetagent3, targetphysical3, targetsocial3];
    var currentClip:MovieClip;
    var startX:Number;
    var startY:Number;
    for(var i:int = 0; i < dragArray.length; i++) {
        dragArray[i].buttonMode = true;
        dragArray[i].addEventListener(MouseEvent.MOUSE_DOWN, item_onMouseDown);
        matchArray[i].alpha = 0.2;
    function item_onMouseDown(event:MouseEvent):void {
        currentClip = MovieClip(event.currentTarget);
        startX = currentClip.x;
        startY = currentClip.y;
        addChild(currentClip); //bring to the front
        currentClip.startDrag();
        stage.addEventListener(MouseEvent.MOUSE_UP, stage_onMouseUp);
    function stage_onMouseUp(event:MouseEvent):void {
        stage.removeEventListener(MouseEvent.MOUSE_UP, stage_onMouseUp);
        currentClip.stopDrag();
        var index:int = dragArray.indexOf(currentClip);
        var matchClip:MovieClip = MovieClip(matchArray[index]);
        if(matchClip.hitTestPoint(currentClip.x, currentClip.y, true)) {
            //a match was made! position the clip on the matching clip:
            currentClip.x = matchClip.x;
            currentClip.y = matchClip.y;
            //make it not draggable anymore:
            currentClip.removeEventListener(MouseEvent.MOUSE_DOWN, item_onMouseDown);
            currentClip.buttonMode = false;
            sndExplode=new explode_sound();
            sndExplodeChannel=sndExplode.play();
        } else {
            //match was not made, so send the clip back where it started:
            currentClip.x = startX;
            currentClip.y = startY;
    DRAG AND DROP (I JUST DID THE LAST FOUR FOR THIS EXAMPLE)
    MOVING ON TO NEXT FRAME, YOU STILL SEE THE RECTANGLES.

    Thank you SO muchNed Murphy
    I'm a newbie to AS3 and I was trying to figure it out for past 2 weeks that why did swapChildren or setChildIndex or addChild, all of these made my Target Movieclip remain/duplicate/persist on the stage even after the layer containing the Target Movieclip has blank keyframes. I surfed so many forums and tutorials for the answer but turns out it was my lack of knowledge of basic concepts. I remember checking out this specific forum as well past week but due to it being "Not Answered" I skipped it. This should be marked as a "Correct Answer", The Empty MovieClip did the trick!
    I needed this solution for a Drag and Drop game, so that the current item that is being dragged is above all other graphic layers. And when all items are dropped on their correct targets, there is gotoAndPlay to Success frame label.
    I created a movieclip on the top layer with the same dimensions as the stage and put it at x=0 y=0 position. Instance name: emptymc
    And deleted the emptymc from the timeline during the Success frame label.
    Here is some code I used,
    1. MovieClip.prototype.bringToFront = function():void {
       emptymc.addChild(this);
    2.  function startDragging(event:MouseEvent):void {
      event.currentTarget.startDrag();
      event.currentTarget.bringToFront();
    I didn't know how to put the addChild and refer to the currentTarget in the startDragging function itself, for example
    emptymc.addChild(event.currentTarget);
    - This one didn't work inside the startDragging function "emptymc.addChild(this); "
    Is there a correct way I could have done it properly?
    Thanks,
    Dipak.

  • Parenting and child control with AS3

    Hi,
    I'm new to AS3 and although I can see some good practice and functionality I'm constantly getting stucked and can't yet make things that I would do so easily with AS2 - I almost need to relearn it from scratch!. Still I would appreciate some help and guidance on this...
    I made a class that creates a "kind" of menu with data from a XML file and basically what it does when it is called is create a emptyMC (a container), add a childMC (a square) and add another child (a text label). When I create the container I'm trying to add a MouseEvent that can act on each the container instances but all I can get is a MouseEvent on object containing all the added MCs. The code follows.
    Can anyone enlight me with this issue or explain what am I doing wrong.
    I can't understand well the dynamic parenting with AS3 and the lack of using instance names and dot parenting doesn't help.
    Thanks in advance.
    Note to Adobe: Previous versions of Flash Help Files and AS reference were by far more helpful than in CS4!
    In the timeline:
    import assets.myDynMenu;
    var theMenu:myDynMenu = new myDynMenu("menu.xml");
    stage.addChild(theMenu)
    stop();
    In the class:
    package assets
         import flash.display.*;
         import flash.events.Event;
         import flash.events.MouseEvent;
         import flash.text.TextField;
         import flash.net.*;
         public class myDynMenu extends Sprite {
              // INIT EXTERNAL DATA LOAD
              public function myDynMenu(theData) {
                   // LOADS THE MENU DATA FROM PREFORMATTED XML
                   var loader:URLLoader = new URLLoader();
                   var url:URLRequest = new URLRequest(theData);
                   loader.addEventListener(Event.COMPLETE, buildTheMenu);
                   loader.load(url);
              // XML MENU DATA LOAD CHECK - ON COMPLETE BUILD OBJECT AND CHILDREN
              public function buildTheMenu(event:Event):void {
                   var xml:XML = new XML(event.target.data);
                   for (var i=0; i<xml.menuData.menuItem.length(); i++) {
                        // ADDS A CONTAINER
                        var itemContainer:MovieClip = new MovieClip();
                        itemContainer.name = "menu" + i;
                        // THE NEXT LINE DOESN'T ACT AS I WISHED?!
                        // IN THE FUNCTION CALLED I NEED TO CONTROL THIS ITEM AND ITS CHILDREN
                        itemContainer.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
                        itemContainer.x = 100 * i;
                        itemContainer.y = 0;
                        itemContainer.mouseEnabled = true;
                        itemContainer.mouseChildren = false;
                        addChild(itemContainer);
                        // ADDS A CHILD TO CONTAINER (a square)
                        var itemBase:MovieClip = new MovieClip();
                        itemBase.graphics.beginFill(xml.menuData.mConfig.mainItemColor);
                        itemBase.graphics.drawRect(0,0,xml.menuData.mConfig.mainItemW,xml.menuData.mConfig.mainIt emH);
                        itemBase.graphics.endFill();
                        itemBase.name = "base" + i;
                        itemBase.mouseEnabled = false;
                        itemBase.mouseChildren = false;
                        itemContainer.addChild(itemBase);
                        // ADDS ANOTHER CHILD TO CONTAINER (a text label)
                        var theLabel:TextField = new TextField();
                        theLabel.x = 5;
                        theLabel.y = 5;
                        theLabel.selectable = false;
                        theLabel.mouseEnabled = false;
                        theLabel.border = true;
                        theLabel.text = xml.menuData.menuItem[i].mName;
                        itemContainer.addChild(theLabel);
              // THIS IS THE MOUSE OVER THAT I NEED TO ACT ON EACH itemContainer (AND CHILDREN)
              private function onMouseOver(event:MouseEvent):void {
                   event.stopPropagation();
                   trace("You are over " + this.name );

    use:
    package assets
         import flash.display.*;
         import flash.events.Event;
         import flash.events.MouseEvent;
         import flash.text.TextField;
         import flash.net.*;
         public class myDynMenu extends Sprite {
              // INIT EXTERNAL DATA LOAD
              public function myDynMenu(theData) {
                   // LOADS THE MENU DATA FROM PREFORMATTED XML
                   var loader:URLLoader = new URLLoader();
                   var url:URLRequest = new URLRequest(theData);
                   loader.addEventListener(Event.COMPLETE, buildTheMenu);
                   loader.load(url);
              // XML MENU DATA LOAD CHECK - ON COMPLETE BUILD OBJECT AND CHILDREN
              public function buildTheMenu(event:Event):void {
                   var xml:XML = new XML(event.target.data);
                   for (var i=0; i<xml.menuData.menuItem.length(); i++) {
                        // ADDS A CONTAINER
                        var itemContainer:MovieClip = new MovieClip();
                        itemContainer.name = "menu" + i;
                        // THE NEXT LINE DOESN'T ACT AS I WISHED?!
                        // IN THE FUNCTION CALLED I NEED TO CONTROL THIS ITEM AND ITS CHILDREN
                        itemContainer.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
                        itemContainer.x = 100 * i;
                        itemContainer.y = 0;
                        itemContainer.mouseEnabled = true;
                        itemContainer.mouseChildren = false;
                        addChild(itemContainer);
                        // ADDS A CHILD TO CONTAINER (a square)
                        var itemBase:MovieClip = new MovieClip();
                        itemBase.graphics.beginFill(xml.menuData.mConfig.mainItemColor);
                        itemBase.graphics.drawRect(0,0,xml.menuData.mConfig.mainItemW,xml.menuData.mCon fig.mainItemH);
                        itemBase.graphics.endFill();
                        itemBase.name = "base" + i;
                        itemBase.mouseEnabled = false;
                        itemBase.mouseChildren = false;
                        itemContainer.addChild(itemBase);
                        // ADDS ANOTHER CHILD TO CONTAINER (a text label)
                        var theLabel:TextField = new TextField();
                        theLabel.x = 5;
                        theLabel.y = 5;
                        theLabel.selectable = false;
                        theLabel.mouseEnabled = false;
                        theLabel.border = true;
                        theLabel.text = xml.menuData.menuItem[i].mName;
                        itemContainer.addChild(theLabel);
              // THIS IS THE MOUSE OVER THAT I NEED TO ACT ON EACH itemContainer (AND CHILDREN)
              private function onMouseOver(event:MouseEvent):void {
                   event.stopPropagation();
                   trace("You are over " + event.currentTarget.name );

  • AS3/Flash Dev Teams: Help me fix Flash's Clipboard API on Linux!

    Hello!
    I am hoping to get in touch with the Adobe development team responsible for the ActionScript framework (for Flash Player, in particular).  I would really like to work with them to fix this bug (or, hell, attempt to fix it myself if they'd give me access to their source control):
       https://bugbase.adobe.com/index.cfm?event=bug&id=3482860
    Long-story-short:
    The "System Clipboard" API (plain text format only) from Flash 9 worked wonderfully cross-platform (Windows, MacOSX, Linux).
    However, the AS3 "Desktop Clipboard" API (plain text, HTML, RTF, and custom formats) introduced in Flash 10 has issues on Linux.  In particular, it only set contents into a particular 1 of Linux's (X's) 3 clipboard/selection buffers, which prevents Linux users from pasting the copied contents into a Terminal session. The "System Clipboard" API from Flash 9 does not suffer from this problem.  (More background details are available in the Adobe bug linked above as well as the GitHub bug linked below).
    This bug has downstream ramifications for a relatively popular open source library (e.g. used by GitHub.com and bit.ly) that I maintain called ZeroClipboard:
       https://github.com/jonrohan/ZeroClipboard/issues/78
    As such, I would very much like to see these issues resolved, and am willing to actively help if at all possible.
    If there is a better way to get in touch with the AS3/Flash Dev Teams than the bugbase or these forums (e.g. a team email address, particular dev's Twitter account, etc.), please let me know. Thank you in advance!
    P.S. Yes, I know that Linux is no longer officially supported by Flash Player but I also know that Linux users still manage to install the latest versions of Flash with a few workarounds.  It is also heavily used by GitHub.com users, and is therefore a high priority user base for ZeroClipboard.
    P.P.S. I also tried to get a contact via the various Adobe/Flash/Flex Twitter accounts without any success.
    Sincerely,
       James M. Greene

    Epic failure. Worked hard to contact Adobe devs and finally got through to the team via their OSS director.  End result: they'll only do for security patches for Linux, won't even consider other bug fixes.

  • TLFTextField and AS3 / CS5

    Background:
    I could not make a purely AS3 TextFlow object display text in the same way as a TLFTextField object in the library, even though the settings appeared to be the same (checked using the library xml file in the fla/zip). (The spacing between letters was not kerned in the same way.)
    Therefore I changed tack and attempted to use a library object and update it with AS3. However, I feel that the TLF documentation is somewhat lacking, so I am sharing my findings, simple though they may seem to pros. The text was used for buttons, so I only needed to consider one paragraph with only one span.
    What I worked out
    It has taken me a long time, but I have finally worked out how to access the elements in a TLFTextField object in the library.
    //create an instance of the 'tlfContainer' symbol containing the  TLFTextField object, with the Instance name 'tlfTextField' and 'default'  as the text.
    var container:tlfContainer = new tlfContainer;
    //target the textFlow of the object
    var flow:TextFlow = container.tlfTextField.textFlow;
    //get the first (and only) child of the TextFlow, which is a ParagraphElement
    var paragraphElement:ParagraphElement = flow.getChildAt(0) as ParagraphElement;
    //get the first (and only) child of the ParagraphElement, which is a SpanElement
    var span:SpanElement = paragraphElement.getChildAt(0) as SpanElement;
    Now I can change the text (eg span.text = "new text";) and format the text (eg paragraphElement.direction = "rtl") AND have it display correctly!
    Questions:
    1. Is something like this documented somewhere that I have missed?
    2. Is there an easier way to do this, ie directly access elements? Using getParagraph() gave a null, even though the above worked..
    3. Why should a dynamically generated TextFlow look different to a TLFTextField object?

    It took me a while to find it when I saw an example of code a couple of days ago.
    It basically means a variable number of comma delimited paramaters. From online doc's:
    Statements, Keywords & Directives 
    Definition keywords
    ... (rest) parameter
    Specifies that a function will accept any number of comma-delimited arguments.
    I am trying to find a coding example or two to model my own.
    Thanks,
    Jim

  • Loading XML in AS3

    OK, so I think I have the basics of loading XML in AS3. But I
    can't seem to access the info once it is loaded. I'm using the to
    load the .xml file:
    var myXML:XML = new XML();
    var XML_URL:String = "music.xml";
    var myXMLURL:URLRequest = new URLRequest(XML_URL);
    var myLoader:URLLoader = new URLLoader(myXMLURL);
    myLoader.addEventListener("complete", xmlLoaded);
    function xmlLoaded(event:Event):void
    myXML = XML(myLoader.data);
    trace("Data loaded.");
    But when I go to trace the .xml file with this:
    trace(myXML.toXMLString());
    I get nothing. However, if I place this trace inside the
    xmlLoaded function it traces it out. My problem is I want access to
    the info outside of that function. What am I doing wrong? Any
    advice or help would be greatly appreciated. Thanks.

    backpages,
    > But when I go to trace the .xml file with this:
    >
    > trace(myXML.toXMLString());
    >
    > I get nothing.
    This looks like a matter of timing. Your first five lines
    are
    encountered one after the other, starting with var myXML
    through
    myLoader.addEventListener(), which calls a function defined
    immediately
    below that. The function is called when the "complete" event
    is dispatched,
    which may take longer or shorter depending on the size of the
    XML document
    and network traffic. If you put a trace() statement
    immediately below that,
    Flash will execute that too -- and at the moment it does,
    your XML document
    hasn't loaded yet.
    > However, if I place this trace inside the xmlLoaded
    function it
    > traces it out. My problem is I want access to the info
    outside
    > of that function. What am I doing wrong?
    I copy/pasted your code exactly, then followed it with this:
    var t:Timer = new Timer(5000);
    t.addEventListener(
    TimerEvent.TIMER,
    function():void {
    trace(myXML);
    t.start();
    ... which waits five seconds, then runs that trace(). Sure
    enough, it
    outputs the XML contents.
    If you want to use the myXML variable elsewhere in your
    movie, you just
    have to make sure those other locations don't reference the
    variable until
    it has a value (or account for a lack of value in the logic
    they use). You
    might, for example, put a stop() action in frame one, along
    with the
    existing code (and instead of my timer), then have the
    "complete" event
    handler issue a play() action. In later frames, the myXML
    variable would
    have the data you need, because the playhead won't advance
    until the data
    have been loaded.
    David Stiller
    Co-author, Foundation Flash CS3 for Designers
    http://tinyurl.com/2k29mj
    "Luck is the residue of good design."

  • AS3 Buttons and textfields

    Hi,
    I coming from an AS2 environment and trying to get my head around AS3.
    I have a dynamic Textfield on stage (instance name tfval)
    a movieclip named mcPlan, this contains a btn called s4
    but I cannot get the following to work:
    import flash.text.TextField;
    var tfval:String="Start";
    root.mcPlan.s4.addEventListener(MouseEvent.MOUSE_OVER,onOver);
    root.mcPlan.s4.addEventListener(MouseEvent.MOUSE_OUT,onOut);
    function onHover(event:MouseEvent):void{
    trace("dsds");
    root.tfval.text="Test From onOver";
    function onOut(event:MouseEvent):void{
    root.tfval.text="Test From onOut";
    Any help is apreciated!
    Thanks!

    aren't you seeing an error message about the lack of an onOver() function?  are you seeing any other error messages?

  • Delegate in as3

    This probably is trivial but I am not sure what the problem is. I am trying to call an event listener for a button. The problem is I have many buttons each with a string variable attached to them so that the click function can go to the frame name that is attached to the button. normally I would use the delegate class so that I could just call gotoAndPlay(this.frame) but as I understand it, as3 does not have the delegate class and basically does it automatically. So I call gotoAndPlay(this.frame) without using delegate. This results in a runtime error "ArgumentError: Error #2109: Frame label null not found in scene Scene 1." Does anyone know what the problem is? Here is my code:
    import flash.events.MouseEvent;
    button0.addEventListener(MouseEvent.CLICK,click);
    button0.frame = "scene_1";
    button1.addEventListener(MouseEvent.CLICK,click);
    button1.frame = "scene_2";
    button2.addEventListener(MouseEvent.CLICK,click);
    button2.frame = "scene_3";
    function click(event:MouseEvent):void{
        gotoAndPlay(this.frame);

    In case you are interested about why Delegate (which was a workaround in AS2) is no longer needed in AS3:
    Help Files: ActionScript 3.0 enables a method closure to automatically remember its original  object instance. This feature is useful for event handling. In ActionScript 2.0,  method closures would not remember what object instance they were extracted  from, leading to unexpected behavior when the method closure was invoked. The  mx.utils.Delegate class was a popular workaround, but it is no longer needed.

  • Using AlivePDF with AS3

    Hi, I'm somewhat new to AS3 and programming. I'm trying to use the AlivePDF library to export text from a text editor created in AS3 into a PDF. Can anyone link me to documentation or a tutorial that can help teach me how to integrate it into a normal AS3 file? I have no idea how to use the library and the only documentation I've seen for it is how to use it in Flex/Air, which is not what I'm looking for.
    Thanks!

    Last year, I did a project that used AlivePDF. I found that there wasn't as much tutorial content on the Web as I would have liked. For folks that are new(er) to AS3 - it is lacking enough in Flash  tutorials to make it "kinda out of reach" without struggling. Even for  myself, I wished there were more simple, but extensive, examples to cull  from.
    Like you, I kept getting search hits showing me a small handful of Flex apps that used it, but I was able to sift through a few things, including the website that provides the API for us. So this is most likely not going to get you what you want - it was a little bit of a slow start for me, and I just had to "grow" from the small examples I found on the main website, and look at the API documentation...and then put in the time to try my own simple tests.So, I can really only suggest that you start small, understand the basics of AlivePDF, and work from what you have success with.
    You've probably been here, but most of what I learned came from the various pages of th main AlivePDF website:
    http://alivepdf.bytearray.org/
    The link to the API documentation:
    http://alivepdf.bytearray.org/alivepdf-asdoc/
    there's a Google Wiki, with other API notes:
    http://code.google.com/p/alivepdf/wiki/APINotes

  • Benefits of AS3 over other programming languages

    Hi everyone i am writing a project on AS3 and trying to find
    the benefits AS3 has over other object orientated programming
    languages in designing a website and why it is getting so popular.
    Tried searching on google but has never got any useful information.
    Thanks for you assistance in advance

    nambo1,
    First of all, the real hero is the Flash Player. The Flash
    Player, the features it has, and the environments it runs in and
    how it runs in those environments (particularly the web browser,
    but as kglad pointed, it's very flexible and is used other places
    as well) is what makes it so popular. ActionScript is simply how
    you programatically use the Flash Player. ActionScript is an
    ECMAScript language of which there are others, but it's the Flash
    Player (and what you can do with it) that attracts people.
    The Flash Player has been popular for awhile now. AS3,
    however, is the latest and completely redone language for the Flash
    Player. Because it's new and because there are significant
    differences between AS3 and its predecessor (AS1 and AS2), there is
    some adoption time required. Many people are still using AS2. You
    can google to find out a lot more detail about the
    advantages/disadvantages to AS3 vs AS2, if that's what you're
    really looking for.

  • Benefits of AS3 over AS2?

    I would like to accomplish some very basic functionality in
    Flash, such
    as, creating buttons that link to other frames, scenes,
    websites,
    documents, turn on sounds, etc.
    I would ideally like to do this using the built in Behaviors,
    however,
    these will only work with AS2.
    1.) Is there any benefit to using AS2 over AS3?
    2.) Is there a date that Adobe has announced where they will
    no longer
    support AS2?
    Thanks.

    nambo1,
    First of all, the real hero is the Flash Player. The Flash
    Player, the features it has, and the environments it runs in and
    how it runs in those environments (particularly the web browser,
    but as kglad pointed, it's very flexible and is used other places
    as well) is what makes it so popular. ActionScript is simply how
    you programatically use the Flash Player. ActionScript is an
    ECMAScript language of which there are others, but it's the Flash
    Player (and what you can do with it) that attracts people.
    The Flash Player has been popular for awhile now. AS3,
    however, is the latest and completely redone language for the Flash
    Player. Because it's new and because there are significant
    differences between AS3 and its predecessor (AS1 and AS2), there is
    some adoption time required. Many people are still using AS2. You
    can google to find out a lot more detail about the
    advantages/disadvantages to AS3 vs AS2, if that's what you're
    really looking for.

  • Communities for game or app development as3?

    I am working on 2 projects at www.wudiware.com. Emma (an "easy" to use rapid data collection and processing app), and Space Out (a space shooter game with minion ships and systems/galaxies that expand as you explore). Are there any popular communities that handle both game and more serious-oriented app development? Is there some forum here at adobe? I've been working on them for a while, at least space out, but don't know what to do about getting feedback/users to try them. They use php and mysql to act like a server, and are written purely in as3. Space out has had more functional versions that were based on a development kit, which I am trying to move away from now. I'm not a business, just one person trying new things, new to me at least.
    I'm much more interested in working on Emma, as I've never seen anything quite like it (I'm sure some things like it exist though?) And space out would just be yet another space game.
    Any insight into the world of flash development communities would be appreciated, thanks.

    Depending on where you live, a fantastic resource can be your owjn local community/user group. Search online for your area - just about every major metro area likely has 1 or 2 Flash/Flex/AS3 groups that might meet once a month.

Maybe you are looking for

  • PLEASE HELP me select new internal hard drive for Macbook Pro 2012 (non-retina)

    Good afternoon. I just bought a Macbook Pro 2012 (non-retina) 15 inch from a friend.  I think it is running Mountain Lion (has not been upgraded to Mavericks yet), and has iLife on it.  It came with the stock 500 gb 5400 rpm internal hard drive.  At

  • WRT54GS v6 dropping packets on outgoing non-http ports

    Hi, I'm having a strange issue with my WRT54GS. When I try connecting to outgoing ports other than 80 (for example ftp, VNC, proxy...), I get erratic behavior from the router. Sometimes the connection works sometimes it doesn't. Here are some more sp

  • ECC 6.0 Purchase Order Smartforms

    Dear all,   I know the standard PO smartform and print program are:   Smartforms: /SMB40/MMPO_L   Print Program: /SMB40/FM06P But i can't find them in my ECC 6.0 system.  Any suggestion?? Regards, Kit

  • Does white need to be transparent for one color t-shirt printing?

    Hi, I made one color (black and white) graphic as an Illustrator file for a guy who is printing it with one color on t-shirts. Some of the white areas are formed from white objects on top of black objects and some are transparent areas like the backg

  • JSF 1.0

    Is there information available to indicate when 1.0 would be available (JSF)? Target?