MouseX position problem in container loaded .swf

Hi All,
Maybe looking at me in the face but I am having trouble tracing mouseX position.
I have an intro .swf that plays and once finished creates a container and loads main movie in that container.
In the main movie I have an infinite menu where the speed is controlled by mouseX.
Standalone the main movie works perfectly but as soon as I load into container I lose the mouseX.
Below is 'some' of the code that sits in Main movie.
addEventListener(Event.ENTER_FRAME, moveGallery);.........
function moveGallery(e:Event):void {
var speed:Number = -(0.02 * (startpage_nav_mc.mouseX - centerX));..........
I tried adding stage.addEventListener(Event.ENTER_FRAME, moveGallery) to see if that helped follow mouse once loaded into container. Nothing happened!!
Thanks in Advance for any thoughts.
Chris

Hi Ned,
Just didn't wont to bother anyone with too much code. After debugg it is the centerX that is the problem. See below.
How do I need to define it?
Chris
//Save the horizontal center
var centerX:Number = stage.stageWidth / 2;
//Save the width of the whole gallery
var galleryWidth:Number = startpage_nav_mc.startpage_nav_container_mc.nav_mc.width;
//Speed of the movement (calculated by the mouse position in the moveGallery() function)
//Add an ENTER_FRAME listener for the animation
addEventListener(Event.ENTER_FRAME, moveGallery);
function moveGallery(e:Event):void {
     //Calculate the new speed
     var speed:Number = -(0.02 * (mouseX - centerX));
     //var speed:Number = -(0.02 * (startpage_nav_mc.mouseX - centerX));
     //Update the x coordinate
     startpage_nav_mc.startpage_nav_container_mc.nav_mc.x+=(speed/1.3);
     //Check if we are too far on the right (no more stuff on the left edge)
     if (startpage_nav_mc.startpage_nav_container_mc.nav_mc.x>0) {
          //Update the gallery's coordinates
          startpage_nav_mc.startpage_nav_container_mc.nav_mc.x= (-galleryWidth/2);
     //Check if we are too far on the left (no more stuff on the right edge)
     if (startpage_nav_mc.startpage_nav_container_mc.nav_mc.x<(-galleryWidth/2)) {
          //Update the gallery's coordinates
          startpage_nav_mc.startpage_nav_container_mc.nav_mc.x=0;

Similar Messages

  • Setting External Loaded SWF dimension

    hi guys...,
    i'll be straight to point,well i'm now working on a project using action  script 3 now what i'm trying to make is a Main SWF that load whatever  other swf into it the tricky thing is that i used 1 xml document read  the external swf source and it's setting(such as it's x,y position and  it's width and height) and i'm having problem setting the loaded swf width and  height btw it's an desktop application and not a website application.,
    here is my code:
    //variable list
    var swfList:XMLList; //hold all the zone list from the xml
    var totalZone:uint; //total of zone there is in the xml
    var myURLLoader:URLLoader = new URLLoader();
    var swf:Movie Clip;//hold the loaded swf
    var swfLoader:Loader = new Loader();//loader instance used to load the external swf
    var myCounter:uint = 0;
    //load the xml file
    myURLLoader.load(new URLRequest('myXMLFile.xml'));
    myURLLoader.addEventListener(Event.COMPLETE, processXML, false, 0, true);
    function processXML(e:Event):void
        removeEventListener(Event.COMPLETE, processXML);
        XML.ignoreWhitespace= true;
        var myXML:XML = new XML(e.target.data);
        swfList = myXML.SWF;
        totalSWF = myXML.SWF.length();
        loadSWF();
    function loadSWF():void
        swfLoader.contentLoaderInfo.addEventListener(Event.INIT, swfSetting);
        swfLoader.load(new URLRequest(swfList[myCounter].@source));
    function swfSetting(e:Event):void
        //making new instance of sprite to hold the new loaded swf
        swf = new MovieClip();
        //casting the loader content into a movieclip
        swf = e.target.content;
        addChild(swf);
        swfLoader.unload();
        swf.x = swfList[myCounter].@left;
        swf.y = swfList[myCounter].@top;
        swf.width= swfList[myCounter].@width;
        swf.height= swfList[myCounter].@height;
        addChild(swf);
        if(myCounter < totalSWF)
            myCounter++;
            trace('myCounter: ' + myCounter );
            loadSWF();
    and here is what the result ( it make the width and height of the loaded swf to 0):
    swfLoader.contentLoaderInfo.width : 320
    swfLoader.contentLoaderInfo.height : 240
    module: MyVideo/flvplayer.swf
    x:0
    x container:0
    y:0
    y container:0
    xml width:550
    width container:0
    xml height:400
    height container:0
    myCounter: 1
    swfLoader.contentLoaderInfo.width : 550
    swfLoader.contentLoaderInfo.height : 400
    module: AnalogueClock.swf
    x:50
    x container:50
    y:0
    y container:0
    xml width:250
    width container:250
    xml height:200
    height container:200
    myCounter: 2
    swfLoader.contentLoaderInfo.width : 800
    swfLoader.contentLoaderInfo.height : 30
    module: MyNewsticker/newsticker.swf
    x:0
    x container:0
    y:0
    y container:0
    xml width:300
    width container:0
    xml height:50
    height container:0
    most of my loaded swf beside the analouge clock is full action script code and in case of the analouge clock it is a swf that has a movie clip on it's stage (the other are fully created from action script 3.0)
    please do help me..,
    cause i'm already really desperate and going crazy by this problem..,

    sorry i copied the code from the other swf i used to do try and error test..,
    basically the container is the same as swf varibale
    here the code so you would'nt get confused:
    //variable list
    var swfList:XMLList; //hold all the zone list from the xml
    var totalZone:uint; //total of zone there is in the xml
    var myURLLoader:URLLoader = new URLLoader();
    var swf:Movie Clip;//hold the loaded swf
    var swfLoader:Loader = new Loader();//loader instance used to load the external swf
    var myCounter:uint = 0;
    //load the xml file
    myURLLoader.load(new URLRequest('myXMLFile.xml'));
    myURLLoader.addEventListener(Event.COMPLETE, processXML, false, 0, true);
    function processXML(e:Event):void
        removeEventListener(Event.COMPLETE, processXML);
        XML.ignoreWhitespace= true;
        var myXML:XML = new XML(e.target.data);
        swfList = myXML.SWF;
        totalSWF = myXML.SWF.length();
        loadSWF();
    function loadSWF():void
        swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfSetting);
        swfLoader.load(new URLRequest(swfList[myCounter].@source));
    function swfSetting(e:Event):void
        //making new instance of sprite to hold the new loaded swf
        swf = new MovieClip();
        //casting the loader content into a movieclip
        swf = e.target.content;
        addChild(swf);
        swfLoader.unload();
        swf.x = swfList[myCounter].@left;
        swf.y = swfList[myCounter].@top;
        swf.width= swfList[myCounter].@width;
        swf.height= swfList[myCounter].@height;
        addChild(swf);
        if(myCounter < totalSWF)
            myCounter++;
            trace('myCounter: ' + myCounter );
            loadSWF();
    well in my code i did cast the loader into a movie clip and then set it's width and heigt,right???
    wouldn't it just give me the same result??
    if it's not can u describe what u mean in more detail??
    some example about accessing the loader content would be really appreciated

  • How to unload externally loaded swf which contains 3D Carousel?

    Hello to all
    I am learning AS3 and have been taking on various tutorials found on the net. While learning about AS3 I came across a lesson on http://tutorials.flashmymind.com/2009/05/vertical-3d-carousel-with-actionscript-3-and-xml/ titled "Vertical 3D Carousel with AS3 and XML".
    I completed the tutorial and all worked fine so I then wanted to load the swf into a existing project. The loading of the swf goes fine and when I unload my loader it is removed but only visually as in my output panel in flash CS5 I get an error as follows
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at carousel_c_fla::MainTimeline/moveCarousel()
    this error repeats over and over again slowing my swf movie.
    So does this mean my main flash movie trying to still play / find my unloaded 3D Carousel?
    If so how do I unload remove all the AS3 that is trying to run from the 3D Carousel?
    I have included the AS3 below from the tutorial page and I understand that this is what I have to remove to "break free" from the 3D Carousel swf when it is unloaded. This is where I am stuck as my knowledge of AS3 is limited - Can you guys / girls help?
    //Import TweenMax
    import com.greensock.*;
    //The path to the XML file (use your own here)
    // old var from tutorial - var xmlPath:String = "http://tutorials.flashmymind.com/XML/carousel-menu.xml";
    var xmlPath:String = "carousel-menu.xml";
    //We'll store the loaded XML to this variable
    var xml:XML;
    //Create a loader and load the XML. Call the function "xmlLoaded" when done.
    var loader = new URLLoader();
    loader.load(new URLRequest(xmlPath));
    loader.addEventListener(Event.COMPLETE, xmlLoaded);
    //This function is called when the XML file is loaded
    function xmlLoaded(e:Event):void {
         //Make sure that we are not working with a null variable
         if ((e.target as URLLoader) != null ) {
              //Create a new XML object with the loaded XML data
              xml = new XML(loader.data);
              //Call the function that creates the menu
              createMenu();
    //We need to know how many items we have on the stage
    var numberOfItems:uint = 0;
    //This array will contain all the menu items
    var menuItems:Array = new Array();
    //Set the focal length
    var focalLength:Number = 350;
    //Set the vanishing point
    var vanishingPointX:Number = stage.stageWidth / 2;
    var vanishingPointY:Number = stage.stageHeight / 2;
    //We calculate the angleSpeed in the ENTER_FRAME listener
    var angleSpeed:Number = 0;
    //Radius of the circle
    var radius:Number = 128;
    //This function creates the menu
    function createMenu():void {
         //Get the number of menu items we will have
         numberOfItems = xml.items.item.length();
         //Calculate the angle difference between the menu items (in radians)
         var angleDifference:Number = Math.PI * (360 / numberOfItems) / 180;
         //We use a counter so we know how many menu items have been created
         var count:uint = 0;
         //Loop through all the <button></button> nodes in the XML
         for each (var item:XML in xml.items.item) {
              //Create a new menu item
              var menuItem:MenuItem = new MenuItem();
              //Calculate the starting angle for the menu item
              var startingAngle:Number = angleDifference * count;
              //Set a "currentAngle" attribute for the menu item
              menuItem.currentAngle = startingAngle;
              //Position the menu item
              menuItem.xpos3D = 0;
              menuItem.ypos3D = radius * Math.sin(startingAngle);
              menuItem.zpos3D = radius * Math.cos(startingAngle);
              //Calculate the scale ratio for the menu item (the further the item -> the smaller the scale ratio)
              var scaleRatio = focalLength/(focalLength + menuItem.zpos3D);
              //Scale the menu item according to the scale ratio
              menuItem.scaleX = menuItem.scaleY = scaleRatio;
              //Position the menu item to the stage (from 3D to 2D coordinates)
              menuItem.x = vanishingPointX + menuItem.xpos3D * scaleRatio;
              menuItem.y = vanishingPointY + menuItem.ypos3D * scaleRatio;
              //Add a text to the menu item
              menuItem.menuText.text = item.label;
              //Add a "linkTo" variable for the URL
              menuItem.linkTo = item.linkTo;
              //We don't want the text field to catch mouse events
              menuItem.mouseChildren = false;
              //Assign MOUSE_OVER, MOUSE_OUT and CLICK listeners for the menu item
              menuItem.addEventListener(MouseEvent.MOUSE_OVER, mouseOverItem);
              menuItem.addEventListener(MouseEvent.MOUSE_OUT, mouseOutItem);
              menuItem.addEventListener(MouseEvent.CLICK, itemClicked);
              //Add the menu item to the menu items array
              menuItems.push(menuItem);
              //Add the menu item to the stage
              addChild(menuItem);
              //Assign an initial alpha
              menuItem.alpha = 0.3;
              //Add some blur to the item
              TweenMax.to(menuItem,0, {blurFilter:{blurX:1, blurY:1}});
              //Update the count
              count++;
    //Add an ENTER_FRAME listener for the animation
    addEventListener(Event.ENTER_FRAME, moveCarousel);
    //This function is called in each frame
    function moveCarousel(e:Event):void {
         //Calculate the angle speed according to mouseY position
         angleSpeed = (mouseY - stage.stageHeight / 2) * 0.0002;
         //Loop through the menu items
         for (var i:uint = 0; i < menuItems.length; i++) {
              //Store the menu item to a local variable
              var menuItem:MenuItem = menuItems[i] as MenuItem;
              //Update the current angle of the item
              menuItem.currentAngle += angleSpeed;
              //Calculate a scale ratio
              var scaleRatio = focalLength/(focalLength + menuItem.zpos3D);
              //Scale the item according to the scale ratio
              menuItem.scaleX=menuItem.scaleY=scaleRatio;
              //Set new 3D coordinates
              menuItem.xpos3D=0;
              menuItem.ypos3D=radius*Math.sin(menuItem.currentAngle);
              menuItem.zpos3D=radius*Math.cos(menuItem.currentAngle);
              //Update the item's coordinates.
              menuItem.x=vanishingPointX+menuItem.xpos3D*scaleRatio;
              menuItem.y=vanishingPointY+menuItem.ypos3D*scaleRatio;
         //Call the function that sorts the items so they overlap each other correctly
         sortZ();
    //This function sorts the items so they overlap each other correctly
    function sortZ():void {
         //Sort the array so that the item which has the highest
         //z position (= furthest away) is first in the array
         menuItems.sortOn("zpos3D", Array.NUMERIC | Array.DESCENDING);
         //Set new child indexes for the item
         for (var i:uint = 0; i < menuItems.length; i++) {
              setChildIndex(menuItems[i], i);
    //This function is called when a mouse is over an item
    function mouseOverItem(e:Event):void {
         //Tween the item's properties
         TweenMax.to(e.target, 0.1, {alpha: 1, glowFilter:{color:0xffffff, alpha:1, blurX:60, blurY:60},blurFilter:{blurX:0, blurY:0}});
    //This function is called when a mouse is out of an item
    function mouseOutItem(e:Event):void {
         //Tween the item's properties
         TweenMax.to(e.target, 1, {alpha: 0.3, glowFilter:{color:0xffffff, alpha:1, blurX:0, blurY:0},blurFilter:{blurX:1, blurY:1}});
    //This function is called when an item is clicked
    function itemClicked(e:Event):void {
         //Navigate to the URL that's assigned to the menu item
         var urlRequest:URLRequest=new URLRequest(e.target.linkTo);
         navigateToURL(urlRequest);

    Hi Ned thanks for the reply,
    Ok so I have a button in my main movie that loads the external swf
    stop();
    var my_loader:Loader = new Loader();
    var my_btn:Button = new Button();
    var my_pb:ProgressBar = new ProgressBar();
    my_pb.source = my_loader.contentLoaderInfo;
    my_btn.addEventListener(MouseEvent.CLICK,startLoading);
    function startLoading(e:MouseEvent):void{
    my_loader.load(new URLRequest("carousel.swf"));
    addChild(my_pb);
    my_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, finishloading);
    function finishloading(e:Event):void{
    addChild(my_loader);
    my_loader.addEventListener("killMe",
    killLoadedClip);
    removeChild(my_pb);
    function killLoadedClip(e:Event):void {
    my_loader.removeEventListener("killMe",
    killLoadedClip);
    my_loader.unloadAndStop();
    removeChild(my_loader);
    Then I have a button in my loaded swf that closes the loader
    This is spread over 2 frames
    Frame1
    function closeIt(e:MouseEvent):void {
    parent.dispatchEvent(newEvent("killMe"));
    Frame 2
    back_btn.addEventListener(MouseEvent.CLICK, closeIt);
    Frame 2 also holds all the code for the carousel
    Thanks for your time and help in advance people ; )

  • Loading swf into container

    I have created a movie that loads several swfs through an
    empty container. I have tried changing file paths numerous times
    and I can't get the movies to play correctly. Actually, they did on
    our local testing server, but after uploading to the clients
    server, the problems began.
    My test page is:
    http://www.sumnerhomemortgage.com/test/index.html
    loader.swf initially plays part1.swf. Here is the code for
    that:
    loadMovie("
    http://www.sumnerhomemortgage.com/test/flash/part1.swf",
    container);

    Did you upload the FLV to the correct place?
    I downloaded part1.swf, opened it in Flash, and got the
    following error:
    Error opening URL '
    http://www.sumnerhomemortgage.com/test/flash/part1.flv'
    If I paste that URL into the browser I get a 404. I also
    tried it in:
    http://www.sumnerhomemortgage.com/test/part1.flv
    http://www.sumnerhomemortgage.com/part1.flv
    and got a 404 for all of them

  • Embedded container swf loading swf with xml

    I'd call myself an intermediate AS3 newbe. I have a series of slideshows that is called by a 'container' Flash file.
    These slideshow swf files are now rather large (230 kb) so as a test, I redid one of them as a  Flash file that uses xml rather than the images called within the file itself (file size 68 kb), which is my first exploration into xml & AS3.
    All the non-xml files load and play fine locally (well, sort of, since there's some weird glitchs which show up in different ways at different times in the container loading too many files one after another at times - and sometimes there's no problem at all) but that's not my current problem here.
    Basic URL structure:  document relative
    1. container file (container.fla/container.swf) will be embedded in a html file. --> /Flash.container.swf The contain file has a series of links to other .swf files.
    2. The container file other .swf files (selection of 10) from a  subfolder called /sbrds i.e. --> UILoader loads "Flash/sbrds/albert.swf"
    3.  The albert.fla/albert.swf loads an xml slideshow from a subfolder of sbrds  called /AlBert  --> /Flash/sbrds/Albert code "loader.load(new URLRequest("AlBert/AlBertXX.xml"));"  (quotes in message only)
    4. Inside the /Albert folder I have the xml file and all the images. xml file  is AlBertXX.xml  (attached)  
    5. local structure --> desktop/workingFiles/storyboards (container.fla) /Flash /sbrds (albert.fla) /Albert (Albertxx.xml & image.jpgs)
    would equal on the server as  root html/Flash/sbrds/Albert
    Locally... The albert.fla (in the /Flash/sbrds folder) itself works fine with no errors when calling the xml file.  But when I test that file from the container.fla/swf  I get a 2044/2032 error "Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: file:///.../myLocalDesktopFolder/storyboards/AlBert/AlBertXX.xml      at albert_fla::MainTimeline/albert_fla::frame1()"
    I've check and rechecked for any typos in the xml slideshow test and don't find any.  Any ideas?
    Could it be that I'm calling a xml driven file from a non-xml driven file?
    I have all the files including my buggy htm file at http://www.danwelter.com/susanTest_static.htm
    All the pertinent fla and image files are in the /flash folder (too many to attach).
    -- Thanks --- Susan

    Hi Jan
    Apparently the update went into place on my personal laptop
    overnight last night. I awoke this morning to discover it had
    rebooted itself and it was patiently waiting for me to enter my
    bootup password. Anyhoo, I happened to notice that today when I
    hovered the mouse over my Captivate movie, I saw the dreaded
    “click to activate and use this control” message that
    popped up in a tooltip. What to do?
    Well, I did notice that it seemed to require a mouse click to
    "activate" the control, but simply running the movie seemed to be
    fine. I then wondered what would be disabled. When my movie got to
    the first button, the initial click was used to enable the control.
    Then the second click was accepted and progressed the movie.
    I hopped out on the web and found a page at the following
    URL:
    http://www.amarasoftware.com/flash-problem.htm
    After following the instructions there, my files seemed fine.
    Here are the steps I followed:
    1. Copied the code on the page and pasted into an empty
    Notepad.
    theObjects = document.getElementsByTagName("object");
    for (var i = 0; i < theObjects.length; i++) {
    theObjects
    .outerHTML = theObjects.outerHTML;
    2. Saved as file name ieupdate.js.
    3. Copied the link code and pasted between the closing object
    and center tags.
    Before:
    </object>
    </center>
    After:
    </object>
    <script type="text/javascript"
    src="ieupdate.js"></script>
    </center>
    It occurs to me that one could easily modify the "seed" HTML
    page Captivate uses when it creates the HTML page. This page is
    named standard.htm and is found in the following location:
    C:\Program Files\Macromedia\Captivate\Templates\Publish
    This would save tweaking the HTM each time you publish. Then
    you would only need to worry about making sure you copied the
    associated ieupdate.js file to the same folder.
    You gotta love lawsuits. I really hope those that "won" are
    happy that we all now have to jump through all the hoops to make
    things work. Sheesh
    Hopefully this helps... Rick

  • Problem in loading SWF file

    Hi All,
    I am facing a problem in file loading. I have a file
    https://shopping.easycite.com/admin/tree/main.swf and in that file
    loading another file named “editNodeFome.swf”. To load
    "editNodeFome.swf" i am using related path. But the file is not
    loading.
    mcLoader.loadClip("editNodeFome.swf", _root.tempForm_mc);
    Can any one help me to find out the solution?

    show your mcl code or use trace(mcLoader) to confirm it
    exists along with _root.tempForm_mc. and make sure editNodeFome.swf
    is in the same directory as the html file that embeds
    main.swf.

  • Loading swf into SWFLoader before it is added to a container

    I want to dynamically load a SWF file, before a particular view is created in a Flex 4.5 mobile app. Is it possible to load a SWF file into a SWFLoader before the SWFLoader is added to a container? I tried this but it didn't work.
    I tried doing this using the AS3 Loader class and movieclips, but when I compile for iOS this method does not work for me. Is there a way to do what I want?

    Hello,
    Firstly, why do you want to do this?
    Secondly, you cannot run runtime-loaded SWF files on iOS devices.
    By that I mean you can probably only use static SWF files like assets, but code inside them will not work.
    If you still want to load it, try inside the initialize event handler.

  • Loading swf into swf in exact position

    It's very simple to load an external swf into a main swf with
    loadMovieNum("name.swf", 50);
    But how do I control the position of the loaded swf?
    Currently it just pops in the top left.

    Try loading your external .swf into a pre-positioned
    movieClip, for example myMovie.loadMovie("name.swf). If you do not
    want to do this you can position the loaded movie later in your
    application or onload by setting the x and y pos with some
    AS.

  • As 3 load swf flie problem,help

    I have now trapped by a strange problem of loading the swf
    file.For some reason I need to use a main swf file to load other
    swf file and use the class in it,it's very common.
    And now I worte a class blow to explain what problem I met:
    package
    import flash.display.*;
    import flash.events.*;
    import flash.geom.*;
    public class TestClass extends MovieClip
    public var sp:Sprite;
    public static var count:Array=new Array();
    public function TestClass()
    sp = new Sprite();
    //drawcrr();
    this.addEventListener("test",test);
    count.push("");
    trace("count in circle is:", count.length);
    private function test(e:Event):void
    drawcrr();
    public function drawcrr():void
    sp.graphics.beginFill(0);
    sp.graphics.drawCircle(0,0,10);
    sp.graphics.endFill();
    addChild(sp);
    Save it as TestClass.as for next use;
    Use the class to link to a fla file as the documentClass then
    compile as a swf file name as
    kk.swf then make a copy name kk1.swf;
    Create a new fla file in the same directory then write the
    code blow on the mainTimeLine :
    var kk:TestClass = new TestClass();
    var URL1:URLRequest = new URLRequest("kk1.swf");
    var URL2:URLRequest = new URLRequest("kk.swf");
    function domain():LoaderContext
    var context:LoaderContext = new LoaderContext();
    context.applicationDomain = new
    ApplicationDomain(ApplicationDomain.currentDomain);
    return context;
    var L1:Loader = new Loader();
    L1.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete);
    L1.load(URL1);
    var L2:Loader = new Loader();
    L2.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete);
    L2.load(URL2);
    //v.text = flash.system.Capabilities.version;
    function onComplete(e:Event)
    trace(e.target)
    then compile this fla file you will find the flash will put
    out below:
    count in circle is: 1
    count in circle is: 2
    count in circle is: 3
    [object LoaderInfo]
    [object LoaderInfo]
    and if you notation the line "var kk:TestClass = new
    TestClass();" compile it again
    the flash will output :
    count in circle is: 1
    count in circle is: 1
    [object LoaderInfo]
    [object LoaderInfo]
    It's prove that the same class in the different swf was
    loaded by a main swf file,the same class in the different swf file
    will be treated as the different class so that I can use them
    individually but when I put the code:"var kk:TestClass = new
    TestClass();" in the main swf file all this will be break down,I
    can't use the class in kk.swf and class in kk1.swf individually
    the flash make then as the same class because the static
    variable "count" was count to 3.
    it prove that all those 3 swf file will use the exactly same
    class;So, that's the problem,it will make my programme cause error.
    Can some one kindly to tell me why this happened?And how can
    I solve this problem.

    Sorry about that.
    That problem is:
    If I use a shell swf to load some swf file and the shell swf
    and the loaded swf file have the same name class,The loaded swf's
    class will be ignored.
    That will make me can't use the loaded swf file's class which
    have same name with the shell swf.
    However, this problem can be solved by useing the application
    domain.Just give the swf you loaded a new application domain in the
    shell swf.
    But after that I found a new problem appear in front of mine,
    that is:
    If I use the different application domain in my shell swf how
    could they communicate with each other?
    For example:
    If my shell swf have a class named TEST,and the loaded swf
    also have the same name class those two classes both extends the
    class named TESTParent and the TESTParent have a public static
    variable to count the instance of the class.If I want use those two
    TEST
    class individually and at the same time made the static
    variable in the TESTParent count work as a same class how can I do?

  • AIR load swf cash problem

    hi folks
    I am building android app.
    I have a problem with loading several .swfs cache. this swf-s have almost same package and class structure/ names.
    App stores ActionScript and assets of first loaded swf and when i try to load second swf, anyway it loads first swf.
    I used
    request.cacheResponse = false;
    request.useCache = false;
    loader.unload();
    loader.unloadAndStop();
    loader = null;
    but no luck, any solutions, suggestions?
    thanks

    I solved problem, swfs that I loading in app have same package names and classes, I changed package names for each swf and everything works fine.
    Main app stores in cash loaded swf-s AS code, I have't found solution how to clean this cash

  • Arranging Layer Position of Loaded SWF or Mc in ActionScript3

    Hi All
        I would like to RUN/LOAD my loaded SWF or Movie Clips BEHIND some existing Masks already designed in a scene or simply arrange their
        visibility position in ActionScript 3 while loading them with CODING only
        is there any command  to define, something similar to "Layers", "send to back", "bring to front "  ?
        Thank You .

    You can use the addChildAt() method to place things behind other things.  You can also use the setChildIndex() method.  Both are explained in the Help documentation.

  • Strange problem in loading swf created in Flash Builder 4 !

    Hi
    I am facing a strange issue in all my flash builder projects.
    Here is a sample flex 4 project: http://flashvisions.com/demos/flexdemo/
    you will see when it loads, it showes the first progressbar as grey and then the next one covering it as per flex4's new preloader mechanism. The example given above is a new flex project, without any code. It shows the first preloader then hangs on that for quiet some time  without any indication that anything is happening. Then it shows the second phaze of preloader after some time. This is happening to all my Flash builder projects.
    can some one suggest anything ? If possible watch this link to a medium bandwidth, not too high : http://flashvisions.com/demos/flexdemo/

    And this for 1.5:
    "In Flex or Flash, a loaded SWF takes on the FrameRate of the
    parent SWF. In flex you can set the framerate value for the main
    application with "framerate" attribute in the
    <mx:Application> tag."
    Tracy

  • Problem in loading swf within Flex 1.5

    Hi all,
    I'm working with a flex project.The logo of that project is a
    spinning wheel created with flash tweens. I ve loaded that swf file
    into Flex using a Loader component. But despite of whatever
    framerate i ve specified, the wheel spins in a constant speed,
    which is a little bit slower than the expected speed of the wheel.
    Is there any option in flex to increase the framerate, or is there
    any other way to do this. Pls.help.

    And this for 1.5:
    "In Flex or Flash, a loaded SWF takes on the FrameRate of the
    parent SWF. In flex you can set the framerate value for the main
    application with "framerate" attribute in the
    <mx:Application> tag."
    Tracy

  • Problem with loading swf

    Hi,
            I've an AIR application which is loading an swf file to swfloader. Its working properly when its running from builder. But not showing the swf file after exporting  it as an air installer package and run it on  desktop.The swf   file is stored in src itself.The swf file was generated using flash.
    Any help will be appreciated.
    Thanks in advance.

    Hi,
    It might be security issue.Air uses application sandbox.
    You are trying to load the content from non-application sand box to
    application sandbox.
    Any one of the following may give solution to this error.
    1.using HTMLLoader to load swf files.
    2.using loadbytes.
    3.creating sandboxbridge.
    You can check the loadbytes method in the attachment.
    vamshi.
    2009/10/5 newflexcoder <[email protected]>
    >
    Hi,
    >
            I've an AIR application which is loading an swf file to swfloader.
    Its working properly when its running from builder. But not showing the swf
    file after exporting  it as an air installer package and run it on
    desktop.The swf   file is stored in src itself.The swf file was generated
    using flash.
    >
    Any help will be appreciated.
    >
    Thanks in advance.
    >

  • (MX04) Pausing a loaded swf with sound objects within it

    Hi,
    I'm working on a PowerPoint-esque presentation where a user
    watches and listens to a loaded swf in the main movie, clicks the
    next button (which unloads the swf, advances to the next frame and
    loads the next swf), and watches the next one. Lather, rinse,
    repeat. Some of the sections are rather long, and I'd like to give
    the user the ability to pause and play by button click.
    I know how to stop and start the container MC, but that
    doesn't stop the sound object (and the embedded MCs). I also know
    how to pause and start a sound object using the object's instance
    name. Is there a way to pause everything from the main timeline,
    and keep the AS general enough so that any sound object pauses when
    clicked?
    Any help is most appreciated! MX04 and AS2.0.
    Thanks!

    Kglad,
    I tried your code and ran into some problems with stopping
    the mc's, as the embedded mc's within the loaded swf need to stop
    as well. I found the attached code to stop the mc's, but now am
    having trouble with the sound objects.
    Here's the issue, I used this:
    this.soundPosition = currentMovie.loop1.position/1000;
    this.currentMovie.loop1.stop();
    ... for the sound object stop commands and listed a new one
    for each loop I was using. On the play button I started them back
    up again. This all works, but when I start them up again they all
    play, not just the one that is currently paused. Do you mind giving
    me some guidance with the for (obj in mc) loop? My loop experience
    is nil. What I want to do is have the code cycle through all of the
    loops to see which one is playing, then store that information in a
    variable, then pause and play the variable. Does that sound right?
    Thanks again for the help!
    -Sandy

Maybe you are looking for

  • How to set up start and end dates for validity of contract account in FICAx

    Hi,   Can anyone tell me where can I set up the validitiy period for the contract account in FICA. In contract creation, I could just see the contract validity start date. I also need to know the validity end date. Please let me know the solution asa

  • Spreadsheets created in Numbers 3.0 won't upload

    The subject says it all.  I can drag .csv and .xlsx files into the Numbers for iCloud beta desktop, but when I try to drag a spreadsheet created with the latest version of Numbers it deems it a file that can't be imported.

  • How to load file with 500M into noncontiguous memory and visit them

    My data file consist of  a serial of 2d images. Each image is 174*130*2 butes and the total images in the file is up to 11000, which takes almost 500M bytes. I hope to load them into memory in one turn since I need to visit either image many times in

  • External Service Number(Service Entry Sheet)

    Dear All, I want External Service Number( EXTSRVNO) In Service Entry Sheet (item level) to be get displayed while doing the MIRO Txn. Please suggest how to include field EXTSRVNO  in MIRO screen at item level. Thanks & Regards Akshay

  • My Nano turns itself on in the early hours.......

    My Ipod turns itself on in the small hours, even though I make sure I switch it off and lock it. This means that the battery is dead every time I try to use it. Any ideas?