Load new .fla file via MouseEvent

I have a script that Rob Dillon so graciously passed my way
that will create an array to hold buttons which use the MouseEvent
will call on to navigate to a new URL. The syntax works great, but
another thing I would like to do is to have a new .fla file load in
the .swf flash movie.
Basically I have an index map as a .fla file, when the use
mouses over the quadrangle, a new smaller scale map(separate .fla
file) will open. Then the user could click on the array of buttons
to open up urls that had pdf, jpegs, and other documents related to
the smaller scale map.
Any idea how have my index map call on the individual
quadrangle via action script 3?
Thanks,
Chris

I found out you cannot achieve this, unless you use explicit URL paths.
I ended up keeping my XML file in the same directory as my SWF. This will work, but I would rather have my XML file excluded from the SWF's folder, and placed somewhere else, in isolation. Afterall, this specific XML file is for webservice WSDL address location, which I do not want to include in my project. This needs to be configurable outside of the application. I shouldnt need to modify code for every single build I need to produce....
Eventually I will have automated builds, which will delete all the contents from this folder. I will have to tell my automated builder to reproduce my XML config file. This really means, I need to have a duplicate copy on the file system to copy into my build folder when automating.
I really wish the SWF could access any directory on the server I ask it to. Kinda lame workaround.

Similar Messages

  • Websphere is not loading new properties file

    I am using Websphere Application Server 5.1 on WindowsXP.
    My application is on Struts. I create a war file and deploy it.
    I am getting all the text displayed from ApplicationResources.properites file.
    I changed some key-values in that file..but the websphere is loading the page with old values..
    I thought the problem could be with browser cache..I changed the JSP content to check if it loads the new jsp..It is loading the new jsp..(so the problem is not with cache)but old properties file..
    I uninstalled my application and reinstalled it..stilll it did not work..
    I checked the path "C:\Program Files\WebSphere\AppServer\installedApps\PC560\WMOS_war.ear\WMOS.war\WEB-INF\classes" where my war is getting extracted...
    (so my latest propeties file is available to websphere)
    it is showing the new properties file..but if i see the 'view source' of the page..it is showing old values..
    Is it some kind of optimization of websphere? If it is so, where to change it?
    Thanks

    If that doesn't work, try repackaging your application into a new WAR file, with the new property files, and redeploy it. WebSphere tries to be "clever" and caches/copies files from your application into another folder when you deploy it, and will not look at these files in your application's folder within the "installedApps" folder. I learned this lesson the hard way, when I wasted days trying to understand why WebSphere wasn't recognizing changes made to my web.xml file.

  • Loading new class files when they are not available when the JVM starts

    Simple Question
    Is it possible to load class if it was not compiled when the original JVM was launched?
    More Detailed Question
    Our build system is getting a slight tweak with a new test runner. After our build system compiles the file, I would like to be able to load the files that have just been compiled.
    Our build system runs inside its own JVM and calls ant scripts to run the different processes(Separate JVM). The new test runner will also be called from the build system(Same JVM) but not as an ant target. Is it possible to call the newly compiled files from inside the build system JVM if they had not been created on the start of that JVM using reflection?
    Thanks in Advanced!

    public class t
        public static void main(String args[])
         throws Exception
         Writer out = new FileWriter("Foo.java");
         out.write("public class Foo implements Runnable {\n");
         out.write("    public void run() {\n");
         out.write("        System.out.println(\"run like the wind\");\n");
         out.write("    }\n");
         out.write("}\n");
         out.close();
         Runtime.getRuntime().exec("javac Foo.java").waitFor();
         ((Runnable) Class.forName("Foo").newInstance()).run();
    }

  • Error starting OBIEE 11G coreapplications after loading new RPD file in EM

    Hi,
    After I have loaded my new RPD in EM, and restarting the BI coreapplications.
    Basically the symptoms I am getting are very similar to this: https://kr.forums.oracle.com/forums/thread.jspa?threadID=2129556, I have tried removing other (sampleLIte RPDs) with no luck. Not sure what else I can do. The RPD's physical layer draws data from SQL Server. Have tested the system DSN and its ok.
    Here is a screenshot of the Error: http://i.imgur.com/eDZBM2Z.png. Any help appreciated.
    Using OBEE 11G in Windows 7.

    Its weird.
    As part of my own investigation, I went to physical layer and saw my SQL Server was set wrong. I set it to 2008 the correct version.
    Also my ODBC was set at 3.5, I changed this to 2.0. After doing this I saved it and reloaded it onto EM and it all worked. Just to verify that this was indeed the root cause, I reverted the settings back to original and loaded it again. It works.
    Not sure in the end what was the root cause.

  • FTP/Loading new web files

    I currently have my website files on a laptop that can only
    be booted from safe mode. I have a newer version of Dreamweaver on
    my Mac, but am not able to pull up the site to that version. I'd
    like to delete what I have on there, and upload a newly designed
    site. Is it possible to grab the files from the FTP (or where ever
    they're stored), and view all of my files on the Mac?
    Sounds confusing, but working on the laptop is very, very
    slow going.
    Thanks for any help, and sorry for not making the question as
    clear as mud.

    Does your laptop have a floppy drive? Can you copy the files
    to a floppy?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Mavical" <[email protected]> wrote in
    message
    news:gfkc03$9nm$[email protected]..
    >I currently have my website files on a laptop that can
    only be booted from
    >safe
    > mode. I have a newer version of Dreamweaver on my Mac,
    but am not able to
    > pull
    > up the site to that version. I'd like to delete what I
    have on there, and
    > upload a newly designed site. Is it possible to grab the
    files from the
    > FTP (or
    > where ever they're stored), and view all of my files on
    the Mac?
    >
    > Sounds confusing, but working on the laptop is very,
    very slow going.
    >
    > Thanks for any help, and sorry for not making the
    question as clear as
    > mud.
    >

  • Flash crashes every time I open an fla file

    I installed a trial version of Flash CS3. I had a Flash 8
    Professional already installed. Every time I tried to open a fla it
    crashed, so I uninstalled both versions and reinstalled. I still
    have the same problem. I can't open existing fla files or create
    new fla files. This is important to my work so I would appreciate
    any help.
    PC: AMD Athlon 64 Processor 3000+ 2GHz 1GByte RAM
    Graphic: GeForce 6600

    shouldn't adobe help you?

  • How do you make fla file the default document to test the project?

    my default document is the swf file.  help me please.

    You create your flash application in Flash Professional by creating new FLA file and editing it. The output (flash application) of this proces is SWF file. Which is then played by Adobe FlashPlayer.
    When you test your project, the SWF file is exported and then opened by flashplayer.
    FLA is your source file and you keep it on your computer for later editing.
    SWF is your actual application and you deploy (copy) it on the server or wherever you intend to deploy your application.
    If what you're trying to say is that you wish to debug your application, then test it not by pressing Ctrl+Enter, but Shift+Ctrl+Enter.

  • Help can't add new jar files into BDK beanbox(plz see details)

    I am unable to load new jar files into bdk beanbox inspite of
    packaging bean class file and manifest file in a jar file and
    placing it in bdk jars directory. On trying to load it says(THE JAR
    FILE DOES NOT HAVA ANY BEANS).
    SEE THE EXAMPLE BELOW:
    I made a manifest file BeanTest.mf as
    Name: BeanTest.class
    Java-Bean: True
    Then the BeanTest Class comprises of
    import java.awt.Point;
    public class BrokenProperties extends Point
         public void setSpot(Point point)
              this.x = point.x;
              this.y = point.y;
         public Point getSpot()
              return this;
    Please help....

    you have many little errors in program. try as below and let me know..
    public class BrokenProperties extends Point implements serializable
    private Point xy;
    public BrokenProperties()
    public void setSpot(Point point)
    xy=point;
    public Point getSpot()
    return xy;

  • Signature preferences (AIR) are not saved in the fla file

    Hi,
    - I create a new fla file in Flash CS5 Professional,
    - I go to publish settings and select AIR2 as the target
    - I click the Settings button on the right
    These settings are supposed to be saved with the fla file, since all of them are related to the project.
    Application name, icons, files to include, etc, are all preferences related to the fla file of which you are editing the settings.
    However, when you go to the "Signature" tab and select a digital certificate to sign the air application with, this setting will NOT be saved into the file.
    Instead, whenever you publish ANY air application, it will use by default the last certificate you have used, even if you used it to publish _another_ application.
    That is absurd, because this is a tab within the "publish settings" and all publish settings are specific to a fla file.
    Is there a way to fix it? Perhaps some global preference somewhere, or a windows registry key?
    Or is it just a bug?
    thanks
    m.

    I would think the signature is the signature specific to the user/company who has opened the fla and is used to identify the developer/company who has created the application.
    Now if the signature setting was saved on the fla, and the fla is opened on a different guys machine,
    first - he would not have the signature that you had and at the same location
    second - it does not make sense to him, since he is not you.
    It is unlikely that that a person/company creating applications would sign the swf/air with different signatures.
    So I would think that the current behaviour is correct and the signature is specific to the person who has opened the application rather than the application itself.
    Hope this explains it.

  • Loading external swf file in a new window

    Hi,
    I've got a few .swf files with video tutorials I've created using Captivate 4.
    I wanted to link them so I've created a main screen with menu with buttons in Flash.
    I've added AS to load the external swf files but they load in the same window. How can I load these .swf files in seperate window so that you could get back to the main window after you've finished watching?
    Here's my code:
    stop();
    var myLoader:Loader = new Loader();
    button1_btn.addEventListener(MouseEvent.CLICK, movie1_1);
    function movie1_1(e:MouseEvent):void
        var myURL:URLRequest = new URLRequest("01_01_Welcome.swf");
        myLoader.load(myURL);
        addChild(myLoader);
    I'm also attaching screenshot with menu in flash

    I've deleted the line and now the code lookes like that:
    stop();
    var myLoader:Loader = new Loader();
    button1_btn.addEventListener(MouseEvent.CLICK, movie1_1);
    function movie1_1(e:MouseEvent):void
        var myURL:URLRequest = new URLRequest("01_01_Welcome.swf");
        addChild(myLoader);
    Unfortunately, it doesn't load the .swf file when you click on the button...

  • Remove / unload external swf file(s) from the main flash file and load a new swf file and garbage collection from memory.

    I can't seem to remove / unload the external swf files e.g when the carousel.swf (portfolio) is displayed and I press the about button the about content is overlapping the carousel (portfolio) . How can I remove / unload an external swf file from the main flash file and load a new swf file, while at the same time removing garbage collection from memory?
    This is the error message(s) I am receiving: "TypeError: Error #2007: Parameter child must be non-null.
    at flash.display::DisplayObjectContainer/removeChild()
    at index_fla::MainTimeline/Down3()"
    import nl.demonsters.debugger.MonsterDebugger;
    var d:MonsterDebugger=new MonsterDebugger(this);
    stage.scaleMode=StageScaleMode.NO_SCALE;
    stage.align=StageAlign.TOP_LEFT;
    stage.addEventListener(Event.RESIZE, resizeHandler);
    // loader is the loader for portfolio page swf
    var loader:Loader;
    var loader2:Loader;
    var loader3:Loader;
    var loader1:Loader;
    //  resize content
    function resizeHandler(event:Event):void {
        // resizes portfolio page to center
    loader.x = (stage.stageWidth - loader.width) * .5;
    loader.y = (stage.stageHeight - loader.height) * .5;
    // resizes about page to center
    loader3.x = (stage.stageWidth - 482) * .5 - 260;
    loader3.y = (stage.stageHeight - 492) * .5 - 140;
    /*loader2.x = (stage.stageWidth - 658.65) * .5;
    loader2.y = (stage.stageHeight - 551.45) * .5;*/
    addEventListener(Event.ENTER_FRAME, onEnterFrame,false, 0, true);
    function onEnterFrame(ev:Event):void {
    var requesterb:URLRequest=new URLRequest("carouselLoader.swf");
    loader = null;
    loader = new Loader();
    loader.name ="carousel1"
    //adds gallery.swf to stage at begining of movie
    loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader.load(requesterb);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader);
    loader.x = (stage.stageWidth - 739) * .5;
    loader.y = (stage.stageHeight - 500) * .5;
    // stop gallery.swf from duplication over and over again on enter frame
    removeEventListener(Event.ENTER_FRAME, onEnterFrame);
    //PORTFOLIO BUTTON
    //adds eventlistner so that gallery.swf can be loaded
    MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    function Down(event:MouseEvent):void {
    // re adds listener for contact.swf and about.swf
    MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
    MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    //unloads gallery.swf from enter frame if users presses portfolio button in nav
    var requester:URLRequest=new URLRequest("carouselLoader.swf");
        loader = null;
    loader = new Loader();
    loader.name ="carousel"
    loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader.load(requester);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader);
    loader.x = (stage.stageWidth - 739) * .5;
    loader.y = (stage.stageHeight - 500) * .5;
    removeChild( getChildByName("about") );
    removeChild( getChildByName("carousel1") );
    // remove eventlistner and prevents duplication of gallery.swf
    MovieClip(root).nav.portfolio.removeEventListener(MouseEvent.MOUSE_DOWN, Down);
    //INFORMATION BUTTON
    //adds eventlistner so that info.swf can be loaded
    MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
    function Down1(event:MouseEvent):void {
    //this re-adds the EventListener for portfolio so that end user can view again if they wish.
    MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    var requester:URLRequest=new URLRequest("contactLoader.swf");
    loader2 = null;
    loader2 = new Loader();
    loader2.name ="contact"
    loader2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader2.load(requester);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader2);
    loader2.x = (stage.stageWidth - 658.65) * .5;
    loader2.y = (stage.stageHeight - 551.45) * .5;
    // remove eventlistner and prevents duplication of info.swf
    MovieClip(root).nav.info.removeEventListener(MouseEvent.MOUSE_DOWN, Down1);
    //ABOUT BUTTON
    //adds eventlistner so that info.swf can be loaded
    MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    function Down3(event:MouseEvent):void {
    //this re-adds the EventListener for portfolio so that end user can view again if they wish.
    MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
    var requester:URLRequest=new URLRequest("aboutLoader.swf");
    loader3 = null;
    loader3 = new Loader();
    loader3.name ="about"
    loader3.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
    function ioError(event:IOErrorEvent):void {
    trace(event);
    try {
    loader3.load(requester);
    } catch (error:SecurityError) {
    trace(error);
    addChild(loader3);
    loader3.x = (stage.stageWidth - 482) * .5 - 260;
    loader3.y = (stage.stageHeight - 492) * .5 - 140;
    removeChild( getChildByName("carousel") );
    removeChild( getChildByName("carousel1") );
    // remove eventlistner and prevents duplication of info.swf
    MovieClip(root).nav.about.removeEventListener(MouseEvent.MOUSE_DOWN, Down3);
    stop();

    Andrei1,
    Thank you for the helpful advice. I made the changes as you suggested but I am receiving a #1009 error message even though my site is working the way I wan it to work. I would still like to fix the errors so that my site runs and error free. This is the error I am receiving:
    "TypeError: Error #1009: Cannot access a property or method of a null object reference."
    I'm sure this is not the best method to unload loaders and I am guessing this is why I am receiving the following error message.
         loader.unload();
         loader2.unload();
         loader3.unload();
    I also tried creating a function to unload the loader but received the same error message and my portfolio swf was not showing at all.
         function killLoad():void{
         try { loader.close(); loader2.close; loader3.close;} catch (e:*) {}
         loader.unload(); loader2.unload(); loader3.unload();
    I have a question regarding suggestion you made to set Mouse Event to "null". What does this do setting the MouseEvent do exactly?  Also, since I've set the MouseEvent to null do I also have to set the loader to null? e.g.
    ---- Here is my updated code ----
    // variable for external loaders
    var loader:Loader;
    var loader1:Loader;
    var loader2:Loader;
    var loader3:Loader;
    // makes borders resize with browser size
    function resizeHandler(event:Event):void {
    // resizes portfolio page to center
         loader.x = (stage.stageWidth - loader.width) * .5;
         loader.y = (stage.stageHeight - loader.height) * .5;
    // resizes about page to center
         loader3.x = (stage.stageWidth - 482) * .5 - 260;
         loader3.y = (stage.stageHeight - 492) * .5 - 140;
    //adds gallery.swf to stage at begining of moviie
         Down();
    //PORTFOLIO BUTTON
    //adds eventlistner so that gallery.swf can be loaded
         MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
    function Down(event:MouseEvent = null):void {
    // re adds listener for contact.swf and about.swf
         MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
         MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
    //unloads gallery.swf from enter frame if users presses portfolio button in nav
         var requester:URLRequest=new URLRequest("carouselLoader.swf");
         loader = new Loader();
         loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
         function ioError(event:IOErrorEvent):void {
         trace(event);
         try {
         loader.load(requester);
         } catch (error:SecurityError) {
         trace(error);
         this.addChild(loader);
         loader.x = (stage.stageWidth - 739) * .5;
         loader.y = (stage.stageHeight - 500) * .5;
    // sure this is not the best way to do this - but it is unload external swfs
         loader.unload();
         loader2.unload();
         loader3.unload();
    // remove eventlistner and prevents duplication of gallery.swf
         MovieClip(root).nav.portfolio.removeEventListener(MouseEvent.MOUSE_DOWN, Down);
    //INFORMATION BUTTON
         //adds eventlistner so that info.swf can be loaded
         MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
         function Down1(event:MouseEvent = null):void {
         //this re-adds the EventListener for portfolio so that end user can view again if they wish.
         MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
         MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
         var requester:URLRequest=new URLRequest("contactLoader.swf");
         loader2 = null;
         loader2 = new Loader();
         loader2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);    
         function ioError(event:IOErrorEvent):void {
         trace(event);
         try {
         loader2.load(requester);
    }      catch (error:SecurityError) {
         trace(error);
         addChild(loader2);
         loader2.x = (stage.stageWidth - 658.65) * .5;
         loader2.y = (stage.stageHeight - 551.45) * .5;
    loader.unload();
    loader2.unload();
    loader3.unload();
         // remove eventlistner and prevents duplication of info.swf
         MovieClip(root).nav.info.removeEventListener(MouseEvent.MOUSE_DOWN, Down1);
    //ABOUT BUTTON
         //adds eventlistner so that info.swf can be loaded
         MovieClip(root).nav.about.addEventListener(MouseEvent.MOUSE_DOWN, Down3, false, 0, true);
         function Down3(event:MouseEvent = null):void {
         //this re-adds the EventListener for portfolio so that end user can view again if they wish.
         MovieClip(root).nav.portfolio.addEventListener(MouseEvent.MOUSE_DOWN, Down, false, 0, true);
         MovieClip(root).nav.info.addEventListener(MouseEvent.MOUSE_DOWN, Down1, false, 0, true);
         var requester:URLRequest=new URLRequest("aboutLoader.swf");
         loader3 = null;
         loader3 = new Loader();
         loader3.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioError);
         function ioError(event:IOErrorEvent):void {
         trace(event);
         try {
         loader3.load(requester);
    }      catch (error:SecurityError) {
         trace(error);
         addChild(loader3);
         loader3.x = (stage.stageWidth - 482) * .5 - 260;
         loader3.y = (stage.stageHeight - 492) * .5 - 140;
         loader.unload();
         loader2.unload();
         loader3.unload();
         // remove eventlistner and prevents duplication of info.swf
         MovieClip(root).nav.about.removeEventListener(MouseEvent.MOUSE_DOWN, Down3);
         stop();

  • How to load movie clip internal in .fla file

    Hi - How do I load a movie clip inside a .fla file?........I
    know the script to load a .swf file but I do not know the script to
    load a movie clip (New symbo l= movie clip) made in the same .fla
    file.
    I have a series of movie clips I woud like to load with a
    button - can anyone please guide me in the right direction with a
    script or some info.....
    Thanks
    steen

    Do you mean loading clips that are in the library?
    Use MovieClip.attachMovie();
    Dan Mode
    --> Adobe Community Expert
    *Flash Helps*
    http://www.smithmediafusion.com/blog/?cat=11
    *THE online Radio*
    http://www.tornadostream.com
    *Must Read*
    http://www.smithmediafusion.com/blog
    "Jean Bang" <[email protected]> wrote in
    message
    news:ef88kj$c10$[email protected]..
    > Hi - How do I load a movie clip inside a .fla
    file?........I know the
    > script to
    > load a .swf file but I do not know the script to load a
    movie clip (New
    > symbo
    > l= movie clip) made in the same .fla file.
    > I have a series of movie clips I woud like to load with
    a button - can
    > anyone
    > please guide me in the right direction with a script or
    some info.....
    >
    > Thanks
    >
    > steen
    >

  • Loading .css into my .fla file (non-.AS file)

    AS3
    My .html file loads, but not my .css file.
    I want to add the proper code to load a .css file, which is
    for my .html file, directly into my .fla file that has the code for
    the text area and scrollbar with the .html file loading
    successfully.
    How do I load the .css file for the .html file the same way-
    the .html file loads correctly, but not the .css file?
    ****Right now, I get the following errors:
    1119: Access of possibly undefined property styleSheet
    through a reference with static type fl.controls:TextArea.
    myTextField.styleSheet = css;
    1120: Access of undefined property pageContent.
    myTextField.htmlText = pageContent;
    when I try this current AS3 code:
    //Load CSS Data
    var cssLoader:URLLoader = new URLLoader();
    var cssRequest:URLRequest = new URLRequest("example.css");
    cssLoader.addEventListener(Event.COMPLETE,
    cssLoaderComplete);
    cssLoader.load(cssRequest);
    function cssLoaderComplete(evt:Event):void{
    var css:StyleSheet = new StyleSheet();
    css.parseCSS(URLLoader(evt.target).data);
    myTextField.styleSheet = css;
    myTextField.htmlText = pageContent;
    //Load HTML Data
    function textLoadComplete(event:Event):void
    myTextField.htmlText = textLoader.data;
    myTextField.editable = false;
    var textLoader:URLLoader = new URLLoader();
    var textReq:URLRequest = new URLRequest("htmltext.html");
    textLoader.load(textReq);
    textLoader.addEventListener(Event.COMPLETE,
    textLoadComplete);

    Okay - thanks.
    The really bizarre thing to me is that I got this simple tutorial:
    http://www.macloo.com/examples/flash/CSS_in_Flash/css_with_xml.html
    I pasted the exact AS onto my stage:
    // set up the textfield attributes
    myTextField_txt.html = true;
    myTextField_txt.wordWrap = true;
    myTextField_txt.multiline = true;
    myTextField_txt.condenseWhite = true;
    // create new style sheet object
    var myCSS = new TextField.StyleSheet();
    // specify the location of your existing CSS file
    var cssURL = "example_2.css";
    // load CSS file
    myCSS.load(cssURL);
    // define onLoad handler
    myCSS.onLoad = function(success) {
        if (success) {
            /* if the style sheet loaded without error */
            myTextField_txt.styleSheet = myCSS;
            myTextField_txt.text = "CSS file loaded successfully. You may proceed.";
        } else {
            myTextField_txt.text = "CSS file failed to load!";
    //load the XML file
    myContent = new XML();
    myContent.ignoreWhite = true;
    myContent.load("story_example.xml");
    myContent.onLoad = function(success) {
        if (success) {
            myTextField_txt.text = myContent;
        } else {
            myTextField_txt.text += "<br /> XML file failed to load!";
    Then I  swap out the css file name with what I have - style_dtf.css - and it doesn't error (no output regarding CSS), but it shows ALL the code from the XML file in a big string, with all the tags and everything.
    Very weird...
    I even pasted the CSS from the example file into the beginning of my CSS file and still same effect.
    I do have all my SWFs in a seperate folder, but for now I just duplicated my CSS and XML into both folders.

  • Loading external Swf into a specific area in Fla file

    I'm sure this question has been asked a trillion time. But truth be told there's no good tutorial for this out there!
    I am trying to load an external swf slide show into my fla file. I want to be able to load into a specific place on the stage.
    I have this code for preloader that loads in an external swf, but it covers the entire swf. Is there any way of changing this slightly to allow it to be loaded in one spot?
    var l:Loader = new Loader();
    l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
    l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
    l.load(new URLRequest("Fuggles Brasserie Restaurant4.swf"));
    function loop(e:ProgressEvent):void
    var perc:Number = e.bytesLoaded / e.bytesTotal;
    percent.text = Math.ceil(perc*100).toString() +"%";
    function done(e:Event):void
    removeChildAt(0);
    percent = null;
    addChild(l);
    Cheers
    t

    If the loaded object fills the stage, then I have to wonder why you need to locate it anywhere specific.  Or is it possible you are just unloading the rest of the visuals when you use that removeChildAt(0) command such that the loaded object is the only thing  remaining.  In any case, you can assign x and y properties to the Loader ( I do it in the done function, but locating the Loader can be done anytime after it is instantiated)...
    function done(e:Event):void
         removeChildAt(0);
         percent = null;
         l.x = someX;
         l.y = someY;
         addChild(l);

  • How to load a CSF file in indesign cs3 via scripting?

    Hi all
    How can I load a csf file into indesign from a path?. Once loaded, it is not remaining in dropdown list. Could anyone suggest on this?
    Thanks
    Thamil

    Once loaded, it is not remaining in dropdown list. Could anyone suggest on this?
    Try to place the file to the following folder: YourUserFolder\Library\Application Support\Adobe\Color\Settings
    (This is for Mac)
    How can I load a csf file into indesign from a path?
    By script you can do this like so:
    var myPath = "~/Desktop/MySettings.csf";
    var myFile = new File (myPath);
    if (myFile.exists) {
        app.colorSettings.cmsSettingsPath = myFile;
    else {
        alert("File \""+ myPath + "\" can't be found.");

Maybe you are looking for