Problem with AS3

Hello, I'm still learning Flash and Action Script 3, however
i decided to try and create a game for a class. I have run into a
problem, which I'm not sure how to fix. When I navigate to the
second frame of the movie and use the buttons I recieve "TypeError:
Error #1009: Cannot access a property or method of a null object
reference.
at Untitled_fla::MainTimeline/team1_select()"
The file is set up as 3 layers, the first is a single key
frame extending the length of the document with only action script.
The second layer contains a single key frame extending the length
of the document, this layer has the navigation buttons, and the
score buttons. The third layer contains a key frame on every frame,
there are duplicated buttons on each frame (win and fail). How
would i fix this? Any help is appreciated, Thanks
The script is fairly simple, as follows
"stop();
prev_btn.addEventListener(MouseEvent.CLICK, prev_frame);
function prev_frame(evt:MouseEvent):void
prevFrame();
next_btn.addEventListener(MouseEvent.CLICK, next_frame);
function next_frame(evt:MouseEvent):void
nextFrame();
team1_btn.addEventListener(MouseEvent.CLICK, team1_select);
function team1_select(evt:MouseEvent):void
team1_light.gotoAndStop(2);
win_btn.addEventListener(MouseEvent.CLICK, team1_increase);
fail_btn.addEventListener(MouseEvent.CLICK, team1_decrease);
function team1_increase(evt:MouseEvent):void
team1_score.nextFrame();
win_btn.removeEventListener(MouseEvent.CLICK,
team1_increase);
fail_btn.removeEventListener(MouseEvent.CLICK,
team1_decrease);
team1_light.gotoAndStop(1);
function team1_decrease(evt:MouseEvent):void
team1_score.prevFrame();
win_btn.removeEventListener(MouseEvent.CLICK,
team1_increase);
fail_btn.removeEventListener(MouseEvent.CLICK,
team1_decrease);
team1_light.gotoAndStop(1);
team2_btn.addEventListener(MouseEvent.CLICK, team2_select);
function team2_select(evt:MouseEvent):void
team2_light.gotoAndStop(2);
win_btn.addEventListener(MouseEvent.CLICK, team2_increase);
fail_btn.addEventListener(MouseEvent.CLICK, team2_decrease);
function team2_increase(evt:MouseEvent):void
team2_score.nextFrame();
win_btn.removeEventListener(MouseEvent.CLICK,
team2_increase);
fail_btn.removeEventListener(MouseEvent.CLICK,
team2_decrease);
team2_light.gotoAndStop(1);
function team2_decrease(evt:MouseEvent):void
team2_score.prevFrame();
win_btn.removeEventListener(MouseEvent.CLICK,
team2_increase);
fail_btn.removeEventListener(MouseEvent.CLICK,
team2_decrease);
team2_light.gotoAndStop(1);
}"

Thanks for the response. I figured out what was causing the
error, for the layer with the duplicated key frames, the original
has the buttons win_btn and loose_btn. for some reason loose wasn't
working so i replaced it with fail, but forgot to update the other
key frames. doing so fixed the issue.

