AS3.0 ReferenceError

I'm seeing this strange error when I am testing my AS3.0
application. I've seen some other people having the same issue
online and I still don't know what the solution is. This seems like
a major problem.
It seems that if you reference a static class in one part of
your application and then load a .swf that references that static
class also, the compiler will throw this error at you:
ReferenceError: Error #1074: Illegal write to read-only property
YourClass on global
I have not found any way to fix this yet. Does anyone know
anything about this? Below is another post about the same issue
with some code examples even. Thanks for any help!
http://blog.fuelindustries.com/archives/000144.html
-Jason Kringen
[email protected]

Hey guys,
Thanks for the tips although I'm still not solving the
problem. I've attached a link for a .zip containing the classes
involved for this issue. Here's the error I'm getting at compile
time:
ReferenceError: Error #1074: Illegal write to read-only property
org.kringen.logging::DebugObj on global.
at global$init()
This ONLY happens when I load in a .swf file that references
the "Debuggable" class as well. It seems that when my .swf attempts
to create an instance of the "Debuggable" class, this error occurs.
Each of my classes extends this "Debuggable" class to define a
debugging interface for each class basically. Always works great
until a class from the .swf is instantiated that also uses this
"Debuggable" class. Then the error occurs. I've also attached a
link to the .swf that it's loading as well so you can check that if
you want too. Thanks so much!!
Classes:
http://www.kringen.org/dev/classes.zip
SWF File:
http://www.kringen.org/dev/rte_assets.zip
The main class file is FlashRTE.as. Thanks everyone. :)
-Jason Kringen
[email protected]

