Can I constrain mouse to loaded swf? (beginner question)

Hi folks, I built a movie in flash CS4 based on the tutorial here:
http://www.kirupa.com/developer/flashcs3/detecting_when_mouse_leaves_movie.htmhttp://www.kirupa.com/developer/flashcs3/detecting_when_mouse_leaves_movie.htm Now if I load this swf into a bigger SWF the mouse is acting in the entire movie as if it were in de loaded swf. This also happens when I test it (ctrl-enter) and make the resulting box bigger... the mouse will not fade at the border of the swf any more, but at the border of the containing window....) is there a (easy) way to constrain the mouse behaviour within the box of the loaded swf (like the MOUSELEAVE event triggered when i leave the box of the loaded swf in stead of the entire stage?) Thanks!

okay!
So I'm a little bit further now...
I restricted the mouse within the containing box by monitoring it's position in de container. thanks for that tip!
that works!
so next step is: How do I get my mouse back? (the swf in the container contains a Mouse.hide and Mouse.show doesn't seem to do anything?
and 2nd is how do I get the MOUSELEAVE function to fire in de contained swf when the containermouse is no longer over the contained swf?
I will check out the Attaboy tip now.. see if I can find more info on that.

Similar Messages

  • How can I make my external loaded .SWF file smoothly disappear after 15 seconds?

    Hi,
    How can I make my external loaded .SWF file smoothly disappear after 15 seconds? The following is the code to load an external .SWF file:
    var K:Loader=new Loader();
    addChild(K);
    K.load(new URLRequest("clock.swf"));
    K.x = 165;
    K.y = 247;
    K.contentLoaderInfo.addEventListener(Event.INIT, growLoader);
    function growLoader(evt:Event):void {
         K.width = 130;
         K.height = 130;
    I want to make clock.swf file disappear from the page after 15 seconds using some smooth disappear effect.
    Please help.
    Thanks.

    Something even better:
    http://www.greensock.com/
    Check out TimelineMax I LOVE it...
    The guy that made this (and gives it away for free!) is a saint.

  • Can you tell when a loaded SWF has reached its final frame?

    I used loadMovie to load an external SWF into the bottom-half
    of a main "shell" swf. When that loaded SWF finishes playing (it's
    just an animation), I need to populate a text field with the word
    "DONE" . The text field resides on the _root, so I need some way to
    know when the loaded SWF has reached its last frame...
    This would obviously be easy if I had the .FLA of the loaded
    SWF because I could just write the actionscript on the last frame
    of that SWF to populate the _root textfield. Alas, I do not have
    the source FLA of that loaded SWF, so I need some way to have the
    main "shell" SWF/FLA know when that loaded SWF has reached its end.
    Is this possible???
    Thanks!!!

    DIY_Lobotomy,
    > The reality of my situation is that there's a "menu" of
    sorts that
    > gets loaded into "contentClip". This "menu" has a bunch
    of links.
    So far, so good.
    > When clicked, each link loads a DIFFERENT swf into
    "contentClip".
    > It is THOSE swfs that I need to note the end of.
    That's still okay.
    > So, there's actually more than one, and they're not
    exactly being
    > loaded directly from my main movie, since they're
    actually loaded
    > based on a link being clicked in the movie that is
    currently loaded
    > into "containerClip"
    The concept is still the same, no matter what. No matter how
    deep the
    one-clip-loads-another chain goes, you have to keep taps on
    each chain link.
    When the final link has loaded, you'll be able to make your
    object reference
    to that movie clip. That movie clip -- because it's an
    instance of the
    MovieClip class -- will have the _currentframe and
    _totalframes properties.
    You'll just be checking *that* cliip's properties instead of
    the one named
    contentClip in my own example.
    You can loop using onEnterFrame or, if you prefer, with
    setInterva().
    That doesn't much matter either, so long as you repeatedly
    poll the deepest
    clip to test its current frame against its last frame (this
    all assumes that
    the clip being tested is a linear animation whose end
    corresponds to its
    last frame; otherwise, you could check _currentframe against
    any arbitrary
    frame number).
    > I hope that wasn't too confusing! Do you still have a
    solution???
    Not too confusing to understand, but it might be confusing
    to route
    through in practice. Not confusing, actually, but meticulous
    ... you'll
    have to be careful with your pathing. Nested movie clips are
    very much like
    nested folders on your hard drive. Their instance names
    relate to the
    folder names.
    Now, if that menu doesn't have an instance name you provided
    -- or if
    any fork along the path has an instance name you can't
    control -- you can
    still reference the nested movie clips. If you test your file
    in the
    Debugger panel, you'll see all the instances laid out in
    hierarchical order.
    You'll see that automatic instance names are provided
    (something like
    "instance1", "instance2", etc.).
    David Stiller
    Contributor, How to Cheat in Flash CS3
    http://tinyurl.com/2cp6na
    "Luck is the residue of good design."

  • Can't stop music in loaded swf

    I have used Loader to load an swf which has looping music.
    When I call unload - the music keeps playing.
    Could someone please help me?
    Code below:

    Thankyou. When I say SoundMixer.stopAll(); I get the
    following error message
    1120: Access of undefined property SoundMixer.
    I have added these 2 statements at the top of my package:
    import flash.media.Sound;
    import flash.media.SoundChannel;
    Any help is appreciated.
    As for the alternative method, if the loaded movieclip has a
    single-frame event wav file (set to repeat on a single frame in the
    timeline) what is the correct path to the loaded swf's sound
    instance?

  • Can I prevent a newly loaded SWF to override my main swf's alignment?

    Hi. I'm having a main flash with no_scale set to true and align set to TOP. I load a swf, not made by me, which i think it has align set to TOP_LEFT because when i load it everything aligns to TOP_LEFT and looks exactly as my main SWF looks when I align it to TOP_LEFT.
    Is anything i'm saying make sense? And is there any way to prevent that aligment from happening? Of course there's always the solution to modify my whole main and adjustment functions to align everything, corectly to the left. But I will love not to resort to that solution.
    Thank you.

    Moreover check also the compatibility of your open source license with MPL
    Regards, Giuseppe

  • How can I get stage width of an loaded swf?

    Is there any way to get the real stageWidth of an loaded swf?
    The problem comes when the loaded swf has some elements outside the scene. In this case content.width becomes bigger then the scene.
    My code looks like this:
    var request:URLRequest = new URLRequest(file.url);
    var loader:Loader = new Loader();
    loader.load(request);
    loader.contentLoaderInfo.addEventListener(Event.INIT, checkSize);
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, addImg);
    private function checkSize(e:Event) {
                // this is where I need to see the width of my loaded swf
    trace(e.target.content.width);
    private function addImg(e:Event) {
                    trace("complete");
    Thanks,
    Andrei

    I don't think you can get the stage width of the loaded file unless you assign it as a constant somewhere within the file.  The loaded file forfeits its stage when it is loaded into another swf

  • Can't Access MovieClips and Functions in Loaded SWF

    Hi everybody,
    I'm trying to simply access anything inside this loaded SWF and all I get is 'null'.
    I have code in the parent SWF that needs to tell the child SWF movieclip what to do but nothing works. This was a piee of cake in AS2 and I can't seem to get anything to crossover in AS3.
    Here's my code:
    import com.greensock.TweenMax;
    import flash.display.MovieClip;
    var myLoader:Loader = new Loader();
    var url:URLRequest = new URLRequest("SWCS_S3_500x250_exp_panel_2.swf"); // in this case both SWFs are in the same folder
    myLoader.load(url);  // load the SWF file
    panel2.addChild(myLoader);   // add that instance to the display list, adding it to the Stage at 0,0
    panel2 = myLoader.content as MovieClip;
    photo_about.alpha = 0;
    photo_downloads.alpha = 0;
    //panel2.content_about.alpha = 0;
    //panel2.content_downloads.alpha = 0;
    function closeSection():void
              panel2.controlsMC.forcePause();
              TweenMax.to(photo_about, .5, {alpha:0});
              TweenMax.to(photo_downloads, .5, {alpha:0});
              TweenMax.to(photo_home, .5, {alpha:0});
              TweenMax.to(panel2.content_about, .5, {alpha:0});
              TweenMax.to(panel2.content_downloads, .5, {alpha:0});
              TweenMax.to(panel2.controlsMC, .5, {autoAlpha:0});
              TweenMax.to(panel2.content_home, .5, {alpha:0});
    panel2 traces null and all the clips loaded within pull up undefined property errors.
    Can somebody please tell me what I'm doing wrong? I'd be stoked to know what I'm missing and feel like this should be a piece of cake.
    Thanks for any help!

    You are not adding the content to the stage at 0,0, you are adding it to panel2 at 0,0.  THen you take panel2 and assign it to be something that likely doesn't exist by the time you assign it.  You need to wait until the loader completes loading before you attempt to do anything with its content, otherwise it has no content (null).  Similarly, you cannot control anything in the loaded swf until it has finished loading.  So assign an event listener to the contentLoaderInfo property of the Loader to determine when loading is complete, and have the event handler function deal with starting the interaction with it.
    var myLoader:Loader = new Loader();
    var url:URLRequest = new URLRequest("SWCS_S3_500x250_exp_panel_2.swf");
    myLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, processLoadedSWF);
    myLoader.load(url);
    function processLoadedSWF(evt:Event):void {
        // deal with the loaded swf here
        // but you don't want to be assigning it to the panel2 object that contains the loader
    As far as controlling anything inside the swf you load, is it an AS1/2 or an AS3 swf?

  • Can't target main stage from dynamically loaded swf...

    A part of the Flash app. I'm working on right now does the following -
    Main stage loads an external swf using the following function:
    function loadAsset(evt:String):void{
    var assetName:String = evt;
    if (assetName != null){
      var assetLdr:Loader = new Loader(); 
      var assetURL:String = assetName; 
      var assetURLReq:URLRequest = new URLRequest(assetURL); 
      assetLdr.load(assetURLReq); 
      assetLdr.contentLoaderInfo.addEventListener( Event.INIT , loaded) 
      assetLdr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, displayAssetLoaderProgress);  
      function loaded(event:Event):void { 
       var targetLoader:Loader = Loader(event.target.loader); 
       assetWindow.addChild(targetLoader);
    The externally loaded swf loads another external swf into itself using the following function:
    function loadQuiz(evt:String):void{   
    var quizName:String = evt;
    if (quizName != null){
      var quizLdr:Loader = new Loader();
      var quizURL:String = quizName;
      var quizURLReq:URLRequest = new URLRequest(quizURL);
      quizLdr.load(quizURLReq);
      quizLdr.contentLoaderInfo.addEventListener( Event.INIT , loaded)       
      quizLdr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, displayQuizLoaderProgress); 
      function loaded(event:Event):void {
       var targetLoader:Loader = Loader(event.target.loader);
       quizWindow.assetLoader.addChild(targetLoader);     
    Everything loads fine, but from the quizWindow.assetLoader.addChild(targetLoader) level, I want to send a message/fill in a dynamic text box on the Main Stage. I have been "parenting" my brains out and I'm not sure how to communicate with that level.
    can anyone show me the proper path or method based off the above, or have a suggestion?
    Cheers,
    ~Chipleh

    Andrei1,
    Thanks again for your help. I was finally able to get the solution you posted below to work for me.
    Much appreciation,
    ~Chipleh
    "In your loaded movie write:
    function traceMyself(e:MouseEvent):void{
         dispatchEvent(new Event("I_WANT_TEXT"));
    function writeText(text:String):void {
         xmlFileName1.text = text;
    In the top movie that loads external swfs something like that:
    loadedSwf.addEventListener("I_WANT_TEXT", onTextRequest, true);
    function onTextRequest(e:Event):void {
         Object(e.target).writeText(tQuizXmlFile1.theQuizXmlFile.text);
    This way these two entities are independent and, most importantly, don't care who is the parent or grandparent."

  • Can you enumerate exported symbols in a loaded SWF?

    We have a number of SWFs that we use as asset libraries.  These SWFs each contain a bunch of statically exported symbols.
    I'm trying to make a tool to help catalog our assets.  I want the tool to be able to load these library SWFs and extract a list of all the exported symbols each contains.  Is that possible to do?  I can't find a way to enumerate or iterate over the exported symbols in the application domains of the loaded SWFs.
    (I could swear I saw an example of doing this in documentation somewhere, but now I can't find it... I'm wondering if I dreamed it, or misinterpreted some other example.)
    I'd be game for doctoring up the library SWFs in some way, e.g. make them use some custom helper class as their document class, if that would help.

    A friend of mine and I came to this post hoping to be told how to do it, after getting just "use jsfl" we set off on our journey to learn a bit about it.
    After an hour, we did it!... Kinda. Thanks for suggesting jsfl.
    So in CS5, we go File > New > Flash JavaScript File
    Then we looked at some jsfl docs ( http://help.adobe.com/en_US/Flash/10.0_ExtendingFlash/WS5b3ccc516d4fbf351e63e3d118a901b0bd -8000.html) tried and tried, looked at the docs some more, tried some more and eventually came up with this script:
    var doc = fl.openDocument("file:///PutFilePathHere/YourFlashFilesName.fla");
    var itemArray = fl.getDocumentDOM().library.items;
    var iLength = itemArray.length;
    fl.trace(iLength.toString());
    fl.outputPanel.clear();
    for(var i = 0; i < iLength; ++i)
        if(itemArray[i] == "[object SymbolItem]")
            var str = itemArray[i].name;
            var iLastIndex = (str.lastIndexOf("/"));
            if(iLastIndex > -1)
                str = str.slice(iLastIndex+1);
                fl.trace(str);
    fl.outputPanel.save("file:///PutFilePathHere/ExportedSymbols.txt");
    And yay! A text document filled with all the symbols in in the library. Ok, ok, it's not perfect because it includes symbols that weren't marked as "export for actionscript 3" which is what we initially wanted, but we're either going to perfect it or just deal with it and put identifiers on our LinkageNames (like EX_Tree, EX_Fire for exported to as3 symbols, and just leave the other symbols alone).

  • Before starting fire fox I can use the mouse to highlight my desk top icons. After ffox is loaded the mouse will point to the icons but will no longer high light them. When I click it just opens the icon.

    # Question
    before starting fire fox I can use the mouse to highlight my desk top icons. After ffox is loaded the mouse will point to the icons but will no longer high light them. When I click it just opens the icon.

    To attempt a new chat session...
    For the link below click the Still Need Help? option in the blue area at the bottom and choose the chat option...
    http://helpx.adobe.com/x-productkb/global/service1.html

  • Can button in loaded SWF file unload or close the file ?

    Hi,
    I am loading 2 SWF files A and B, I have a button on each.
    When I press button on SWF A it loads SWF B. However I cannot get
    the button to close / unload the SWF A.
    Is this possible ?
    To Load I am using:
    Thanks,
    Paul

    No.I am using Loader since I dont need to pass one URL for fetching swf content.I need to get the displayobject from ByteArray which should be free from all the security issues.I heard that we cannot set 'securityDomain' property of loaderContext (using in Loader) in AIR.So please give a solution for getting bytes.

  • Can't stop loaded .swf from looping

    I have a loaded .swf that has the necesary stops to just play once and stop. It works when testing the movie, but once uploaded to the server, it loops forever, any ideas,  I am using ActionScript 2.0

    it works when tested in HTML browser, but not when uploaded to server

  • Can preloader sound settings affect the swf it loads?

    Thanks to kglad, my preloader music now fades out as the progress bar completes (the preloader code is below with the new code in bold).
    However, the new code added to the preloader seems to be affecting the sound in the main swf (the bigger swf that the preloader loads - 'lesson.swf' - which is a series of exercises).
    The exercises in the main swf have sound cues for right and wrong answers. The first time the main swf loads, there is no sound at all in the exercises. If I navigate to another page of the website and come back to the exercises, the sound is normal. But if I navigate to another page and come back a third time, the sound is audible, but reduced in volume. If I keep switching off the page and back to the page, the sound varies from no sound to full sound to about half the full volume.
    Is it possible that the code on frame 2 of the preloader, the code that sets the volume for the preloader music, is also applying to the main swf, so that whatever point the preloader progress bar gets to before the main swf loads becomes the volume of the main swf? The first time the preloader runs, the progress bar goes all the way from left to right and the sound volume fades to zero. Then the volume in the main swf is zero. The next time the preloader runs, it only gets a little way across before the exercises come up, and the sound in the exercises is full volume.
    Is there a way to fix this? I should add that if I comment out the new code that fades out the preloader music, all the sound works normally. Thanks in advance.
    var alreadyExecuted:Boolean
    if(!alreadyExecuted){
    alreadyExecuted=true;
    var s:Sound=new Sound(TitleScreen.Notes_mc);
    this.createEmptyMovieClip("container_mc", "100");
    my_mc = new MovieClipLoader();
    preload = new Object();
    my_mc.addListener(preload);
    preload.onLoadStart = function(targetMC) {
                    container_mc._visible = false;
                    loadingBar._visible = true;
                    loadingBorder._visible = true;
                    loadingText._visible = false;
                    loadingTitleScreen._visible = true;
                    loadingLessonName._visible = true;
    preload.onLoadComplete = function(targetMC) {
                    container_mc._visible = true;
                    loadingBorder._visible = false;
                    loadingBar._visible = false;
                    loadingText._visible = false;
                    loadingTitleScreen._visible = false;
                    loadingLessonName._visible = false;
                    gotoAndStop(4);
    my_mc.loadClip("lesson.swf", "container_mc");
    ACTIONS LAYER, FRAME 2:
    loadingBar._width = (container_mc.getBytesLoaded()/container_mc.getBytesTotal()) * 576.0;
    loadingText.text  = "Loading " + Math.round(container_mc.getBytesLoaded() / 1024) + " K  of "+ Math.round(container_mc.getBytesTotal() / 1024) + " K";
    var vol:Number=Math.round(100*container_mc.getBytesLoaded()/container_mc. getBytesTotal())
    if(vol>80){
    s.setVolume(5*(100-vol));

    your sounds in the loaded swf should be instantiated using something like:
    var somesoundinstance:Sound=new Sound(this):

  • 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 ; )

  • Applying an onDrag actionscript to a loaded swf

    I want to make a loaded swf file dragable within the main
    stage. Can someone point me to a tutorial or show me how to do it?
    Thank you!

    This one took a few tries to get right. But I think I figured
    it out for yuh'. I assumed you were using a "ScrollPane" for your
    scrolling and that there was a button inside of that component. Let
    me know if this is wrong. It shouldn't be too different even if
    you're not using the "ScrollPane". Aslo, all the code below goes on
    the main timeline.
    notes:
    "container" is the empty clip that holds the content.
    "mc" is the MovieClip inside of the ScrollPane ( located in
    the loaded *.swf ).
    "mouseIsDown" is a boolean ( true/false). It checks to see if
    the user is holding down on the mouse or not.
    The rest is pretty easy to figure out.

Maybe you are looking for

  • BP Custom Field replication - CRM to ECC

    Hello Developers, I have added custom fields to the CRM BUT000 (Business Partner) table, using AET.  Now,  I need to replicate these custom fiields to ECC.  We have configured, and are successfully replicating the standard BP fields from CRM to ECC. 

  • How can I recover X11 app  missing by mistake in my new mac??

    I 'd like to work with windows office ,but I can`t be cause of I`ve missed X11 app from my computer;MAC O SX 10.7.3.When I try to install windows office for MAC  my computer gives  an message you can´t set up windows becausu X11 is not in your comput

  • How to print "Document & Markups"

    When using EPrint, I would like to be able to print the document and markups.  For example: We do inspections at our stores, and have the managers sign the form on our tablets.  We then send the form to the Eprint printers.  However, when we send the

  • How to translate discoverer reports to other languages

    Hi All, We are using Oracle Apps 11i(HRMS) and Discoverer 4i. We are planning to install NLS patches for Canadian French language. Can you please provide the following information 1. Does Discoverer 4i support multi-language ? 2. If it supports, will

  • How to draw in class from out side of it ???

    Hi Im trying to create : class MySomething extends Component { public MySomething() {} public void paint(Graphics g) { g.drawString("MySomething",10,10); but when i call it from a applet it doesnt draw in the applet. Thanks for all the help