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.

Similar Messages

  • Help with AS3, loading multiple files into a movieclip in specific order in scrollbar

    Hello! I am in need of some advice. We are trying to build a site with these features:
    Our site will be built in Actionscript 3.
    1. A navigation menu that, when a button is clicked, will scroll the site quickly to a specific Y position using swfaddress.
    2. The entire site is controlled by a flash scroll bar, which will be scrolling a single movieclip.
        2A. The movieclip will load content corresponding to the navigation categories, all which is organized into zipped files (using this to extract the contents of each section, example: about.zip for the about         section of the site)
        2B. The movieclip will load multiple zipped files one by one that correspond to the navigation, in order, making the site appear to be very tall.
    **What we are in need of is understanding how to load multiple zipped files into a movie clip, in a specific order, and having them scroll between one another through the navigation. The separate navigation categories can be in movieclips instead of zipped files if that is easier.
    Here is a reference of something that works like this: http://swfc-shanghai.com/#/about/

    Hello kglad! I have set aside the idea of using zipped files, and am now just using multiple external swfs that I'd like to load into the movieclip in a specific order. Any thoughts?
    I'm new to AS3, and I'm  attempting to create a scrolling movieclip that will load multiple  external files, in order, into that movieclip. I'm using XML as well. At  this point, nothing is loading into my movieclip (contentMain) and it's  a bit frustrating! Thank you for your help!
    Current error: 1180: Call to a possibly undefined method load.
    AS3:
    //XML Loader
    var myXML:XML = new XML();
    myXML.ignoreWhite = true;
    myXML.load ("master.xml");
    myXML.onLoad =function(sucess) {
       if (sucess) {
    contentMain.loadAll();{
         load("1_Overview.swf")
         load("2_Webcam.swf")
         load("3_Twounion.swf")
         load("4_Oneunion.swf")
         load("5_Retail.swf")
         load("6_Nearby.swf")
         load("7_Courtyard.swf")
         load("8_Map.swf")
         load("9_Conference.swf")
         load("10_News.swf")
         load("11_Sustainability.swf")
         load("12_Contact.swf")
    addEventListener("complete",onLoad)
    onLoad();{
    //load all
         }else {
             trace("ERROR LOADING XML");

  • Load and control AS2 interactive SWF in AS3 and get properties of AS2 swf

    Hi,
    Can anyone please tell me how to load AS2 and AS3 swf file in AS3 Loader class.  I have tried "ForcibleLoader.as, AVM1Loader.as, AVM2Loader.as but as of now I have not get successes yet. There are some issue in all library.
    I am looking for below solution.
    1) Load SWF file AS2, AS3 via flashVars params and load it in AS3 player.
    2) After successfully loaded, below properties should be shown -   
         a) totalFrames
         b) currentFrames
         c) FPS of loaded swf file
         d) Should wok play(), stop() properties of loaded swf file.
         e) SWF file should work just like video player application where we can do Play, Pause, Stop, Seek (All properties and methods
            should be supported. )
    3) Player should be capable of loading all swf file regardless of any version AVM1 AVM2 both in AS3 Player.
    4) After loading player should scale external loaded swf file as per Player stage width and height and content should be scale    
        proportionate in 4:3.
    4) AS2 & AS3 action script must be supported in AS3 player. (All interactive swf file should be supported)
    Thanks

    http://gskinner.com/blog/archives/2007/07/swfbridge_easie.html

  • Loading multiple swfs using air 3.6 for ios

    Adobe, can you please provide us with the code to load multiple swf files for ios. Please provide examples. The code below loads multiple swfs, but the swfs stall, so this does not seem to be a solution.
    Code description: A flash file made up of 4 frames with forward and back buttons that navigate from frame to frame. The code loads three different swf files in frames 2, 3 and 4.
    Frame 1:
    var myLoader:Loader;
    var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
    if(myLoader == null){myLoader = new Loader(); addChild(myLoader); }
    else {myLoader.unload();}
    Frame 2:
    myLoader.unload();
    myLoader.load(new URLRequest("file1.swf"),loaderContext);
    Frame 3:
    myLoader.unload();
    myLoader.load(new URLRequest("file2.swf"),loaderContext);
    Frame 4:
    myLoader.unload();
    myLoader.load(new URLRequest("file3.swf"),loaderContext);

    I've just tried loading, unloading and then loading again same SWF with 2 library objects linked for AS3 export. It worked both on simulator and on device in debug mode. When I look inside swf it does contain AS3 code.
    So is my swf a pure asset SWF? Or Intellij Idea 12 that I'm using does stripping automatically?
    And then I've read your comment at http://forums.adobe.com/message/5217325#5217325 and run 'swfdump' utility on my .swf file. Looks like there's no ABC2 code, that's why app was able to load, unload and load again the same swf.
    public dynamic class net.games.bg extends flash.display.MovieClip
      native public function bg():*;
      native public var one:flash.display.MovieClip;
      native public var three:flash.display.MovieClip;
      native public var two:flash.display.MovieClip;
    public dynamic class net.games.z1 extends flash.display.MovieClip
      native public function z1():*;
    I can access objects as instances through root  or as objects through getDefinition.
    private var aLoader : Loader;
    private function init():void
                load1();
            private function load1():void
                aLoader   = new Loader();
                var url:URLRequest = new URLRequest("levels/expirementlevel1.swf");
                var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
                aLoader.load(url, loaderContext); // load the SWF file
                aLoader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, handleSWFLoadComplete1, false, 0, true);
            private function handleSWFLoadComplete1(e:flash.events.Event):void {
                var levelObjectsMC:flash.display.MovieClip = e.target.loader.content;
                for (var i:uint = 0; i < levelObjectsMC.numChildren; i++){
                    trace ('\t|\t ' +i+'.\t name:' + levelObjectsMC.getChildAt(i).name + '\t type:' + typeof (levelObjectsMC.getChildAt(i))+ '\t' + levelObjectsMC.getChildAt(i).x);
                var LibraryClass:Class = e.target.applicationDomain.getDefinition("net.games.z1") as Class;
                var myLibraryObject:flash.display.MovieClip = new LibraryClass as flash.display.MovieClip;
                trace(' load 1 ' + myLibraryObject);
                aLoader.unload();
                load2();
                //addChild(levelObjectsMC);
            private function load2():void
                aLoader   = new Loader();
                var url:URLRequest = new URLRequest("levels/expirementlevel1.swf");
                var loaderContext:LoaderContext = new LoaderContext(false, ApplicationDomain.currentDomain, null);
                aLoader.load(url, loaderContext); // load the SWF file
                aLoader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, handleSWFLoadComplete2, false, 0, true);
            private function handleSWFLoadComplete2(e:flash.events.Event):void {
                var levelObjectsMC:flash.display.MovieClip = e.target.loader.content;
                for (var i:uint = 0; i < levelObjectsMC.numChildren; i++){
                    trace ('\t|\t ' +i+'.\t name:' + levelObjectsMC.getChildAt(i).name + '\t type:' + typeof (levelObjectsMC.getChildAt(i))+ '\t' + levelObjectsMC.getChildAt(i).x);
                var LibraryClass:Class = e.target.applicationDomain.getDefinition("net.games.z1") as Class;
                var myLibraryObject:flash.display.MovieClip = new LibraryClass as flash.display.MovieClip;
                trace('load 2 x ' + myLibraryObject.x);
                aLoader.unload();

  • Loading multiple physical records into a logical record

    Hello,
    I'm not sure if this is the right place to post this thread.
    I have to import data from a fixed length positioned text file into a oracle table using sql loader.
    My sample input file (which has 3 columns) looks like:
    Col1 Col2 Col3
    1 A abcdefgh
    1 A ijklmnop
    1 A pqrstuv
    1 B abcdefgh
    1 B ijklmn
    2 A abcdefgh
    3 C hello
    3 C world
    The above text file should be loaded into the table as:
    Col1 Col2 Col3
    1 A abcdefghijklmnpqrstuv
    1 B abcdefghijklmn
    2 A abcdefgh
    3 C helloworld
    My question: Is there a way tht i can use the logic of loading multiple physical records into a logical record in my oracle tables. Please suggest.
    Thanks in advance.

    Hi,
    user1049091 wrote:
    Kulash,
    Thanks for your reply.
    The order of the concatenated strings is important as the whole text is split into several physical records in the flat file and has to be combined into 1 record in Oracle table.
    My scenario is we get these fixed length input files from mainframes on a daily basis and this data needs to be loaded into a oracle table for reporting purpose. It needs to be automated.
    Am still confused whether to use external table or a staging table using sql loader. Please advise with more clarity as am a beginner in sql loader. Thanks.I still think an external table would be better.
    You can create the external table like this:
    CREATE TABLE     fubar_external
    (      col1     NUMBER (2)
    ,      col2     VARCHAR2 (2)
    ,      col3     VARCHAR2 (50)
    ORGANIZATION  EXTERNAL
    (       TYPE             ORACLE_LOADER
         DEFAULT DIRECTORY  XYZ_DIR
         ACCESS PARAMETERS  (
                                 RECORDS DELIMITED BY     NEWLINE
                          FIELDS  (   col1        POSITION (1:2)
                                      ,   col2        POSITION (3:4)
                               ,   col3        POSITION (5:54)
         LOCATION        ('fubar.txt')
    );where XYZ_DIR is the Oracle Directory on the database server's file system, and fubar.txt is the name of the file on that directory. Every day, when you get new data, just overwrite fubar.txt. Whenever you query the table, Oracle will read the file that's currently on that directory. You don't have to drop and re-create the table every day.
    Note that the way you specify the columns is similar to how you do it in SQL*Loader, but the SEQUENCE generator doesn't work in external files; use ROWNUM instead.
    Do you need to populate a table with the concatenated col3's, or do you just need to display them in a query?
    Either way, you can reference the external table the same way you would reference a regular, internal table.

  • FCPX 10.0.7 hangs when loading multiple projects - a non-destructive work around

    FCPX 10.0.7 hangs when loading multiple projects - a non-destructive work around....
    Hi Guys, I upgraded from FCPX 10.0.6 to 10.0.78 and discovered to my immense frustration that many of my 100+ FCPX projects would not load.
    Symptom:
    FCPX 10.0.7 appears to hang ("spinning beachball") with either high CPU% on a single core or  with 1-2% CPU busy (activity monitor.app) when a FINAL CUT PROJECT is selected. No logs error information in /var/logs ..hmm
    notices that the "status circle" spins around endlessly.
    Actvity Monitor.app shows "Final Cut Pro (Not Responding)
    and also I notice in some cases that an OEM filter ("NEAT VIDEO NOISE REDUCTION") is in progress to be loaded. FCPX V10.0.7 must be FORCED QUITtted to remove it from system.
    History: Upgraded FCPX from V10.0.6 to V10.0.07.
    "FINAL CUT EVENTS" and "FINAL CUT PROJECTS" on a single file system on SAS 16TB disk array (768MB/sec read via AJA system test) and 60% utilised capacity… FCP EVENTS has 400 events in it .. some 5.2TB of Prores essence etc .. all works fine! (i.e. the storage system is first class and is NOT the issue)
    32GB of RAM on MAC PRO 2009 Nehalem 16 x Vcore with ATI 5780 card and ATTO HBA's (i.e. plenty of resources!)
    As usual with any "upgrade" to FCPX 10.0.? all the EVENT objects need to be upgraded. In my case this takes an hour or two.. so I do that when asleep.
    After experiencing above, I restored the FCPX EVENTS LIbrary of that file system from LTO4 tape archive (BRU-PE ) and still had the same issues as above.
    WORKAROUND:
    FORCEd QUIT FCPX V10.0.7
    RENAMEd "/volumes/some_file_system_volume/Final Cut Projects" to "/volumes/some_file_system_volume/Final Cut Projects_original"
    created (make) a new "/volumes/some_file_system_volume/Final Cut Projects" (use finder)
    For each project !!! in "/volumes/some_file_system_volume/Final Cut Projects_original", (do one project at a time!!!)
    MOVE "/volumes/some_file_system_volume/Final Cut Projects_original/one_fcpx_projext_nnnn_folder" to "/volumes/some_file_system_volume/Final Cut Projects"
    Make sure you move ONLY one project at a time. If you have a subfolder of projects, please do each project one at a time (serially!)
    Launch FCPX V10.0.7 and BE PATIENT!!! .. DONT click or fiddle with the UI.. it seems when you intervene it locks up as well…
    Let FCPX V10.0.7 settle….
    select the project you just added above  and RELINK any objects it needs. Thumbnails and proxies will be rendered again.. just be patient
    wait until ALL the rendering as stopped.
    QUIT FCPX V10.0.7
    (now if FCPX locks up, just force it out and start again as above).
    repeat for all projects in "/volumes/some_file_system_volume/Final Cut Projects_original" (go to step 4 ad do until all projects moved)
    When all is COMPLETED MAKE SURE YOU ARCHIVE an instance (or make a backup ) of "/volumes/some_file_system_volume/Final Cut Projects"
    If this procedure has worked the folder "/volumes/some_file_system_volume/Final Cut Projects_original" will have zero (nill, none) projects in it.
    I have managed to restore ALL my  "/volumes/some_file_system_volume/Final Cut Projects" this xmas between drinking etc. I'm satisfied that its all ok.
    Other issues:
    use DISK WARRIOR or TT PRO 6 to make sure that the file system volume where your  "/volumes/some_file_system_volume/Final Cut Projects" are is physically ok. I noticed some entries in file system's  volume table that represented objects in  "/volumes/some_file_system_volume/Final Cut Projects" were at fault when I used these utilities… FWIW.
    SUMMARY: yes this took ages to d, however luckily I had everything in at least 3 instances in an archive which has saved me many time in the old FCP& and prior days… it was just a matter of time to put it back together.
    I put this outage down to may be my own impatience when I first fired up FCPX 10.0.7 after the upgrade.
    I'm interested if this workaround is helpful to others and in addtiion if others have a more satisfactory remedy.
    HTH
    warwick
    Hong Kong

    Hi Eb, yeah I could not see any "memory leak" or unusual consumption of REAL memory whose less availability would cause excessive PAGEing and SWAPping as seen in the Activty Monitor.app
    I watch this carefully especially the use of REAL MEMORY by 3rd Paryy apps. BTW there are a few that cause ALLOCATED but NOT USED memory (blue in the A.M.app UI). Simply a unix PURGE command can release that memory and help clean up the PAGE and VM swap files (its alleged!).
    Yes, you may be might with the element of "Luck" involved. I would add though, that having MULTIPLE project displaying in the STORYLINE window and loading always caused my FCP 10.0.7 jam up at startup with h symtoms and observations I described.
    TIP: I might also add that for a super speedy launch of FCPX one may also emply setting each PROJECT's UI to show only AUDIO thus negating the need to contstruct or reneder out a PREVIEW ui in each clip in the storyline.
    Your/Apples  suggestion of the movememt (rename) of "Final Cut Pro Projects" to "Final Cut Pro Projects Hidden" is similar to what I proposed above to stop FCPX 10.0.7 accessing and building it up at startup. This workaround has been useful inthe past as well.
    ALso one might also get the stick out and remove (delete/rm) the ~/Library/Saved Application State/com.apple.FinalCut.savedState in one's home ~/Library so that FCPX wont do such a neat job reinstating FCPX last time you crashed it... This has been helpful also in diagnosing my issues.
    Lastly I have noticed that:
    impatience clicking on the FCPX UI when in the unstable state causes it to lock up with NO visible CPU% busy.... as if its waiting on something which is usually me MEMTERMing it via FORCE QUIT and
    the projects where I have employed the NEAT VIDEO Noise Reduction OEM filter for FCPX seem to exasserbate the PROJECT loading issues when several PROJECTS are available at FCPX startup time.
    As of yesterday I have some 400+ EVENTS Final Cut Pro Events and 130+ projects of varying compexites in a single file system on Final Cut Pro Projects all working fine and as good as gold again!
    Oh and one more thing, I had to RE-RENDER many projects of them again... strange as the FCP PROJECT library was renstated from a recent LTO archive as of V10.0.6 FCPX.. strange that...I would have expected if the projects and events were 10.0.6/7 compatable as proposed by Tom, that this would not be necessary... hmm straneg that
    I'll monitor this thread.
    Thanks for your comments lads!

  • Load Multiple Images in Crystal Report using Paths

    Hi Guys,
    I am currently in need of developing a new requirement for our company's client. We have to load multiple images using just link in Crystal Report. Let's say that the images are stored in a folder (e.g., C:\Datafolder\Images\) and i have to fetch two images to show in crystal report (say, C:\Datafolder\Images\imageval1 and C:\Datafolder\Images\imageval2). These are actually dynamically created and therefore the number of images are not known and so i have to iterate through the list of image links.
    Is it possible using merely crystal report and how?. If not, can I do it using Crystal Report SDK?. Any help will be appreciated. Please take note that we're also using C# in developing our software applications.
    Thanks and best regards.
    ---CHITO--

    There are also a number of KBAs:
    1296803 - How to add an image to a report using the Crystal Reports .NET inproc RAS SDK
    1199408 - How to load an image from disk into a dataset using CSharp (C#) in Visual Studio .NET
    Other related KBAs:
    1216239 - How to access a Crystal Report "Preview Picture" using the CR .NET or RAS .NET SDK?
    1373770 - How can I add a picture to a Crystal Reports subreport using the RAS .NET SDK?
    1320507 - How to change images dynamically in Crystal Reports based on parameter selection?
    And more. Please do use the search box in the top right corner. Simple search terms are best. E.g: 'crystal image net' or 'crystal image format formula', etc.
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Load multiple Units of Measures using RMDATIND in LSMW

    Hi All,
       I have created a conversion for materials using LSMW. I have used the standard direct input
       program    RMDATIND.
       Requirements have changed considerably over a period of time and now the new one is that I need to 
       load multiple alternate units of measure for each material.
       The issue when using RMDATIND is that the structure BMMH6 for alternate units  can hold only 1
       record at a time and my one single legacy source record has the information for two alternate units of
       measure.
       The LSMW that I created cannot handle this right now as it can load only one Unit of Measure as
       BMMH6 can hold only one record.
       Is this a limitation or is there a workaround/solution for this issue of mine in LSMW while using <br />
       RMDATIND.
       I will greatly appreciate any useful inputs in this regard.
    Thanks,
    Vamsee

    for this use LSMW BAPI method
    Business Object      BUS1001006   Standard material
    Method               SAVEDATA                    Create and change ma
    Message Type         MATMAS_BAPI                 Create and change ma
    Basic Type           MATMAS_BAPI02               Create and Change Ma
    in this method you habe below strctures...
    E1BP_MARM       Units of Measure
    E1BP_MARMX      Checkbox Structure for BAPI_MARM

  • Loading multiple videos in FLVPlayback

    I am building a video player which should load multiple videos in a FLVPlayback.
    When the loading of the first video has finished, the second one should start, using the VideoProgress Event.
    My code looks like this, videos is an array with the paths to the videos:
    flvPlayback.addEventListener(fl.video.VideoProgressEvent.PROGRESS, progress);
    flvPlayback.addEventListener(VideoEvent.COMPLETE, onComplete);
    private function progress(e:fl.video.VideoProgressEvent):void
       if (e.bytesLoaded == e.bytesTotal)
         if (videos.length > e.vp + 1)
            flvPlayback.activeVideoPlayerIndex = e.vp + 1;
            var path = videos[e.vp+1];
            if (flvPlayback.source == "")
               flvPlayback.load(path);
            flvPlayback.activeVideoPlayerIndex = flvPlayback.visibleVideoPlayerIndex
    private function onComplete(e:fl.video.VideoProgressEvent):void
       if (videos.length > e.vp + 1)
          // set the volume to 0 before switching to next video because of
          // bug in FLVPlayback that prevents to play the sound otherwise.
          var v:Number = flvPlayback.volume;
          flvPlayback.volume = 0;
          flvPlayback.activeVideoPlayerIndex = value;
          flvPlayback.visibleVideoPlayerIndex = player.activeVideoPlayerIndex;
          flvPlayback.volume = v;
          flvPlayback.play();
    flvPlayback.load(videos[0]);
    flvPlayback.playWhenEnoughDownloaded();
    Now I have the problem when I test this locally, the first video is invisible sometimes when starting to play. This is not happening everytime, but sometimes the video is not shown, but I can hear the sound, and I can see the scrubber on the seekbar moving.
    I already tried to check in the progress function if the video is already playing, and if not, set a timer that will call the progress function again in 1 second. It seemed to help at first, but then it happened again. Does anyone know a workaround for this?

    Out of the AS3 documentation for FLVPlayback:
    activeVideoPlayerIndex
    A number that specifies which video player instance is affected by other application  programming interfaces (APIs).
               Use this property to manage multiple FLV file streams.
    This property does not make the video player visible;
               use the visibleVideoPlayerIndex property to do that.
               A new video player is created the first time activeVideoPlayerIndex
               is set to a number. When the new video player is created,
               its properties are set to the value of the default video player
               (activeVideoPlayerIndex == 0) except for source,
               totalTime, and isLive, which are always set to the
               default values (empty string, NaN, and false, respectively),
               and autoPlay, which is always false (the default is true
               only for the default video player, 0). The cuePoints
               property has no effect, as it would have no effect
               on a subsequent load into the default video player.
    setting the activeVideoPlayerIndex property to 1 will create another VideoPlayer instance inside of the FLVPlayback component. I have done it, it does work, but with the mentioned problem in my first post that the first video is not visible.
    So either I am doing something wrong, or there is a bug in how it is supposed to work.

  • Firefox will NOT load multiple pages at once, Help!

    I cannot get Firefox to load multiple pages at once. If I try this, they will continue to show the "load"/"refresh" symbol forever and ever (at least half an hour by the time I got fed up). I can load one page at a time but even then it takes quite a long time for the page to fully load - god forbid the page has images on it because then it might take up to 10 minutes to fully load.
    Sometimes if I try to load multiple pages and then "x" out of them and try to do it one by one, it simply refuses to load ANY of the pages.
    I can load multiple pages at one time in IE on my computer, I can load single pages in IE without delay. I can do the same thing in Safari on a desktop mac in the house. So NO, it is NOT my internet connection, thanks.
    For God's sake, I'm sending this complaint/question in IE because I KNOW it won't send in firefox. How messed up is that?

    A possible cause is security software (firewall) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process and the updater process.
    See:
    *https://support.mozilla.com/kb/Server+not+found
    *https://support.mozilla.com/kb/Firewalls

  • External AS3: Loading swf video

    I need to load a  swf file, which is video player and video. The swf loads but the video contained in it does not play and the video controls are dead too. What do I need to do to load a swf containing a flv video so the video plays?
    I have a fla file connected by class to an external as file. Here is the external as file I am using:
    package final {
        import flash.display.Loader;
        import flash.display.Sprite;
        import flash.display.MovieClip;
        //import flash.text.*;
        // URLRequest class resides in flash.net package
        import flash.net.URLRequest;
        import flash.events.*;
        import flash.errors.*;
        public class ControllingSwfs extends Sprite {
            public function ControllingSwfs() {
                var swfContainer:MovieClip = new MovieClip();
                var swfLoader:Loader=new Loader  ;
                swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaderCompleteHandler);
                function loaderCompleteHandler(evt:Event):void {
                    addChild(swfLoader);
                    swfContainer=swfLoader.content as MovieClip;
                    swfContainer.x=10;
                    swfContainer.y=20;
                    addChild(swfContainer);
                    //swfContainer.setText('SWF Loaded Properly');
                    stage.addEventListener(MouseEvent.MOUSE_UP, unloadAssetHandler);
                function unloadAssetHandler(event:MouseEvent):void {
                    swfLoader.unload();
                    stage.removeEventListener(MouseEvent.MOUSE_UP, unloadAssetHandler);
                swfLoader.load(new URLRequest('kitty.swf'));
                addChild(swfLoader);

    Now I am going to ask some dumb questions:
    What is the difference between a script that loads an external image or a swf file into a new swf,
    and a series of scripts that, when used together with a fla file, create a swf movie player (into which a target flv file gets played)?
    Can a loader script load an that swf file that contains a movie in an ActionScripted movie player? If so, does it need access to the movie player scripts?
    A little background:
    My functioning ActionScript 3 movie player relies on 4 scripts —
    1. a button manager script that controls play, pause, rewind, fast forward and stop
    2. a media control script that extends flash.events.Event
    3. a video script that extends MovieClip, targets the video to be played and controls and displays things like the scrubber
    4. a main script that integrates all the above and is the Class for the fla file
    Because I wanted to be able to load multiple flv movies in my flash swf, and I didn't know how to make the movie player do this, I thought loading the movies as swf files via a loader would be the solution.
    If I could get my scripted movie player to be able to load and play different movies (as does the Adobe Media Player), that would be satisfying. (I am not relying on the AMP because I am doing this project for a class (which is now finished, but I'm still trying).
    What I really need is working sample scripts so I can begin to understand how to assemble something like this. Oh, and the key is that I am required to do this all in external ActionScript 3, not on the timeline within the fla file.
    Is there somewhere online that I can visit that creates purely scripted flash stuff?

  • Help with loading multiple images via LoadVars

    Hello everybody.
    I need a hand loading multiple images using the LoadVars
    method with a text file. I can get it to load 1 image but not
    anymore than that. I am aware of other methods like using
    components but I am looking for a method where I can access and
    change all data from 1 text file (there will be text variable text
    within the file aswell to, but I am more concerned with the images
    at the moment).
    Anyway on to the issue. I have created a much simple .fla
    file that outlines my problem.
    The movie contains 3 layers:
    - top layer contains AS
    - middle layer contains an empty movie clip with the
    instance name of mcImage1
    - bottom layer contains an empy movie clip with the instance
    name of mcImage2
    The AS layer contains the following code:
    imagedata = new LoadVars()
    imagedata.load("data.txt")
    imagedata.onLoad = function(ok){
    if(ok){
    mcImage1.loadMovie(this.Image1)
    mcImage2.loadMovie(this.Image2)
    } else trace("Problem Loading")
    In the same folder of my .swf file I have a text file called
    data.txt which contains the following
    &Image1=image1.gif
    &Image2=image2.gif
    Also in the same folder of my .swf file I have two images
    image1.gif and image2.gif.
    When I run the flash the image2.gif is imported correctly.
    image1.gif does not appear.
    You can download my source files and all images here
    http://www.myrealpage.com/projects/var_test/var_test.zip
    Any help that can be shed on this problem is much
    appreciated.
    Thanks
    Matt

    Glad to help. It is just that I see so many folks who have
    two different parts of a problem smushed together – each
    problem isn't so hard on its own, but together they are difficult
    to wrap your head around. Always try and break down each step of
    the problem and it will help you in the end.
    That being said, I'm not quite so sure on this next problem.
    I don't do so much timeline stuff along with the Actionscript. I
    can get tricky. So this I don't quite have as much of clear mental
    picture of what you are describing. But here are some questions
    that I would ask – either of myself if I was doing it or of
    you.
    Is there a stop() on frame one to wait for the
    LoadVars.onLoad? Does the onLoad then say to play?
    If not, what happens if we get to Frame 10 before the
    LoadVars has even finished? That could be a problem.
    Remember that the LoadVars object is an actual object that
    will exist until it is deleted or removed in various ways. You can
    access it at any time after it is loaded. The onLoad event handler
    is just that thing you want to happen immediately after it is
    loaded.
    So my design would probably be.
    LoadVars on Frame 1.
    Where I am stopped.
    In the onLoad handler load the first image and tell the
    timeline to play
    On frame 10, the LoadVars object will still exist (unless
    you've deleted it)
    Get the variable out of the LoadVars and load the image.
    If you want to check this. Put a stop() in frame 10 and run
    it in the testing environment. When it gets to that frame, go to
    the debug menu and List Variables. You should see that your
    LoadVars object is still there.
    Does that answer your question or am I totally missing the
    point?

  • How do I use edge commons composition loader to load multiple compositions with a next and back button?

    I am working on an interactive book and have set up each page as a separate composition in edge.
    I am using  the edge commons JS library to load multiple compositions into a main composition.
    You can see how this works here: Edge Commons - Extension Library for Edge Animate and Edge Reflow | EdgeDocks.com
    The way the edge commons tutorial is set up requires a button for each composition i want to load. I am interested in loading multiple compositions with a "next" and "back" button, and a "swipe left, "swipe right" gesture on the content symbol that each composition is loaded into. I also need the swipe features on the content symbol not to interfere with the interactive elements on the loaded composition.
    Please suggest a solution that will work without adding additional scripts beyond edge commons and jquery.

    Sort of. I'm using this code inside an action for a button symbol. But it doesn't work perfectly. Trying to debug it.
    Let me know if you have any luck.
    //Check to see if pageCounter already exists
    if (typeof EC.pageCounter === 'undefined') {
      // it doesn't exist so initialize it to first page
        EC.pageCounter = 2;
    //check if the page is only 1 digit -- patch for single digit
    if (EC.pageCounter < 9) {
       // it is, so we need to pad a 0 on the front.
      EC.pageCounterString = "0" + EC.pageCounter;
      //e.g.  01 ...09,11,12,13....115,222352,,....
    else {
      EC.pageCounterString = EC.pageCounter;
    EC.loadComposition(EC.pageCounterString + "/publish/web/" + EC.pageCounterString + ".html", sym.$("container"));
    EC.pageCounter = EC.pageCounter + 1;
    //TODO for back  -1

  • How to allow multiple domains under Access-Control-Allow-Origin

    Hi,
    We have a domain where will get CORS request from another domain hosted on seperate DC. We can't set
    Access-Control-Allow-Origin as * due to security concerns & IIS can't take more than 1 value at a time. Kindly suggest how to pass multiple httpheader  for
    Access-Control-Allow-Origin.
    Regards,
    Dhiraj

    Hello Dhiraj,
    This is not the suitable forum for your question, you may post in
    IIS forums for more help.
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to load multiple .wrl (VRML) files?

    Hi all,
    I need to load four components of a coffee table into the virtual universe, the four components are top, base, left leg and right leg. I use four parts not one whole single object because in this way when I change the size of this furniture, I can make the thickness of the edges fixed, which is a must. The four parts consist a table correctly in the design software TopSolid, but when I load the four .wrl ojbect files seperately in the application, they cannot compose a table correctly. I guess the reason is the four components have been resized and translated automatically in the VRML loader. I have reviewed the source code of the VRML loader and some related source code but not be able to find where the auto resize code is.
    I have used four Wavefront .obj files instead to do another technical demonstration, if I disable the ObjectFile.RESIZE flag, and just scale the four parts by myself using the same scale factor, I can get a perfect coffee table, with every part in correct location. But my supervisor insist on using VRML .wrl files in our project.
    I hope someone can give me some kind instructions or advises on how to do it in VRML97 loader (https://j3d-vrml97.dev.java.net/).
    Any help will be highly appreciated.

    Answered here : http://www.java.net/forum/topic/javadesktop/java-desktop-technologies/java-3d/trying-load-multiple-wrl-vrml-files-same

Maybe you are looking for

  • ERROR: Operation could not be completed.(kCFErrorDomainCFNetworkerror 302.)

    I have a 3G phone and I am continually getting this message when trying to surf the web. I am on FIDO network and on the 3G data site. Half the time it is about as fast as a 28.8 modem connection. I have been in contact with FIDO tech support and the

  • Parsing date

    I am reading in a text file delimited by a semi-colon. One of the tokens is a date formatted like: 1/1/2002. When I try to convert it to a Date, I get a ParseException error. What is the best way to convert a String to a Date object? Thanks in advanc

  • Singleton Class  Variable

    i have one class test1 and other class test2. this test1 class should have one class varibale of instance of test2. how this could be done both are single ton class

  • Calculation in Sumfields

    Hi, I have a sum at the bottom of my report, but on the same line I want to display the result of a calculation based on 2 results of the sum (evolution in % of the sum). How can I do that ? Regards

  • Socket reader problem even if Native IO is enabled

    Hi, I am using weblogic 6.1 sp1 on a hp windows2000 quad box. weblogic server hosts all the ejbs. Resin is used as a servlet engine. Sometimes the message <Sep 10, 2001 8:35:01 PM CDT> <Warning> <JavaSocketMuxer> <There are: '3' active sockets, but t