Similar Messages

  • Flash CS3: AS3 - ReferenceError #1065 Variable is not defined

    I have developed several actionscript classes. Two of these
    classes are associated with MovieClip objects in the library. The
    MovieClips have their Linkage Base Classes set to their respective
    package and class locations and when I check the Linkage settings
    (using the check mark icon) Flash CS3 reports that it can find the
    associated classes for both MovieClips.
    When I check the syntax of my code there are no problems, and
    when I test the Flash movie no Compile Errors are shown. Yet, in
    the output window I get the following error:
    ReferenceError: Error #1065: Variable class1 is not defined.
    ReferenceError: Error #1065: Variable class2 is not defined.
    I have placed class1 and class2 in the above error messages
    to represent the classes that are associated with the MovieClip.
    Am I missing an import command somewhere? I have the base
    class path properly set in the preferences of Flash CS3.
    Thanks,

    It appears that this issue was due to some of my classes not
    being marked as public. I had been following examples from AS2 that
    had the classes marked as dynamic without a private or public
    identifier. Apparently, AS3 assumes all unmarked classes are
    private.

  • AS3: How to access and control embedded sounds in an external swf?

    I rarely use sounds in AS3/Flash. I am using Flash Pro CS6, but I can't seem to figure out how to access, control (play, stop, etc) sounds embedded in an external SWF loaded into the main SWF.
    It's easy to control them when embedded on the main swf. However, on an externally loaded SWR, I get all kinds of errors. For this app, I really need to embed them in the external SWF.
    I read several solutions, but none seem to work.
    I embed the sound an mp3 file called soundSegment1.mp3 using Flash CS6 import tool and then open the actionscript properties panel on flash to select the class name: SoundSegment1. Then I edit the class code and create a file called SoundSegment1.as and it's saved right next to my document class main.as in the same directory. The code of the SoundSegment1 class looks like this:
    package  {
        import flash.media.*;
        public class SoundSegment1 extends Sound
            public function SoundSegment1 ()
                // no code in here
            public function playSound()
                var soundSegment1:Sound = new SoundSegment1();
                var channel:SoundChannel = soundSegment1.play();
    Then, in my main.as, I have done several attempts to play this sound such as:
    var fileLocation:URLRequest = new URLRequest(SWFToLoad); loader.load(fileLocation); loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeListener); loader.contentLoaderInfo.addEventListener(Event.INIT, initListener); 
    function initListener(e:Event):void // I also placed this code on the completeListener and it didn't work {      loader.content.soundSegment1.playSound(); // doesn't work.  }
    I get:
    Line XXX 1061: Call to a possibly undefined method playSound through a reference with static type flash.display:DisplayObject.
    or, I also read that I should be able to do something like this anywhere in the Main.as file:
    var theClass:Class = Class(loader.content.getDefinitionByName("SoundSegment1")); var theSound:theClass = new theClass(); theSound.play()  //doesn't work either.
    I also tried on the completeListener:
    var TheClass:Class = e.target.applicationDomain.getDefinition("SoundSegment1") as Class; var theSound:TheClass = new TheClass();
    theSound.play()  //doesn't work either.
    I get:
    ReferenceError: Error #1065: Variable SoundSegment1 is not defined. at flash.system::ApplicationDomain/getDefinition()
    I am stuck and I really need to get this to work. I would be genuinely grateful for your help.
    Thank you in advance for any help provided. I really need to get it to work, because I can't simply embed them in the main SWF or load them individually externally one by one.
    Thanks again!

    THANK YOU!
    I think your code may be over my head though. I think you are using an anonymous function which is not something I am familiar with (but I want to learn about if it's useful).
    I also don't know where the classS came from. I see that it's a parameter sent along with the event, but I don't really see where that came from.
    Someone at: http://www.kirupa.com/forum/showthread.php?305098-Playing-a-embedded-sound-in-an-external- swf&p=2658098#post2658098
    Is showing what seems to be an easier solution, but my problem there is I can't access the source file of the "child" swf....  ayayay.....
    I am going to tinker with your solution and see if it gets me anywhere. Thanks so much for your help again.

  • Loading an AS2 Swf into an AS3 project

    I have a need to be able to load legacy AS2 SWF's into a new
    AS3 project. I know that this is not readily possible, because you
    can only communicate between the two via the LocalConnection class.
    So, what I have done is to create an AS2 proxy SWF. This SWF will
    handle the loading of all legacy SWF's and act as a middleman to
    pass the function calls between the pre-compiled SWF and the new
    SWF using the LocalConnection class. The new SWF also needs to be
    able to load AS3 SWF's, though.
    Because of this, I have the need to detect the AS version of
    the loaded SWF. If 1 or 2, then change the source to the
    AS2Proxy.swf, if 3 then simply load it.
    I have written the following code. My problem comes in when
    the init event fires. Regardless of the compiled version of the
    loaded SWF, it always traces 3 as the AS version.

    Alright, I solved this problem, only to come up with many
    more.
    To solve this problem, I needed to point to the loaderInfo
    object of the UILoader's content. So:
    simulation.content.loaderInfo.actionScriptVersion.
    Now the proxy loads correctly, but I start getting errors
    immediately. Let me paste some code to show the next steps:
    First off. I immediately receive a StatusEvent error, though
    the path gets sent into the proxy and loads correctly.
    Next, when the complete event fires in the AS2 SWF - it sends
    a completion back up to let the AS3 SWF know that it finished (and
    any handling that needs to happen at that point.) I receive the
    following error:
    Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095:
    flash.net.LocalConnection was unable to invoke callback loadSwf.
    error=ReferenceError: Error #1069: Property loadSwf not found on
    com.applied.flash.events.AS2Connect and there is no default
    value.

  • AS3 returns a string of XML nodes as null....

    I am working on a project that calls and searches an XML sheet that looks like this:
        <Searchtext Wordlookup="john smith">
            <location>$1</location>
            <Name>john smith</Name>
        </Searchtext>
    and it continues like this for about 100+ people.
    Now, my flash takes this data and allows the user to either click on a textbox prefilled with a name (whose e.target.data.text is matched up to the xml using @Wordlookup) or type in the name of the person (again matching the textbox's content to @Wordlookup) which results in the location of that person lighting up (MC's are named the same as the location node for each). This end works perfectly fine using this code:
      var result:String = xmldata.Searchtext.(@Wordlookup == inputTxt.text.toLowerCase()).location.toString(); 
    Now I want to do the opposite; click on a location, and the code will match up that movieclip's name to a location node in my xm - light up that location, and output the person's name in the textbox. Only problem in that Flash apparently thinks a node in my xml is now a variable that is undefined (it should return as the name that is related to the location in my xml). I have looked high and low for a solution, but I just can't seem to solve it (it is probably simple, and I'll facepalm myself) The error inducing code is this:
      var resultz:String = xmldata.Searchtext.(location.text() == e.target.name).Name.toString();
    And the error produced is this: ReferenceError: Error #1065: Variable location is not defined.
    Not sure exactly why this is happening, thank you in advance for any help!

    So my as3: (I gave you this chunk in case I've just completely missed something here)
                                  loader = new URLLoader();
                                  loadXML();
                        private function loadXML():void
                                  loader.load(new URLRequest("data.xml"));
                                  loader.addEventListener(Event.COMPLETE, onXMLLoaded)
                                  trace("loaded");
                        private function onXMLLoaded(e:Event):void
                                  xmldata = new XML(loader.data);
                                  var itemXMLList:XMLList = XMLList(xmldata.Searchtext..location);
                var count:int = itemXMLList.length();
                trace(count);
                                  trace(xmldata.Searchtext.location[25].text().toString(),xmldata.Searchtext.location[25].text.length().toString());
                           trace(xmldata.Searchtext.location[0].text().toString(),          xmldata.Searchtext.location[0].text.length().toString());
            private function LocationClick(e:Event):void
    //         var resultz:String = xmldata.Searchtext.(location.text().toString() == e.target.name).Name.toString();
    //         inputTxt.text=resultz;
               trace(e.target.name, e.target.name.length);
               inputTxt.text=e.target.name;          
    My output using this:
    loaded
    78
    $1 0
    $2 0
    $1 2
    $2 2

  • ReferenceError: Error #1056:

    Getting this error when instantiating this class. It's set up
    in my FLA as the document class:
    ReferenceError: Error #1056: Cannot create property tab0 on
    classes.tagwidget.TagWidget.
    at classes.tagwidget::TagWidget/::addTabs()
    at classes.tagwidget::TagWidget$iinit()

    Hey,
    After declaring my custom class that extends MovieClip as dynamic, it worked!  But then all the AS3 code I placed in the frames of the Movieclip don't run now...  would u happen to know why?

  • AS3 loading multiple legacy AS2 accessing _level0..2

    I am building a Flex application that loads other Flex and Flash applications. The problem comes in with the legacy Flash applications, there are explicit references to _level0, 1, & 2 throughout the code base. Historically, the Flash application has a base container which is expected to be at _level0, then a middle layer and a top application referencing down to _level0.
    What I'm seeing is once a version 7 Flash app. is loaded by Flex the legacy Flash has no visibility to _level anything.
    I have tried SwfLoader and Loader with and without LoadContext ApplicationDomain.
    Any help would be greatly appreciated.
    thanks,
    Adam

    Alright, I solved this problem, only to come up with many
    more.
    To solve this problem, I needed to point to the loaderInfo
    object of the UILoader's content. So:
    simulation.content.loaderInfo.actionScriptVersion.
    Now the proxy loads correctly, but I start getting errors
    immediately. Let me paste some code to show the next steps:
    First off. I immediately receive a StatusEvent error, though
    the path gets sent into the proxy and loads correctly.
    Next, when the complete event fires in the AS2 SWF - it sends
    a completion back up to let the AS3 SWF know that it finished (and
    any handling that needs to happen at that point.) I receive the
    following error:
    Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095:
    flash.net.LocalConnection was unable to invoke callback loadSwf.
    error=ReferenceError: Error #1069: Property loadSwf not found on
    com.applied.flash.events.AS2Connect and there is no default
    value.

  • ReferenceError: Error #1056 - Has anyone come across this error?

    ReferenceError: Error #1056: Cannot create property text on spark.components.DataGroup.
                    at mx.binding::Binding/defaultDestFunc()[E:\dev\trunk\frameworks\projects\framework\src\mx\b inding\Binding.as:270]
                    at Function/http://adobe.com/AS3/2006/builtin::call()
                    at mx.binding::Binding/innerExecute()[E:\dev\trunk\frameworks\projects\framework\src\mx\bind ing\Binding.as:473]
                    at Function/http://adobe.com/AS3/2006/builtin::apply()
                    at mx.binding::Binding/wrapFunctionCall()[E:\dev\trunk\frameworks\projects\framework\src\mx\ binding\Binding.as:385]
                    at mx.binding::Binding/execute()[E:\dev\trunk\frameworks\projects\framework\src\mx\binding\B inding.as:321]
                    at mx.binding::Binding/watcherFired()[E:\dev\trunk\frameworks\projects\framework\src\mx\bind ing\Binding.as:499]
                    at mx.binding::Watcher/notifyListeners()[E:\dev\trunk\frameworks\projects\framework\src\mx\b inding\Watcher.as:311]
                    at mx.binding::PropertyWatcher/eventHandler()[E:\dev\trunk\frameworks\projects\framework\src \mx\binding\PropertyWatcher.as:377]
                    at flash.events::EventDispatcher/dispatchEventFunction()
                    at flash.events::EventDispatcher/dispatchEvent()
                    at mx.core::UIComponent/dispatchEvent()[E:\dev\trunk\frameworks\projects\framework\src\mx\co re\UIComponent.as:12140]
                    at spark.components::DataRenderer/set data()[E:\dev\trunk\frameworks\projects\spark\src\spark\components\DataRenderer.as:122]
                    at spark.components::DataGroup/updateRenderer()[E:\dev\trunk\frameworks\projects\spark\src\s park\components\DataGroup.as:819]
                    at spark.components::DataGroup/setUpItemRenderer()[E:\dev\trunk\frameworks\projects\spark\sr c\spark\components\DataGroup.as:793]
                    at spark.components::DataGroup/http://www.adobe.com/2006/flex/mx/internal::itemAdded()[E:\dev\trunk\frameworks\projects\s park\src\spark\components\DataGroup.as:1316]
                    at spark.components::DataGroup/initializeDataProvider()[E:\dev\trunk\frameworks\projects\spa rk\src\spark\components\DataGroup.as:609]
                    at spark.components::DataGroup/commitProperties()[E:\dev\trunk\frameworks\projects\spark\src \spark\components\DataGroup.as:722]
                    at mx.core::UIComponent/validateProperties()[E:\dev\trunk\frameworks\projects\framework\src\ mx\core\UIComponent.as:7684]
                    at mx.managers::LayoutManager/validateProperties()[E:\dev\trunk\frameworks\projects\framewor k\src\mx\managers\LayoutManager.as:572]
                    at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\trunk\frameworks\projects\frame work\src\mx\managers\LayoutManager.as:730]
                    at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\trunk\frameworks\projec ts\framework\src\mx\managers\LayoutManager.as:1069]
    This error is generated by the following code in the item renderer:
                      <s:Label id="owner"
                                  text="{(data.member as MemberVO).name}"
                                  />
    I’ve examines the data provider array collection and from what I can tell, all is as expected!
    I'm using Flex 4, nightly build 11921 in Windows XP environment

    Shankar,
    Thanks for the hint but I just discovered that it was the id that I assigned to the Label in s:ItemRenderer that was causing this error. I changed id value from 'owner' to 'owner1' and that took care of that error. If 'owner' is an existing property in the class hierarchy of s:ItemRenderer, shouldn't it give some "Identifier used more than once" type of error?
    In any case, I'm closing this case and hopefully someone familiar with this fundamentals of this issue will throw some light on it.

  • Making a popup window within flash as3

    Hello Flash people, I suspect this is an extremely easy and simple question from a beginner...
    I need to make a pop up window effect within a flash movieclip.
    I read another discussion where someone got the following advice...
    1. Dec 14, 2009 3:27 AM in response to: courtispeep
    Re: simple pop-up with AS3? ...not using javascript
    So you want it in actionscript 3?
    There are several ways to do it.
    One is to pull it out of the library the second is to place it on stage, set it visible = false via actionscript and set it visible = true when you click the button.
    popUp.visible = false;
    showBtn.addEventListener(MouseEvent.CLICK, ShowPopUP);
    function ShowPopUp(e:MouseEvent) {
         popUp.visible = true;
    popUp.hideBtn.addEventListener(MousEvent.CLICK, HidePopUp);
    function HidePopUp(e:MouseEvent) {
         e.currentTarget.parent.visible = false;
    This should work if you have the popUp placed on stage and you have, inside it, a button with an instance name "hideBtn". Also, of course you should name you popup window "popUp" and the trigger button "showBtn".
    So I tried this and but have the following compiler error...
    ReferenceError: Error #1065: Variable ShowPopUP is not defined.
    at default_fla::MainTimeline/default_fla::frame1()
    So I guess the author of this answer assumed the reader knew how to define the variables before inserting this code.
    But I do not know how. can someone explain this to me?
    Thank you very much in advance..

    The problem may just be related to the following typo since the variable mentioned bythe error is not a variable, but the name of a function... note the spelling difference and fix it
    showBtn.addEventListener(MouseEvent.CLICK, ShowPopUP);
    function ShowPopUp

  • CS3 - CS4 Migration, ReferenceError: Error #1065:

    Hi! I have been trying to migrate a CS3 based Flash project
    to the new CS4 IDE for some days, but it has been impossible. All
    the conponents of the library throw the same error at building
    time:
    ReferenceError: Error #1065: Variable <Class> is not
    defined.
    I have changed the name of all clases with the same name as
    the package,
    I have also changed the name of the main class,
    I have created a new empty .fla to copy and paste all the
    elements of the library,
    BUT I DO NOT STILL GET TO SOLVE THE PROBLEM.
    I have tried all solutions I have found on the Internet, but
    the error is still there. Could you please tell me what I am doing
    wrong? I would be very grateful if you could help me!
    thanks.

    Thanks for your reply kglad, but is not entirely correct. The
    code of the .as files is AS3, but some library elements were
    programmed in AS2. I did some tests yesterday and I can discard
    problems like missed "var". I think the problem is in the library
    elements. I don't understand what I'm doing wrong. In many forums,
    the people report a lot of problems with CS3 -> CS4 migrations,
    it can be a bug in CS4?(the project works fine in CS3) Any idea?
    Thank you very much!
    (Downgrade to CS3 is not an option, I need the new graphic
    acceleration features of the CS4 (FP10) in my project).

  • AS2 to AS3 Streaming Video Player

    Ok so Im trying to convert a video play that i made in AS2 to
    AS3 (I had a problem with nested movie clips and the control bar
    and i want to learn AS3) and i am having troblem even connecting to
    my rtmp server. With the player i made in AS2 i was able to connect
    and stream video no problem. But with AS3 I am not even able to
    connect to the rtmp server. Here is the AS2 code and the AS3 code:
    AS3:
    var video:Video = new Video(853,480);
    addChild(video);
    var nc:NetConnection = new NetConnection();
    nc.connect("rtmp://[ip of server]/sumone4life/videos");
    var ns:NetStream = new NetStream(nc);
    ns.addEventListener(NetStatusEvent.NET_STATUS,
    onStatusEvent);
    function onStatusEvent(stat:Object):void
    trace(stat.info.code);
    var meta:Object = new Object();
    meta.onMetaData = function(meta:Object)
    trace(meta.duration);
    video.attachNetStream(ns);
    ns.play("AdobeBand_640");
    And I get the error:
    ArgumentError: Error #2126: NetConnection object must be
    connected.
    at flash.net::NetStream/construct()
    at flash.net::NetStream()
    at videoPlayer_fla::MainTimeline/frame1()
    Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095:
    flash.net.NetConnection was unable to invoke callback onBWDone.
    error=ReferenceError: Error #1069: Property onBWDone not found on
    flash.net.NetConnection and there is no default value.
    at videoPlayer_fla::MainTimeline/frame1()
    Flash media server 3 Administrative Panel also shows that I
    am infact connected to the server but there is nothing being
    streamed from the server.
    AS2 Works:
    //Video Loading Controls
    var fileName:String = "AdobeBand_640";
    var nc:NetConnection = new NetConnection();
    var ns:NetStream;
    nc.onStatus = function(info){
    trace(info.code);
    if(info.code == "NetConnection.Connect.Success"){
    playVideo();
    function playVideo(){
    ns = new NetStream(nc);
    ns.onMetaData = onMetaDataHandler;
    videoObject.attachVideo(ns);
    _root.createEmptyMovieClip("vSound",
    _root.getNextHighestDepth());
    vSound.attachAudio(ns);
    ns.setBufferTime(5);
    ns.onStatus = function(info){
    trace(info.code);
    if(info.code == "NetStream.Buffer.Full"){
    bufferClip._visible = false;
    if(info.code == "NetStream.Buffer.Empty"){
    bufferClip._visible = true;
    if(info.code == "NetStream.Play.Stop"){
    ns.seek(0);
    ns.play(filename);
    //connects the stream
    nc.connect("rtmp://[ip of server]/sumone4life/videos");
    Can anyone offer any insite as to why it would be workin in
    AS2 and not in AS3? Or what i am doing wrong...

    I have a similar problem. Did you get your to work?

  • Fade Sound in AS3

    I have been trying for a while now to get sound to fade. Right now the sound plays using this in one frame:
    var applause:Applause = new Applause();
    var channel2:SoundChannel = applause.play();
    A couple frames away I tried this to get it to fade:
    var SoundFade = 1;
    var i = 0;
    do
    SoundMixer.soundTransform = new SoundTransform(SoundFade,0);// 1=vol, 0=pan
    trace("SoundFade "+SoundFade);
    SoundFade = SoundFade - .1;
    trace("i "+i);
    i = i + 1;
    } while (i!=10);
    Doesn't work. I understand from postings that AS3 is buggy with sound and TweenLite might be a better option so I have also tried this:
    TweenLite.to(channel2, 1, {volume:0});
    This gives me this error:
    ReferenceError: Error #1069: Property volume not found on flash.media.SoundChannel and there is no default value.
    at com.greensock::TweenLite/init()
    at com.greensock::TweenLite/renderTime()
    at com.greensock.core::SimpleTimeline/renderTime()
    at com.greensock::TweenLite$/updateAll()
    Can someone please help me with this? Very frustrated.
    -Kirk

    Here is how fading should be implemented using TweenLite. I tested this code and it works perfectly. You will need to accommodate this to your needs - for instance I loaded sound at runtime - just replace loading routine with instantiating sound from your fla library:
    var sound:Sound;
    var channel:SoundChannel;
    var sTransf:SoundTransform;
    loadSound();
    function loadSound():void
         sound = new Sound();
         sound.load(new URLRequest("sound.mp3"));
         sTransf = new SoundTransform();
         channel = sound.play();
         channel.soundTransform = sTransf;
         var timer:Timer = new Timer(2000, 1);
         timer.addEventListener(TimerEvent.TIMER, onTimer);
         timer.start();
    function onTimer(e:TimerEvent):void
         TweenLite.to(sTransf, 3, { volume: 0, onUpdate: updateChannel, onComplete: onFadeComplete } );
    function onFadeComplete():void
         channel.stop();
    function updateChannel():void {
         channel.soundTransform = sTransf;

  • ReferenceError: Error #1056: Cannot create property 0 on Number.

    Hi, I have an AS3 script that calls an XML but when compiling I get this error
    ReferenceError: Error #1056: Cannot create property 0 on Number.
    at mod::ML/parseData()
    at mng::DM/onXMLLoaded()
    Here are some snippets
    the first script that defines the XML
            private function addedToStageHandler(event:Event = null) : void
                var _loc_2:* = Application.getInstance();
                Application.xmlPath = "xml/soc.xml";
                _loc_2.initialize(this);
                return;
    here is the ML one
        public class Model extends EventDispatcher implements IModel
            public var social:Social;
            public function Model()
                return;
            public function parseSocialData(param1:XML) : void
                this.social = new Social(param1);
                this.socialSection.social = this.social;
                return;
            public function getSectionData(param1:String) : Absec
                var _loc_2:Absec = null;
                switch(param1)
                    case "SocialSection":
                        _loc_2 = this.socialSection;
                        break;
                return _loc_2;
            public function parseData(param1:XML) : void
                this.socialSection = new SocialSection(XML(_loc_3));
                var _loc_4:int = 0;
                var _loc_5:* = xml.sections.section;
                var _loc_3:* = new XMLList("");
                for each (_loc_6 in _loc_5)
                    var _loc_7:* = _loc_5[_loc_4];
                    with (_loc_5[_loc_4])
                        if (@id == "SocialSection")
                            _loc_3[_loc_4] = _loc_6;
    here is the DM one
            private function onXMLLoaded(event:Event) : void
                var _loc_2:* = new XML(event.target.data);
                this.model.parseData(_loc_2);
                dispatchEvent(new Event(XML_LOADED));
                return;
    and the XML
      <section id="SocialSection" active="true" visible="true" default="false">
       <name><![CDATA[<font size="50">SOCIAL</font>]]></name>
       <title><![CDATA[<font size="25">SOCIAL</font>]]></title>
       <forums>
        <line1><![CDATA[<font size="10">POST ON THE</font>]]></line1>
        <line2><![CDATA[<font size="18">FORUMS</font>]]></line2>
        <rollover><![CDATA[<font size="10">Have questions? Click here.</font>]]></rollover>
        <url>link_to_forum</url>
       </forums>
      </section>
    I think the issue is _loc_4 but not sure how to fix this. Thanks!

    Hi, thanks for your reply. I did as you suggested and the error is here for ML
                            _loc_3[_loc_4] = _loc_6;
    and here for DM
                this.model.parseData(_loc_2);
    And it's more cryptic than before : ). I think the DM error is predictable because of the first one
    The complete error list is
    ReferenceError: Error #1056: Cannot create property 0 on Number.
    at mod::ML/parseData()
    at mng::DM/onXMLLoaded()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    again, I think everything starts with ML script error
    Thanks!

  • RTMP and AS3

    I'm trying to stream an flv from FMS using AS3. I found AS3
    code on the Flex site, but it throws the following errors on trace:
    Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095:
    flash.net.NetConnection was unable to invoke callback onBWDone.
    error=ReferenceError: Error #1069: Property onBWDone not found on
    flash.net.NetConnection and there is no default value.
    at VideoTest$iinit()
    metadata: duration=570.2330000000001 width=796 height=536
    framerate=30
    Can someone please help me fix the above? I've been
    everywhere pretty much but no go. I also posted the question on the
    FMS forum and would gladly delete it from there if I can please get
    an answer here.
    Thanks
    =================================
    package {
    import flash.display.Sprite;
    import flash.events.NetStatusEvent;
    import flash.events.SecurityErrorEvent;
    import flash.media.Video;
    import flash.net.NetConnection;
    import flash.net.NetStream;
    import flash.events.Event;
    import flash.net.ObjectEncoding;
    public class VideoTest extends Sprite{
    private var videoURL:String = "1";
    private var connection:NetConnection;
    private var stream:NetStream;
    public function VideoTest():void {
    ////NetConnection.defaultObjectEncoding =
    flash.net.ObjectEncoding.AMF0;
    connection = new NetConnection();
    connection.objectEncoding = flash.net.ObjectEncoding.AMF0;
    connection.addEventListener(NetStatusEvent.NET_STATUS,
    netStatusHandler);
    connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR,
    securityErrorHandler);
    connection.connect("rtmp://.../videosource/");
    private function netStatusHandler(event:NetStatusEvent):void
    switch (event.info.code)
    case "NetConnection.Connect.Success":
    connectStream();
    break;
    case "NetStream.Play.StreamNotFound":
    trace("Stream not found: " + videoURL);
    break;
    private function
    securityErrorHandler(event:SecurityErrorEvent):void
    trace("securityErrorHandler: " + event);
    private function connectStream():void
    var stream:NetStream = new NetStream(connection);
    stream.addEventListener(NetStatusEvent.NET_STATUS,
    netStatusHandler);
    stream.client = new CustomClient();
    var video:Video = new Video();
    video.attachNetStream(stream);
    stream.play(videoURL);
    addChild(video);
    class CustomClient
    public function onMetaData(info:Object):void {
    trace("metadata: duration=" + info.duration + " width=" +
    info.width + " height=" + info.height + " framerate=" +
    info.framerate);
    public function onCuePoint(info:Object):void {
    trace("cuepoint: time=" + info.time + " name=" + info.name +
    " type=" + info.type);
    }

    Nope. I have not found a solution to this problem yet. I
    posted a querry in FMS and did receive a reply there but have not
    had the chance to try it yet.
    There are errors in all of th AS3 stuff I've tried.
    Actionscript 3.0 Cookbook from O'Reiley needs a big overhaul. So
    does the Lynda version. Even the Flex 2 things from Total Training
    have unresolved errors in them. Other people are complaining about
    the same things elsewhere, so I know I'm not alone on this one.
    If you find a solution, please do post it here. Would be nice
    if an Adobe Ace would come to the rescue on this video player
    issue.
    BTW, here is what was suggested by Nerdabilly from the FMS
    forum. Don't know if it will work.
    ==========================================
    Try putting an onBWdone handler into the custom client:
    public function onBWDone(info:Object):void{

  • Photo gallery in as3

    I'm making photo gallery where photos will be loaded from external xml file but i have problem. I want to add an effect when photo is changing like on this site: http://www.studiomelon.pl/index.html#/1/  Could somebody help me with that? I am noob in flash so please explain it as clear as you can. Thanks.

    I was sesrching for that for a long time before i created this tread. There is many tutorials and exaple files for page flip or page turn but i cant find good one. Many of them was coded in as1 or as2 other using php and java script so its difficult  to understant. I just want one simple solution for that. It cant be so hard to create something like that. Could you help me to find some good and simple tutorial in as3?

Maybe you are looking for