Similar Messages

  • Problem with AS3 "ExternalInterface.call" in InternetExplorer

    Hi,
    Explaining how the page is setup:
    I have a HTML page with 2 different AS3 Flash movies.
    The first flash movie is the main animation and sits in the
    middle of the screen with a large background image set into the
    body of the HTML.
    The second flash movie stretches 100% width/height of the
    screen dimensions and acts as a fade from black>to invisible.
    What I'm trying to do:
    Once the second Flash animation has faded from black to
    invisible it calls a JavaScript function in the HTML page to hide
    the div element the second flash movie is embed into (this is
    because the first flash movie will display a set of input boxes
    which the user needs to be able to type into - which they wont be
    able to click on if there is another flash movie overlaying the
    entire first movie).
    My intial solution:
    In the second Flash movie is the following code:
    stop();
    // this will load the API necessary to communicate with
    external entities
    import flash.external.ExternalInterface;
    // call the JavaScript function
    ExternalInterface.call('myJavaScriptFunction');
    ...and this works fine in Mozilla Firefox/Safari. The
    actionscript successfully calls the JavaScript function in the HTML
    page and that JavaScript function simply (at this stage displays an
    alert() message to show that it has been successfully called).
    Problem with IE:
    But, the moment I try this in Internet Explorer I don't get a
    alert() message but a JavaScript error message that says:
    Code: Select all
    Line: 1
    Char: 106
    Error: 'null' is null or not an object
    Code: 0
    As you can expect I'm totally confused as to what the problem
    could be.
    This is really urgent as it's a live project that needs to
    get completed immediately, so any help you may have would be
    greatly appreciated!
    Kind regards,
    Mark.

    My guess is that its to do with your embedding code. Check a)
    you have an id attribute assigned to the resulting object tag from
    whatever embedding method you use and b) for good measure make sure
    its unique in your html page.
    Javascript needs to have a valid reference to return the
    value from the javascript function back to flash. In my experience
    IE is more sensitive to issues here.
    If you get stuck post a test page somewhere.
    Tools to use to help with javascript debugging and view the
    html embed results (e.g. from swfobject or activecontent.js):
    In firefox : Firebug
    In IE: IE Developer Toolbar , Companion JS, and DebugBar are
    all helpful and , combined, get close to Firebug.

  • Other problems with loading Captivate files into Flash AS3 project

    I have a Captivate file done with Captivate 3, published to
    Flash player 9 that is being loaded into Flash AS3. The captivate
    is a simple recording of some mouse clicks in a browser. I am
    displaying the playbar along the bottom, and its buttons all work
    fine except for the progress bar, where you can drag the knob and
    scrub back & forth in your presentation.
    This progress bar is not working as it should. I see the
    mouse cursor change to a hand, but when I click I cannot drag the
    knob to control the progress bar. The other buttons in the playbar
    do work (replay, pause, play, back, forward).
    This is a unique problem in that it is only happening when
    viewed in IE (7) when loaded into my Flash AS3 project. When viewed
    in Firefox in my project, or as a standalone SWF, or as a SWF
    simply embedded onto a plain HTML page, it works just fine.
    Does anybody have any insight?
    Another thing I notice with loading Captivate files with AS3
    is the the amount of output messages it displays. Rather annoying
    (unless this is a "feature" I've yet to be aware of - heh)

    Hi,
    I know exactly how you feel, there is simple answer; replace
    Captivate for Camtasia Studio 5 at techsmith.com. The weight on
    those shoulders will be gone! You'll smile more, be more
    socialable. One Happy Person.
    I am very happy person ;)
    Kind Regards,
    Boxing Boom

  • Some strange problem with Flash/As3

    Hi,
    I am having some strange problem with my flash cs3.
    Whatever script I write in as3  doesn't work, even a stop() function doesn't work . But when I change my publish setting to as2 it works fine.
    Not sure about the root cause, may be some setting or preference or my cs3 is corrupted.
    Can anybody please advise.
    Thanks,
    Kishor

    try this
    create a new fla as3,
    select frame 1
    open the actions panel
    paste in the following code
    var squares:Array = new Array;
    setup();
    function setup():void {
        for (var i = 0; i < 25; i++) {
            var square:Sprite = new Sprite();
            //square.name = "square" + i;
            square.graphics.beginFill(Math.random() * 0xffffff);
            squares.push(square);
            squares[i].graphics.drawRect(0, 0, 100, 100);
            squares[i].x = i*3;
            squares[i].y = i*3;
            squares[i].filters = [];
            square.graphics.endFill();
            stage.addChild(squares[i]);
    for (var j = 0; j < squares.length; j++) {
        squares[j].addEventListener(MouseEvent.MOUSE_DOWN, dragMovie);
        squares[j].addEventListener(MouseEvent.MOUSE_UP, dropMovie);
        squares[j].buttonMode = true;
    function dragMovie(event:MouseEvent):void {
        event.target.startDrag();
    function dropMovie(event:MouseEvent):void {
        event.target.stopDrag();

  • Problems with Captivate 5, LMS, and AS3

    I recently acquired Captivate 5 and I am having difficulty getting it to work with our LMS (Plateau). When I publish a presentation to AICC using Captivate 5, and try to load it in the LMS, it doesn't get past the loading page. I've tried it with an existing course, and I've tried making a simple (3 slides with a text box) new presentation in Captivate 5 and I have the same problem. However, the .swf and .htm files load fine when viewed directly. It's only when run through the LMS that I have a problem.
    I  was able to reproduce the problem with Captivate 4 by publishing to  ActionScript3. It worked fine when I used AS2. Unfortunately, Captivate 5  doesn't allow publishing to AS2, so I'm at a loss of how to address  this.
    Any suggestions? Is anybody else experiencing this problem?

    What brand is your LMS?  (What manufacturer)
    What versions of SCORM does it support?
    What version of ActionScript does your LMS support?  AS2 or AS3?
    Have you tried uploading a short Captivate 5 lesson with only a few slides and one or two questions (example: True False question)?
    If you have Captivate 3 or 4, have you tried uploading a lesson in AS2 to see if your LMS accepts it?
    We need more information than just saying: Course not work.
    Test first on very simple short lessons to make sure the LMS will accept Captivate 5 content at all.  If it will play simple content, try more complex content.
    Your issue could be caused by some component or object in the course, or it could be some issue with the LMS.  At this stage we do not know the cause, but it can often be determined by testing with simple projects first and then adding complexity until something breaks.

  • Major Problems with _self in AS3

    Okay, so I'm pretty much a self-taught Flash newb, so please bear with me if this question has an obvious answer.  I've searched different fixes, and none of them have worked.
    I am making a simple button in Flash CS4 with AS3.  The button has a hover effect and that's it.  I am wanting the button to link to a different webpage when clicked on in the same window.  I am using this code:
    Button.addEventListener(MouseEvent.CLICK, onMouseClick);
    function onMouseClick(e:MouseEvent):void
        var request:URLRequest = new URLRequest("http://www.mysite.com);
        navigateToURL(request, "_self");
    When I test the movie in Flash, it works fine.  It takes me to the webpage.  However, when embedded online, it does nothing.  I can click on it, and I will remain there on the same page.  Like it's just a pretty image with a hover effect and no link.  I've tested the button in both IE and Firefox, and it does not work in either.
    Now here's the funny thing....when I use _blank instead of _self, it works just fine in both Firefox and Explorer.  Any ideas of what I am doing wrong?
    Thank you.

    why you are adding the event listener to Button it is one of the cless names flash provides.
    Make sure
    You have the code where you have your button.
    you have named your button instance properly.
    and you attach your event listener to the instance with the same name.

  • Playback problems with external FLV's

    Hi everyone,
    I am working on a site that loads all of the pages into a
    holder as swf's. Everything in the site works well, except that the
    first page takes a little longer to load than I wish it would. I
    want to find a good pre-loader but, for now, I am trying a
    different approach.
    The intro / opening page is a video I made in After Effects
    and imported into flash's time line, it is around 2.3MB and loads
    in about 5 seconds (to start playing) as a SWF. To make it load
    faster I re-exported from After Effects using cue points to trigger
    copy changes that had been sequenced in the timeline with the video
    before which works great, and imported the video as an external
    file that is loaded when the SWF loads.
    The problem is, once the "page" loads and plays and I
    navigate to another page, then go back to the home page, the whole
    flash system seems to be running much slower. Even rollovers and
    fades are taking a lot longer than before and the video playback is
    very choppy. The intro is a repeating flv that loops with AS3 that
    I found in another forum.
    Is there a way to "reset" the flash container so that each
    time it loads a SWF there is no residual data left behind? That's
    the only reason I can think of that would cause this kind of issue.
    I know that "unload" is not a function that is still available in
    AS3.
    Any ideas or suggestions are more than welcome.
    Thanks!
    Jeremiah

    You should backup your data regardless.    It is not a question of if you will lose data but when.   "Do you feel lucky today?" (asked Clint Eastwood in "Dirty Harry").  Here are several solutions:
         https://discussions.apple.com/docs/DOC-1992
         A backup with bad node is still better than no backup at all. Once you are backed up, you can use Alsoft Disk Warrior to repair those nodes, if the hardware of the drive isn't failing.
         You should also be aware that node issues can start when the hard drive gets over 85% full.

  • Problem with XML loading and xmlns

    I'm having a problem with loading an XML file that was created by Filemaker.  Filemaker will output an XML file using one of two different grammars.  One outputs in a mostly standard form that I can use with one glitch.  Flash CS4 AS3 seems to have a problem with the xmlns in one of the nodes.
    Specifically:
    <FMPDSORESULT xmlns="http://www.filemaker.com/fmpdsoresult">
    If I remove the xmlns="http://www.filemaker.com/fmpdsoresult" the file loads properly and I can access the various fields with no problem.  However, when I leave the xmlns=... in, it will trace out the XML properly but I can't access the fields using the code listed below.  This is driving me crazy!
    With the xmlns part in the XML file I get the following error when it tries to load the thumbnail files:
    TypeError: Error #1010: A term is undefined and has no properties.
    I need to have it so that the user can enter/edit data and simply output the XML file from Filemaker and then Flash will load up the unaltered XML file and show the info requested by the user.  That is to say I could have the user open the XML file in a word processing application and have them delete the xmlns..., but that is rather cumbersome and not very user friendly.
    I've tried every xml.ignore function I could find but it doesn't help.  Hopefully someone out there can help
    Thanks,
    -Mark-
    Partial XML:
    XML From Filemaker Export:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!-- This grammar has been deprecated - use FMPXMLRESULT instead -->
    <FMPDSORESULT xmlns="http://www.filemaker.com/fmpdsoresult">
      <ERRORCODE>0</ERRORCODE>
      <DATABASE>Sport.fp7</DATABASE>
      <LAYOUT></LAYOUT>
      <ROW MODID="1" RECORDID="1">
        <FirstName>Mark</FirstName>
        <LastName>Fowle</LastName>
        <Sport>Sailing</Sport>
        <Medal>None</Medal>
        <CourseOfStudy>Design</CourseOfStudy>
        <Year>1976-1978</Year>
        <HomeState>California</HomeState>
        <ImageName>93</ImageName>
      </ROW>
    </FMPDSORESULT>
    AS3 Code:
    import fl.containers.UILoader;
    var aPhoto:Array=new Array(ldPhoto_0,ldPhoto_1,ldPhoto_2,ldPhoto_3,ldPhoto_4,ldPhoto_5);
    var toSet:int=10;//time out set time
    var toTime:int=toSet;
    var photoPerPage:int=6;
    var fromPos:int=photoPerPage;
    var imgNum:Number;
    //var subjectURL:URLRequest=new URLRequest("testData_FM8.xml");
    var subjectURL:URLRequest=new URLRequest("Sports.xml");
    var xmlLoader:URLLoader=new URLLoader(subjectURL);
    xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
    var subjectXML:XML = new XML();
    subjectXML.ignoreWhitespace=true;
    subjectXML.ignoreComments=true;
    subjectXML.ignoreProcessingInstructions=true;
    function xmlLoaded(evt:Event):void {
        subjectXML=XML(xmlLoader.data);
        if (root.loaderInfo.bytesTotal==root.loaderInfo.bytesLoaded) {
            removeEventListener(Event.ENTER_FRAME, xmlLoaded);
            trace("XML Data File Loaded");
            trace(subjectXML);
        } else {
            trace("File not Found");
        imgNum=2;//subjectXML.ROW.length;
        trace(subjectXML);
        loadThumb(0);
    function loadThumb(startPos:int):void {
        var count:Number=aPhoto.length;
        trace(subjectXML.DATABASE);
        for (var i=0; i<count; i++) {
        try{
            aPhoto[i].source="images/"+subjectXML.ROW[startPos+i].ImageName+"_main.jpg";
        }catch (e:Error){
            trace(e);
            aPhoto[i].mouseChildren=false;
            aPhoto[i].addEventListener(MouseEvent.MOUSE_DOWN, onThumbClick);
        trace("Current mem: " + System.totalMemory);
        ldAttract.visible=false;
    function unloadThumb():void {
        var count:Number=aPhoto.length;
        for (var i=0; i<count; i++) {
            aPhoto[i].unload();
            aPhoto[i].removeEventListener(MouseEvent.MOUSE_DOWN, onThumbClick);
        trace("Current mem: " + System.totalMemory);
    function onThumbClick(evt:MouseEvent) {
        var i:Number;
        //trace("Thumbnail Clicked " + evt.target.name);
        i=findPos(evt.target.name);
        ldLrgPhoto.source="images/"+subjectXML.ROW[i+fromPos].LOCAL_OBJECT_ID+"_main.jpg";
        ldLrgPhoto.visible=true;
        btnPrev.visible=false;
        btnNext.visible=false;
        gotoAndStop("showPhoto");
    function findPos(thumb:String):Number {
        var pos:Number;
        var count:Number=aPhoto.length;
        for (var i:Number=0; i<count; i++) {
            if (thumb==aPhoto[i].name) {
                pos=i;
        return pos;

    Hi,
    I was trying to use xml namespaces, so in my application I receive an XML file from the server. The file has a namespace, so when I parse the file I need to specify the namespace:
    I got the following piece of xml:
    <ls:exchange xmlns:ls=".../tsw" xmlns:tm="http://kxa">
        <ls:projects>
             <tm:annotation id="" date="" action="getprojects" status="responseok"/>         
        <ls:project id="" name="proj" description="..." owner="asss"  release="2" />
            <ls:projectV  id="" version="" creationdate="" modificationdate=""/ >
        </ls:project>
    </ls:projects>
    </ls:exchange>
    and the following code
    <mx:VBox label="WELCOME" verticalScrollPolicy="off" horizontalScrollPolicy="off">
          <mx:Tree id="tree" dataProvider="{srv.lastResult.project}" labelField="@name"  width="300" height="100%" itemOpen="itemOpenEvt(event);" />
    </mx:VBox>
    So i want to display the content of the xml (project nodes”) in a tree view, but i don’t know how to includes the namespace"ls:" in the data provider “srv.lastResult.project”. can u help me it’s urgent.
    sincerly
    Celine

  • 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.

  • Problem with module lazy loading in flex 3

    Hi every body!
    I have some problems with Module lazy loading. I am using flex 3.5, Module-flex3-0.14, parsley 3.2.
    I can't get the LazyModuleLoadPolicy working correctly.
    In my main application (the one that loads the modules), my parsley context is the following:
            <cairngorm:LazyModuleLoadPolicy objectId="lazyLoadPolicy" type="{ OpenViewMessage }" />
         <cairngorm:ModuleMessageInterceptor type="{ OpenViewMessage }"/>
         <cairngorm:ParsleyModuleDescriptor objectId="test"
              url="TestModule.swf"
              applicationDomain="{ClassInfo.currentDomain}"
         />
    And to load my module:
    [Inject(id="test")]
    [Bindable] public var test:IModuleManager;
    <core:LazyModulePod
         id="moduleLoader"
         moduleManager="{test}"
         moduleId="testModule"
    />
    with  LazyModulePod.mxml:
    <mx:Canvas
        xmlns:mx="http://www.adobe.com/2006/mxml"
        xmlns:module="com.adobe.cairngorm.module.*"
        xmlns:parsley="http://www.spicefactory.org/parsley">
        <mx:Script>
            <![CDATA[
                import com.adobe.cairngorm.module.ILoadPolicy;
                import com.adobe.cairngorm.module.IModuleManager;
                [Bindable]
                public var moduleId:String;
                [Bindable]
                public var moduleManager:IModuleManager;
                [Bindable]
                [Inject(id="lazyLoadPolicy")]
                public var lazyLoadPolicy:ILoadPolicy;
            ]]>
        </mx:Script>
        <parsley:Configure/>
        <module:ViewLoader id="moduleLoader"
            moduleId="{ moduleId }"
            moduleManager="{ moduleManager }"
            loadPolicy="{lazyLoadPolicy}">
             <!--<module:loadPolicy>
                  <module:BasicLoadPolicy/>
             </module:loadPolicy>-->
        </module:ViewLoader>
    </mx:Canvas>
    OpenViewMessage.as in a swc:
    public class OpenViewMessage
            private var _moduleId:String;
            private var _viewId:String;
            public function OpenViewMessage(moduleId:String, viewId:String)
                this._moduleId = moduleId;
                this._viewId = viewId;
            public function get viewId():String{
                return _viewId;
            [ModuleId]
            public function get moduleId():String
                return _moduleId;
    In another flex project, my module context is:
    <mx:Object
         xmlns:mx="http://www.adobe.com/2006/mxml"
         xmlns:controler="com.cegedim.myit.controler.*">
         <controler:WindowControler/>
    </mx:Object>
    The module implements IParsleyModule
    <mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
         implements="com.adobe.cairngorm.module.IParsleyModule"
         xmlns:spicefactory="http://www.spicefactory.org/parsley">
         <mx:Script>
              <![CDATA[
                   import org.spicefactory.parsley.flex.FlexContextBuilder;
                   import com.adobe.cairngorm.module.IParsleyModule;
                   public function get contextBuilder():ContextBuilderTag
                    return contextBuilderTag;
              ]]>
         </mx:Script>
         <spicefactory:ContextBuilder  id="contextBuilderTag" config="{ MyITTestModuleContext }"/>
         <spicefactory:Configure/>
    </mx:Module>
    and the WindowControler:
    public class WindowControler
         public function WindowControler(){}
         [Init]
            public function initialize():void
                Alert.show("Module Initialized");
            [MessageHandler(scope="local")]
            public function openViewMessageHandler(message:OpenViewMessage):void
                Alert.show("Opening view " + message.viewId + " in the module " + message.moduleId);
    If i uncomment the basicLoadPolicy in LazyModulePod.mxml and remove the lazyModuleLoadPolicy, everything works fine. The module is loaded when it's added to stage and it receives correctly messages dispatched to it. But with the lazy policy the module never loads.
    I may have missed something or there is somthing i don't understand because i tried the ModuleTest provided in example in cairngorm sources. It works fine (i mean loading the moduleA2 when receiving a message), but if i replace the change the lazyModulePolicy to listen to broadcasted messages instead of a pingMessage, the module never loads too.
        <cairngorm:LazyModuleLoadPolicy objectId="lazyLoadPolicy" type="{ BroadcastMessage }" />
        <cairngorm:ModuleMessageInterceptor
            type="{ BroadcastMessage }" moduleRef="moduleA" />
    public class BroadcastMessage
        public function BroadcastMessage()
    If someone has any clue, i'll be happy to test it =)
    Thanks.

    Hello, back on my issue, i tested a little bit more the message dispaching.
    I read the lazyLoadPolicy class and noticed that it always has to have a ModuleId property in the message to work, that's why the broadcast message didn't work to awake the module with the lazy loading policy.
    So i added copy of my module:
         <cairngorm:ParsleyModuleDescriptor objectId="test"
              url="TestModule.swf"
              applicationDomain="{ClassInfo.currentDomain}"
         />
         <cairngorm:ParsleyModuleDescriptor objectId="testbis"
              url="TestModuleBis.swf"
              applicationDomain="{ClassInfo.currentDomain}"
         />     
    Set them both with a basicLoadPolicy, and tries to dispatch a message to only one of them using the ModuleId metatag. I then noticed that both modules received the message and not only the one i expected.
    I then changed the ModuleMessageInterceptor configuration to dispatch to only one kind of module:
    <cairngorm:ModuleMessageInterceptor type="{ OpenViewMessage }" moduleRef="test"/>
    and this worked as expected. Only the first module catched the message. I am obiously messing with the ModuleId metatag but i cannot see what's wrong...
    I compiled with
    -keep-as3-metadata+=ModuleId
    but this hasn't changed anything...

  • Problem with Getting Started

    Alright I'm having a problem with the Mac instructions for Getting Started with Alchemy (http://labs.adobe.com/wiki/index.php/Alchemy:Documentation:Getting_Started)
    Basically step 13 when I type :
    gcc stringecho.c -O3 -Wall -swc -o stringecho.swc
    gives me the following output
    Macintosh-3:stringecho aman$ gcc stringecho.c -O3 -Wall -swc -o stringecho.swc
    stringecho.c:10:17: error: AS3.h: No such file or directory
    stringecho.c:14: error: syntax error before ‘echo’
    stringecho.c:14: error: syntax error before ‘AS3_Val’
    stringecho.c:15: warning: return type defaults to ‘int’
    stringecho.c: In function ‘echo’:
    stringecho.c:22: warning: implicit declaration of function ‘AS3_ArrayValue’
    stringecho.c:22: error: ‘args’ undeclared (first use in this function)
    stringecho.c:22: error: (Each undeclared identifier is reported only once
    stringecho.c:22: error: for each function it appears in.)
    stringecho.c:29: warning: implicit declaration of function ‘AS3_String’
    stringecho.c: In function ‘main’:
    stringecho.c:41: error: ‘AS3_Val’ undeclared (first use in this function)
    stringecho.c:41: error: syntax error before ‘echoMethod’
    stringecho.c:47: warning: implicit declaration of function ‘AS3_Release’
    stringecho.c:47: error: ‘echoMethod’ undeclared (first use in this function)
    stringecho.c:50: warning: implicit declaration of function ‘AS3_LibInit’
    stringecho.c:50: error: ‘result’ undeclared (first use in this function)
    Macintosh-3:stringecho aman$
    From what I gather it seems that some files are missing (AS3.h) which is why the errors and warnings are caused... is there anything I have to do to get that file
    If anyone can help explain whats wrong and how to fix the problem it will be greatly appreciated
    Skribbs

    ausrelemac wrote:
    No, I enter pin, everything was fine, even wrote that connected to the network.
    then swipe to the left, to connect to the wi-fi and then writes: searching a mobile network. and can do nothing. 
    maybe my sim is not suitable ? I buy a sim free device...
    do you have a data plan on it?
     if not then you need to set it up with wifi
    Click here to Backup the data on your BlackBerry Device! It's important, and FREE!
    Click "Accept as Solution" if your problem is solved. To give thanks, click thumbs up
    Click to search the Knowledge Base at BTSC and click to Read The Fabulous Manuals
    BESAdmin's, please make a signature with your BES environment info.
    SIM Free BlackBerry Unlocking FAQ
    Follow me on Twitter @knottyrope
    Want to thank me? Buy my KnottyRope App here
    BES 12 and BES 5.0.4 with Exchange 2010 and SQL 2012 Hyper V

  • Problem with non-stop looping

    This file has been supposedly changed from As2 to As3. It seems as if it used to stop when I first got it. But the links didn't work. When I followed troubleshooting protocols, it started looping non-stop.
    Please help. I can't seem to attach the flv and the action script files. All I get from the output window is "Fonts should be embedded for any text that may be edited at runtime, other than text with the "Use Device Fonts" setting. Use the Text > Font Embedding command to embed fonts."
    Please help. I paid a coder to switch the file from as2 to as3 and this is what he gave me...

    contact that coder and let them know the problem.  if it's a problem with their code, they should fix it without charge.

  • Problem with action script 3 make input text box and button....

    Hi every one I am trying to make a family book using "Air for Android" with a simple search engin in the book
    air for android only work with AS3,
    the search function is to type a person's name and hit submit then go to a specific frame.
    have a problem making below code to work in AS3 and hopefully one of you guys can lead me in the right direction to fix the issue.
    Currently, I have an input text box and a button. When you type specific words into the input box and then hit the button it sends you to a specific frame.
    (it work find in AS2 but not in AS3,)
    Here is my current code that is placed on the main timeline, first frame:
    stop();
    onEnterFrame = function () {
        submit.onRelease = function() {
            switch (yourname.text) {
            case "name1" :
                gotoAndStop(2);
                break;
            case "name2" :
                gotoAndStop(3);
                break;
    My button that checks if the phrase is correct is called "submit" and my input box has an instance of "yourname".
    My phrases that will be accepted in the input box are "name1" and "name2" which bring me to two different frames.
    Basically, I'm having a problem with making this to work with AS3.

    you should use the default option in the switch statement
    that way yourname contains something not in one of the case statements it will go to the default bit and execute teh code there
    function onSubmit(e:MouseEvent):void
                                  switch (yourname.text)
                                            case "name1":
                                                      gotoAndStop(2);
                                                      break;
                                            case "name2":
                                                      gotoAndStop(3);
                                                      break;
                                            default:
                                                      goToAndStop(you frame you want);
                                            break;

  • Probleme with FULL_SCREEN

    Hi I have a probleme with full screnn I put this ligne stage.displayState= StageDisplayState.FULL_SCREEN; 
    in my code as3 of my project, I run my app with ctrl+enter I don't have any probleme and TLF Text are modifiable I can wirte a text, but when i run from swf or exe it run on full screen but i can't modify a text of TLF text, and i declare it modifiable!! .   resolution of my project 1280 x 720

    Use FULL_SCREEN_INTERACTIVE instead of just FULL_SCREEN

  • Create an XML object with AS3

    I want to create a basic XML object in AS3, but don't know
    how to do this.
    I first tried creating a string that represented my XML
    elements and their values, but then I don't know how to convert
    this string into an XML object.
    Secondly, I believe there are other ways of creating XML
    objects in AS without doing anything with strings.
    Can somebody please recommend to me a way to do this?
    An XML example to create with AS3 is:

    I've figured out the solution to my problem. For anyone
    interested, see me code below (the xml element names are different,
    but the concept is the same).

Maybe you are looking for

  • Slow file transfer

    Perhaps this question is best posted directly under some oxs 10.6 forum, but it is about iPhoto too. I'm been having problems with my iMac running slow, crashing, and such so I finally decided to start over, or at least experiment with it. So I've in

  • Interactive reporting using web client in Hyperion Workspace

    Hi all, I was trying to create a new interactive report using following process: 1)Logon to Workspace using browser 2)File -> New -> document 3)select the option: "Create interactive reporting document" 4)Browse for .oce file 5)Click finish, once the

  • How can I verify what version of IE11 (32 or 64) is running on a 64 bit version of Windows 7

    Hello, I recently upgraded from IE8 to IE 11. In the past when I would run ie8 from the Programs(86) folder it would indicate it was the the 32 bit version in the task manager by having an entry for iexplorer.exe *32 For IE11, the *32 does not show i

  • How to retrieve License file

    Hi Everyone, How do I retrieve my license file? The PAK was previously registered and we reformat the server and need a fresh installation but I don't know where to locate the license file. Thanks a lot.

  • Usage showing more memory than is accounted for

    how do i get rid of 'other' storage bloating?