Buttons and external swfs

I would like to automatically load an external swf inside an existing empty mc (or a new one)  and load/unload different external swf on several button click fuctions.  I've read the other posts, but none that quite facilitates accomplishing this.
This is what I have, I know it's messy- but I've been trying so many different methods until its probably loaded with irrelevant functions!
var myLoader:Loader = new Loader(); addChild(myLoader); var url:URLRequest = new URLRequest("homepage.swf"); myLoader.load(url);
  myLoader.x=477;
  myLoader.y=0;
/* Click to Load/Unload SWF or Image from a URL.
Clicking on the symbol instance loads and displays the specified SWF or image URL. Clicking on the symbol instance a second time unloads the SWF or image.
Instructions:
1. Replace "http://www.helpexamples.com/flash/images/image1.jpg" below with the desired URL address of the SWF or image. Keep the quotation marks ("").
2. Files from internet domains separate from the domain where the calling SWF resides cannot be loaded without special configuration.
button_1.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF);
var fl_Loader:Loader;
//This variable keeps track of whether you want to load or unload the SWF
var fl_ToLoad:Boolean = true;
function fl_ClickToLoadUnloadSWF(event:MouseEvent):void
if(fl_ToLoad)
  fl_Loader = new Loader();
  fl_Loader.load(new URLRequest("homepage.swf"));
  fl_Loader.x=477;
  fl_Loader.y=0;
  removeChild(myLoader);
  removeChild(fl_Loader_2);
  removeChild(fl_Loader_3);
  removeChild(fl_Loader_4
  addChild(fl_Loader);
else
  fl_Loader.unload();
  removeChild(fl_Loader);
  removeChild(myLoader);
  removeChild(fl_Loader_2);
  removeChild(fl_Loader_3);
  removeChild(fl_Loader_4);
  fl_Loader = null;
// Toggle whether you want to load or unload the SWF
fl_ToLoad = !fl_ToLoad;
/* Click to Load/Unload SWF or Image from a URL.
Clicking on the symbol instance loads and displays the specified SWF or image URL. Clicking on the symbol instance a second time unloads the SWF or image.
Instructions:
1. Replace "http://www.helpexamples.com/flash/images/image1.jpg" below with the desired URL address of the SWF or image. Keep the quotation marks ("").
2. Files from internet domains separate from the domain where the calling SWF resides cannot be loaded without special configuration.
movieClip_2.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_2);
var fl_Loader_2:Loader;
//This variable keeps track of whether you want to load or unload the SWF
var fl_ToLoad_2:Boolean = true;
function fl_ClickToLoadUnloadSWF_2(event:MouseEvent):void
if(fl_ToLoad_2)
  fl_Loader_2 = new Loader();
  fl_Loader_2.load(new URLRequest("portfolio.swf"));
  fl_Loader_2.x=477;
  fl_Loader_2.y=0;
  removeChild(myLoader);
  removeChild(fl_Loader);
  removeChild(fl_Loader_3);
  removeChild(fl_Loader_4);
  addChild(fl_Loader_2);
else
  fl_Loader_2.unload();
  removeChild(fl_Loader_2);
  removeChild(fl_Loader);
  removeChild(fl_Loader_3);
  removeChild(fl_Loader_4);
  fl_Loader_2 = null;
// Toggle whether you want to load or unload the SWF
fl_ToLoad_2 = !fl_ToLoad_2;
/* Click to Load/Unload SWF or Image from a URL.
Clicking on the symbol instance loads and displays the specified SWF or image URL. Clicking on the symbol instance a second time unloads the SWF or image.
Instructions:
1. Replace "http://www.helpexamples.com/flash/images/image1.jpg" below with the desired URL address of the SWF or image. Keep the quotation marks ("").
2. Files from internet domains separate from the domain where the calling SWF resides cannot be loaded without special configuration.
movieClip_3.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_3);
var fl_Loader_3:Loader;
//This variable keeps track of whether you want to load or unload the SWF
var fl_ToLoad_3:Boolean = true;
function fl_ClickToLoadUnloadSWF_3(event:MouseEvent):void
if(fl_ToLoad_3)
  fl_Loader_3 = new Loader();
  fl_Loader_3.load(new URLRequest("about.swf"));
  fl_Loader_3.x=477;
  fl_Loader_3.y=0;
  removeChild(myLoader);
  removeChild(fl_Loader_2);
  removeChild(fl_Loader);
  removeChild(fl_Loader_4);
  addChild(fl_Loader_3);
else
  fl_Loader_3.unload();
  removeChild(fl_Loader_3);
  removeChild(fl_Loader_2);
  removeChild(fl_Loader);
  removeChild(fl_Loader_4);
  fl_Loader_3 = null;
// Toggle whether you want to load or unload the SWF
fl_ToLoad_3 = !fl_ToLoad_3;
/* Click to Load/Unload SWF or Image from a URL.
Clicking on the symbol instance loads and displays the specified SWF or image URL. Clicking on the symbol instance a second time unloads the SWF or image.
Instructions:
1. Replace "http://www.helpexamples.com/flash/images/image1.jpg" below with the desired URL address of the SWF or image. Keep the quotation marks ("").
2. Files from internet domains separate from the domain where the calling SWF resides cannot be loaded without special configuration.
movieClip_4.addEventListener(MouseEvent.CLICK, fl_ClickToLoadUnloadSWF_4);
var fl_Loader_4:Loader;
//This variable keeps track of whether you want to load or unload the SWF
var fl_ToLoad_4:Boolean = true;
function fl_ClickToLoadUnloadSWF_4(event:MouseEvent):void
if(fl_ToLoad_4)
  fl_Loader_4 = new Loader();
  fl_Loader_4.load(new URLRequest("contact.swf"));
  fl_Loader_4.x=477;
  fl_Loader_4.y=0;
  removeChild(myLoader);
  removeChild(fl_Loader_2);
  removeChild(fl_Loader_3);
  removeChild(fl_Loader);
  addChild(fl_Loader_4);
else
  fl_Loader_4.unload();
  removeChild(fl_Loader_4);
  removeChild(fl_Loader_2);
  removeChild(fl_Loader_3);
  removeChild(fl_Loader);
  fl_Loader_4 = null;
// Toggle whether you want to load or unload the SWF
fl_ToLoad_4 = !fl_ToLoad_4;

Kglad I read up on that but it's still not stopping.I'm publishing for  fp 10 and have tried several different variations including:
function gofolio (e:MouseEvent):void{
imageLoader.load(navfolio);
addChild(imageLoader);
imageLoader.unloadAndStop(true);
folio_btn.addEventListener(MouseEvent.CLICK, gofolio);
function goabout (e:MouseEvent):void{
imageLoader.load(navabout);
addChild(imageLoader);
imageLoader.unloadAndStop(true);
removeChild(imageLoader)
imageLoader=null
about_btn.addEventListener(MouseEvent.CLICK, goabout);
....still not working.

Similar Messages

  • Buttons in External SWF's

    Using Flash CS3 AS2.0
    I need to know if it is possible to make a button in an external
    swf. file loaded in a Main .fla to link to another frame or label
    in another external swf. movie. If so, how do I do it?
    I have a main flash file for my website with a portfolio
    gallery with 9 buttons.
    I have 8 external .swf files for all my galleries. (eg.
    branding.swf, packaging.swf, displays.swf, etc....)
    Within those galleries I have 9 buttons that make up each
    individual gallery.
    The buttons reveal a large thumbnail with some text that
    explain what the image is.
    In some of the galleries I have some text that want the
    viewer to be directed to another gallery to view another piece of
    artwork that relates to this one.
    These .swf files are loaded in my main flash file using the
    loader components.
    I thought I read somewhere that when you use the loader
    components, action code will not work.
    Do I need to change all my loader symbols to symbols that use
    the _movieloader actioncode?
    Here is a look at my test site to see what I am talking
    about:
    http://manganinc.pieper.com/piepert/index.htm
    In the
    Portfolio section you will find the gallery buttons and if
    you click on
    Product Packaging
    (this is the first button), a .swf movie will load and 9
    buttons slide down and when you click on the 3rd button over at the
    top Nutro MAX Cat Bags will show up,
    the text under the thumbnail will have text that reads "Also
    see the
    case study for this project."
    This case study has a invisible button on top of it and I
    want to direct that to the case studies page in my Main Flash file.
    Another link is in the 2nd button down from the top in the
    same gallery which is Autopage packaging. There is text under the
    thumbnail that reads:
    "Also see the
    brochures and the
    in-store display "
    Here I need the button to link to the at least just the
    brochures gallery and the displays gallery.
    In my MAIN .fla I have all these galleries lableled. Meaning
    in my action layer these sections are labeled to their according
    gallery name.
    Hope this makes sense. Please help me if you can!

    if you're publishing for fp 10, use unloadAndStop() after the first load.

  • Button from External SWF to Play Movie in Main SWF

    Hi Guys,
    Ok I'm working in Flash 8, Action Script 2;
    I'm building a website, in which the 'Gallery Page' has a link to an external swf file, which is a scrolling clip of thumbnails.
    What I want to do, is create each thumbnail into a button, which will then play a Movie Clip from a frame located in the Main swf file.
    (So basically, each thumbnail button is a small photo, will play that photo in a large scale as a movie)
    eg.
    thumbnail1_btn  needs to go to main swf and play movieclip1.mc, frame 1
    thumbnail2_btn nends to go to main swf and play movieclip1.mc, frame 2
    I'm unsure of the code for this? Or if I've built this up wrong?
    If someone could help me out, that would be great!

    If you haven't set _lockroot on the loaded SWF, than a simple _root call from the loaded SWF will talk to the main SWF.
    IE:
    on(release){
    _root.gotoAndPlay(1);
    If you did set the lockroot, then call the level directly, via:
    on(release){
    _level0.gotoAndPlay(1);
    Once on the root level, you can access a movie clip as normal.
    So:
    on(release){
    _level0.movieClip1.gotoAndPlay(1);
    will call the movie clip "movieClip1" which resides on the timeline of _level0 (which is main.swf in your instance), and tell it to jump to the first frame and start playing.

  • Play - Pause button for external .swf?

    I'm trying to create buttons so a viewer can pause and then play an externally loaded swf. My project can be accessed at the linke below. This is how I want the project to function
         -Click a room on the building (choose Accounting for this discussion)
         -Click one of the demo options (choose Ending a Period for this discussion)
         - Now that the demo plays, I want the user to be able to play and pause the demo swf.
    The demo .swfs were created in Captivate so I don't have access to their timeline. They are loaded into an empty Loader component using the MovieClipLoader Class. Can anyone post some possible solutions to this problem? Thanks!
    http://distribution.activant.com/demos/prophet21-on-demand/

    What would that look like? Right now they're loading using the following code:
    btnCashCollect_btn.onRelease = function () {
          mcLoader.loadClip("CashCollections.swf",myLoader);
          btnEndPeriod_btn.enabled = false;
          btnCashCollect_btn.enabled = false;
          btnFinancialMGMT_btn.enabled = false;
          _root.btnHome_mc._visible = false;
    So would I use something like:
    btnPause.onRelease = function() {
         myLoader.content.pause();
    Actually I just tried that and it didn't work...I need the buttons to work for multiple external swfs that will be loaded into myLoader

  • Enabling Parent button while external swf is loaded [AS3]

    Hello everyone,
    I am very new to Flash and it takes me a while to understand what code is trying to tell me
    The problem I am currently facing is as follows:
    After searching the net for hours I finally figured out, how to load an external swf into my main timeline. As far as I understand this main timeline is the "parent". Hence the loaded, external swf should be the "child" (a quiz).
    Now the child (a quiz) loads into the flash file and is played properly, but I cannot access the button on the parent anymore. Unfortunately, I really need the home button on the parent to exit the quiz and allow for new navigation within the flash document.
    I would greatly appreciate any help.
    Thank you all in advance.
    Kliph
    my AS3 Code:
    import flash.events.MouseEvent;
    function onClick611 (event:MouseEvent) :void
            gotoAndPlay("home_einf")
    home_btn.addEventListener (MouseEvent.CLICK, onClick611);
    import flash.net.URLRequest;
    import flash.display.Loader;
    import flash.events.Event;
    import flash.events.ProgressEvent;
    function startLoad()
        var mLoader:Loader = new Loader();
        var mRequest:URLRequest = new URLRequest("quiz.swf");
    mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
    mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);
    mLoader.load(mRequest);
    function onCompleteHandler(loadEvent:Event)
    addChild(loadEvent.currentTarget.content);
        function onProgressHandler(mProgress:ProgressEvent)
        var percent:Number = mProgress.bytesLoaded/mProgress.bytesTotal;
    trace(percent);
    startLoad();
    stop();

    By simply using addChild like you have, you're placing the loaded content above everything on the display list - covering your button. There are a few ways to solve. The easiest, if it works for you, is to just make a new layer in your timeline - make it the top most layer, and place your home button in that layer.
    Then change your addChild line from:
    addChild(loadEvent.currentTarget.content);
    to:
    addChildAt(loadEvent.currentTarget.content, numChildren - 2);
    This will place the loaded content behind the button.
    Alternatively, you can set the button to export for AS and then add it after you add the loaded file. Or you can use content containers - empty sprites that you add first, and then fill with other objects, in order to control layering.

  • Problem with volume handle and external SWF

    Hello I'm having 2 problems.
    The first is that when loading an external swf in my main SWF I get this in the output window:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at audio_fla::list_1/frame1()
    at flash.display::Sprite/constructChildren()
    at flash.display::Sprite()
    at flash.display::MovieClip()
    at audio_fla::MainTimeline()
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at audio_fla::MainTimeline/frame1()
    But it still works. Its an mp3 player.
    The other problem is that the loaded SWF has a volume controller. When I test the external SWF by itself it works fine. When I load it on my main SWF when I start to drag the handle on my volume slider and MOUSE_UP outside the handle it still keep dragging the handle.
    The code of my main SWF is:
    import caurina.transitions.*;
    var _currentCategory:String = "";
    var percent:String = "";
    var loader = new Loader();
    loader.name="videoLoader";
    loadermc.visible=false;
    cat.addEventListener(MouseEvent.MOUSE_OVER, onOverCat);
    cat.addEventListener(MouseEvent.MOUSE_OUT, onOutCat);
    cat.addEventListener(MouseEvent.CLICK, onClickCat);
    btnback.addEventListener(MouseEvent.MOUSE_OVER, onOverCat);
    btnback.addEventListener(MouseEvent.MOUSE_OUT, onOutCat);
    btnback.addEventListener(MouseEvent.CLICK, onClickBack);
    cat.buttonMode = true;
    btnback.buttonMode = false;
    btnback.visible = false;
    function onOverCat(e:MouseEvent):void{
         Tweener.addTween(e.target, {alpha:.5 , time:.5});
    function onOutCat(e:MouseEvent):void{
         Tweener.addTween(e.target, {alpha:.25 , time:.5});
    function onClickBack(e:MouseEvent):void{
         loader.unloadAndStop();
         loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
         lcontent.visible = false;
         cat.visible = true;
         Tweener.addTween(cat, {alpha:1, time:1});
         btnback.buttonMode = false;
         btnback.visible = false;
         cat.buttonMode = true;
         toptxt.text = "SELECCIONE UNA CATEGORIA"
    function onClickCat(e:MouseEvent):void{
         lcontent.visible=true;
         cat.buttonMode = false;
         Tweener.addTween(cat, {alpha:0, time:1, onComplete:function(){
                                  cat.visible = false;                                                       
                                  btnback.buttonMode = true;
                                  btnback.visible = true;
                                       loaderTweenIn(e.target.name);
    function loaderTweenIn (c:String):void{
         var category:String = c+".swf";
         trace(category);
         loader.load(new URLRequest(category));
         loader.contentLoaderInfo.addEventListener (Event.COMPLETE, movieLoaded);
            loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, movieProgress);
    function ioErrorHandler(e:IOErrorEvent):void{
         trace("ioErrorHanlder: "+e);
    function movieLoaded(e:Event):void{
         trace("The movie has loaded");
         lcontent.addChild(loader);
         loadermc.visible=false;
    function movieProgress(e:ProgressEvent):void{
         loadermc.visible = true;
    //     percent=String(Math.floor(e.bytesLoaded / e.bytesTotal * 100)) + "%";
         trace("The movie is loading "+Math.floor(e.bytesLoaded / e.bytesTotal * 100));
    The code on my external SWF is:
    import caurina.transitions.*;
    volume_mc.slider_mc.buttonMode = true;
    var myXML:XML;
    var thb:Thbs;
    var myThumbs:XMLList;
    var totalThumbs:Number;
    var thumbHeight:Number=50;
    var i:uint = 0;
    var preloader:LoaderAnim;
    var yCounter:Number = 0;
    var container:MovieClip;
    var musicReq:URLRequest;
    var music:Sound = new Sound();
    var sc:SoundChannel;
    var currentSound:Sound = music;
    var pos:Number;
    var songPlaying:Boolean = false;
    var songlist:XMLList;
    var currentIndex:Number = 0;
    mc_sound.mute.visible=false;
    var xmlLoader:URLLoader = new URLLoader();
    ///////////////////////////PLAYLIST//////////////////
    function initMediaPlayer(e:Event):void{
         myXML = new XML(xmlLoader.data);     
         myThumbs = myXML.*;
         totalThumbs = myThumbs.length();
         trace("The total thumbs are "+totalThumbs);
         createContainer();
         callThumbs();
    xmlLoader.load(new URLRequest("audio.xml"));
    function createContainer():void{
         container = new MovieClip();
         list.ch.addChild(container);
         container.y = 0;
         container.x = 0;
         container.buttonMode = true;
    function onOver(e:MouseEvent):void{
         var t:Loader = Loader(e.target);
         Tweener.addTween(t, {alpha:.5, time:1});
    function onOut(e:MouseEvent):void{     
         var t:Loader = Loader(e.target);
         Tweener.addTween(t, {alpha:1, time:1});
    function callThumbs():void{
              var thumbURL = myThumbs[i].@thumb;
              var thumbTitle:String = myThumbs[i].@title;
              var thumbDesc:String = myThumbs[i];
              trace("Loading "+thumbURL);
              trace("Title "+thumbTitle);
              trace("Desc "+thumbDesc);
              var thumbLoader = new Loader();
              thumbLoader.load(new URLRequest(thumbURL));
              thumbLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, thumbLoaded);
              thumbLoader.name=i;
              thumbLoader.x=5;
              thumbLoader.y=5;
              thb = new Thbs();
              container.addChild(thb);
              thb.thb_title.htmlText = thumbTitle;
              thb.thb_desc.autoSize = TextFieldAutoSize.LEFT;
              thb.thb_desc.htmlText = thumbDesc;
              thb.y = (thumbHeight+2)*yCounter;
              preloader = new LoaderAnim();
              preloader.x = thb.x + 20;
              preloader.y = thb.y+ 20;
              container.addChild(preloader);
              yCounter++;
    function thumbLoaded(e:Event):void{
         var thbx:Loader = Loader(e.target.loader);
         thb.addChild(thbx);
         thbx.addEventListener(MouseEvent.MOUSE_OVER, onOver);
         thbx.addEventListener(MouseEvent.MOUSE_OUT, onOut);
         container.removeChild(preloader);
         i++;
         if (i<totalThumbs){
              callThumbs();
         if (i==totalThumbs){
              startAudio();
    xmlLoader.addEventListener(Event.COMPLETE, initMediaPlayer);
    ///////////////////////////////////////AUDIO//////////////////////////
    function startAudio():void{
         songlist = myXML.*;;//this is the same as myXML.*;
         trace("This is the first song "+songlist[0].@song);
         musicReq = new URLRequest(songlist[0].@song);
         music.load(musicReq);
         sc = music.play();
         sc.addEventListener(Event.SOUND_COMPLETE, nextSong);     
    next_btn.addEventListener(MouseEvent.CLICK, nextSong);
    prev_btn.addEventListener(MouseEvent.CLICK, prevSong);
    pause_btn.addEventListener(MouseEvent.CLICK,pauseSong);
    stop_btn.addEventListener(MouseEvent.CLICK,stopSong);
    function nextSong(e:Event):void
         if (currentIndex < (songlist.length() - 1))
              currentIndex++;
         else
              currentIndex = 0;
         var nextReq:URLRequest = new URLRequest(songlist[currentIndex].@song);
         var nextTitle:Sound = new Sound(nextReq);
         sc.stop();
         sc = nextTitle.play();
         songPlaying = true;
         currentSound = nextTitle;
         sc.addEventListener(Event.SOUND_COMPLETE, nextSong);
    function prevSong(e:Event):void
         if (currentIndex > 0)
              currentIndex--;
         else
              currentIndex = songlist.length() - 1;
         var nextReq:URLRequest = new URLRequest(songlist[currentIndex].@song);
         var prevTitle:Sound = new Sound(nextReq);
         sc.stop();
         sc = prevTitle.play();
         songPlaying = true;
         currentSound = prevTitle;
         sc.addEventListener(Event.SOUND_COMPLETE, nextSong);
    function pauseSong(e:Event):void
         pos = sc.position;
         sc.stop();
         songPlaying = false;
         play_btn.addEventListener(MouseEvent.CLICK,playSong);
    function playSong(e:Event):void
         if(songPlaying == false)
              sc = currentSound.play(pos);
              sc.addEventListener(Event.SOUND_COMPLETE, nextSong);
              songPlaying = true;
              play_btn.removeEventListener(MouseEvent.CLICK,playSong);
    function stopSong(e:Event):void
         sc.stop();
         pos = 0;
         songPlaying = false;
         play_btn.addEventListener(MouseEvent.CLICK,playSong);
    ///////////////////////////////VOLUME/////////////////////////////
    var xOffset:Number;
    var xMin:Number = 0;
    var xMax:Number = volume_mc.track.width;
    volume_mc.slider_mc.addEventListener(MouseEvent.MOUSE_DOWN, sliderDown);
    volume_mc.slider_mc.addEventListener(MouseEvent.MOUSE_UP, sliderUp);
    stage.addEventListener(MouseEvent.MOUSE_UP, sliderUp);
    function sliderDown(e:MouseEvent):void{
         stage.addEventListener(MouseEvent.MOUSE_MOVE, sliderMove);
         xOffset = mouseX - volume_mc.slider_mc.x;
    function sliderUp(e:MouseEvent):void{
         stage.removeEventListener(MouseEvent.MOUSE_MOVE, sliderMove);
    function sliderMove(e:MouseEvent):void{
         volume_mc.slider_mc.x = mouseX - xOffset;
         if(volume_mc.slider_mc.x<=xMin){
              volume_mc.slider_mc.x = xMin;
         if(volume_mc.slider_mc.x>=xMax){
              volume_mc.slider_mc.x = xMax;
         var vol:Number = volume_mc.slider_mc.x*.01;
         var st:SoundTransform = new SoundTransform(vol,0);
         sc.soundTransform = st;
         trace("The volume is "+vol);
         if(vol==0){
              mc_sound.mute.visible=true;
         }else{
              mc_sound.mute.visible=false;
         e.updateAfterEvent();

    I found the solution.

  • MouseEvent and external SWF

    I'm loading an external SWF to use as a "skin" (no components
    are involved, only MovieClips). The external SWF contains a number
    of MovieClips, each exported for Actionscript and with an
    associated class. One of these classes is, for example, called
    "Thing1".
    I'm successfully loading the SWF using Loader, etc. - I'm
    also setting its ApplicationDomain to that same one as the loading
    SWF. I can then successfully create an instance of Thing1 and add
    it to a child MovieClip of the loading SWF. All is good.. the
    problem occurs when I try to add an event listener to the instance
    of Thing1 - the event doesn't trigger.
    Here are some curious facts: IF Thing1 consists only of
    graphics, ie. no child MovieClips, then the event DOES trigger.
    Also, if I add an event listener, not to a child of Thing1, but to
    a child of a child of Thing1, then it works. BUT, a mouse event
    added to the stage of that MovieClip doesn't trigger.
    There seems to be some problem with mouse events bubbling
    across the "boundary" between Thing1 and the loading SWF.
    Anyone??

    Ha.. in the process of preparing simplified code, I figured
    out the problem. I'm developing locally, and I was loading the
    external SWF via localhost, eg.
    http://localhost/skin.swf. If
    I instead load skin.swf, the problem disappears (I was using
    localhost because I'm also loading data via PHP scripts). Thank you
    kglad, for indirectly helping me find the solution ;)

  • Both main movie and external swf preloader - confusion!

    Hi there!
    I have a webite with my main movie (88kb) and an external swf
    soundloop (1mb). I made a preloader, but it only loaded the main
    movie, meaning that after the intro, the soundloop would not start.
    I loaded the soundloop onto level 1, and then tried to make a
    preloader with this code (I thoguht it worked but it really was a
    total guess).
    stop();
    this.onEnterFrame = function() {
    bl = _level1.getBytesLoaded()+this.getBytesLoaded();
    bt = _level1.getBytesTotal()+this.getBytesTotal();
    if (bt<=0) {
    bt = 99;
    bar.gotoAndStop(Math.floor((bl/bt)*100));
    if ((bl == bt) && (bt>0)) {
    delete this.onEnterFrame;
    gotoAndPlay("Intro", 1);
    Now when I test the movie, everything loads, but when the
    soundloop is loaded after the intro, the preloader movie clip
    appears and starts playing and repeating itself!
    How on earth do I get rid of this?! You can see the problem
    here:-
    http://www.vanitee.co.uk/princess.swf
    Thanks in advance

    Please! Still in great need of help. Have tried all sorts
    =(

  • Flv and external swf files

    Hi,
    Does somebody knows what is happening?
    I'm using the mcLoader class to load all my external swf
    files, everything worket perfectly until I decided to use
    flvPlayBack on one of those external files. If the player is on my
    main stage it works great and if I run directly the loaded swf it
    also works, but now when i run the external swf through the
    mcLoader the player doesn't appears.
    my mcLoader code:
    var mcLoader01:MovieClipLoader = new MovieClipLoader();
    mcLoader01.loadClip("clientes/targetTrade.swf",mcConatiner);
    The flvPlayer should be on the second frame of this
    targetTrade.swf ("click to watch the video")
    thanks,
    Peter

    Hi,
    You said swfs are Flash 8. Did you also set them to
    Actionscript 2? If it's
    Actionscript 3, that may be the problem. You may be
    interested in looking at the
    Flash Video templates I have at:
    http://www.deansdirectortutorials.com/FlashVideo/
    regards
    Dean
    Director Next Roadmap Survey
    http://www.deansdirectortutorials.com/survey/DirectorRoadmap/
    Director Lecturer / Consultant / Director Enthusiast
    http://www.deansdirectortutorials.com/
    http://www.multimediacreative.com.au
    email: [email protected]

  • Public var and External swf

    Hello!
    I have some problem with vars. The situation is the same I wrote here Re: External swf
    I have public var (for example ZZZ) in code of MAIN.swf (main class is Main.as), and I want to access it from code of loaded EXTERNAL.swf.
    But nothing helps, flash says:
    there is no ZZZ in code of Main
    there is no ZZZ on stage.root
    there is no ZZZ in any parents.
    But if a have ZZZ in code of EXTERNAL, and want to access it from MAIN,  (the reverse situation), ZZZ is easily found.

    Worked that:
    I should pass to EXTERNAL
    this
    as exact pass, and then
    ExactPass.ZZZ
    would be found
    in External:
    public var GAME_MAIN_CODE:*;
    in Main:
    EXTERNAL.GAME_MAIN_CODE = this;
    Thank you for help!

  • Hyperlinks and External SWF Files

    I am building a site for the company I work for and within
    the main flash CS3 document for the site I have a portfolio gallery
    with 8 sections. I created a flash file for each category and made
    a swf file where I loaded them in my main flash document. They each
    have their own layer and on their layer I placed a loader component
    for each movie so the gallery will show up when I click on that
    specific button.
    My problem is that in some of the galleries I want to direct
    my viewers to another place within another swf file.
    Example: If I have a picture displaying a piece of artwork
    and I have another piece of artwork that relates to it and I want
    to see that also.
    How do I create that link to go to another place in another
    movie (swf file). Is this even possible? Help me please.
    I am using actionscript 2.0 I have attached a temporary site
    address for a better idea of what I need help with. Go to the
    portfolio section.
    http://manganinc.pieper.com/piepert/index.htm
    null">null

    problem solved. Solution? Redo the entire f&%#ing thing. For what ever reason, it now works.
    Thanks anyways.
    James

  • Place button rollover image on top of external swf

    I have a menu that when you click on a button, an external swf is  called up. However I would like for the buttons in the Over and Down  state to show an image on top of the external swf with a description of  what the video is about (Basically when they rollover the button).
    The problem is that the image shows behind the external swf. I  cannot get it to appear on top of the external swf. I have tried putting  the buttons layer on top of the actions layer but that doesn't work.
    I have not been using Flash for very long but I need to know if  there is ActionScipt that can solve my problem or any other way to solve  this issue. Please help. Thank you.

    This is what appeared now in my Output panel.
    Core_K12_Menu CS5.swf Movie Report
    Metadata
    Bytes         Value
           387    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/"> <xmp:CreatorTool>Adobe Flash Professional CS5</xmp:CreatorTool> <xmp:CreateDate>2010-07-25T19:31:59-07:00</xmp:CreateDate> <xmp:MetadataDate>2010-08-01T18:42:52-07:00</xmp:MetadataDate> <xmp:ModifyDate>2010-08-01T18:42:52-07:00</xmp:ModifyDate> </rdf:Description> <rdf:Description rdf:about="" xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" xmlns:stRef="http://ns.adobe.com/xap/1.0/sType/ResourceRef#"> <xmpMM:InstanceID>xmp.iid:2136C7DCCB9DDF11B1ACFFBB5C2D711F</xmpMM:InstanceID> <xmpMM:DocumentID>xmp.did:2136C7DCCB9DDF11B1ACFFBB5C2D711F</xmpMM:DocumentID> <xmpMM:OriginalDocumentID>xmp.did:423EF45B6198DF1180E5FB9309482BDA</xmpMM:OriginalDocumentID> <xmpMM:DerivedFrom rdf:parseType="Resource"> <stRef:instanceID>xmp.iid:992BC7CBB29DDF11B1ACFFBB5C2D711F</stRef:instanceID> <stRef:documentID>xmp.did:F34D8816A19DDF11ADEA81F4369F4B15</stRef:documentID> <stRef:originalDocumentID>xmp.did:423EF45B6198DF1180E5FB9309482BDA</stRef:originalDocumentID> </xmpMM:DerivedFrom> </rdf:Description> <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"> <dc:format>application/x-shockwave-flash</dc:format> </rdf:Description> </rdf:RDF>
    Frame #    Frame Bytes    Total Bytes    Scene
          1         295119         295119    Scene 1 (AS 3.0 Classes Export Frame)
    Scene      Shape Bytes    Text Bytes    ActionScript Bytes
    Scene 1              0             0                  1133
    Symbol                Shape Bytes    Text Bytes    ActionScript Bytes
    ActiveMC                       40             0                     0
    IntroModule                     0             0                     0
    Module 1 Rollover               0             0                     0
    Module1                         0             0                     0
    Module2                         0             0                     0
    Module3                         0             0                     0
    Module4                         0             0                     0
    Module5                         0             0                     0
    Module6                         0             0                     0
    Module7                         0             0                     0
    Module8                         0             0                     0
    Module9                         0             0                     0
    Module10                        0             0                     0
    Module11                        0             0                     0
    Module12                        0             0                     0
    Module13                        0             0                     0
    Module14                        0             0                     0
    Module15                        0             0                     0
    Module16                        0             0                     0
    Module17                        0             0                     0
    Module19                        0             0                     0
    Module20                        0             0                     0
    Module21                        0             0                     0
    next_btn                        0             0                     0
    replay_btn                      0             0                     0
    Rollover                        0             0                     0
    Rollover Image.psd              0             0                     0
    Symbol 18                       0             0                     0
    Title.psd                       0             0                     0
    ActionScript Bytes    Location
                  1133    Scene 1:Frame 1
    Bitmap                                                             Compressed    Original      Compression
    Layer 1                                                                  3675         88264    JPEG Quality=80
    Layer 1                                                                  3287         63936    JPEG Quality=80
    Layer 1                                                                  1205         19668    JPEG Quality=80
    Introduction-Up.jpg                                                      6357         23200    Imported JPEG=102
    Introduction-Down.jpg                                                    5862         23200    Imported JPEG=102
    Module 1-Up.jpg                                                          5957         23200    Imported JPEG=102
    Module 1-Down.jpg                                                        5548         23200    Imported JPEG=102
    Login Page and Tech Check  Topics Covered   - Introduction to A          4791        288576    JPEG Quality=80
    Module 2-Up.jpg                                                          6030         23200    Imported JPEG=102
    Module 2-Down.jpg                                                        5607         23200    Imported JPEG=102
    Module 3-Up.jpg                                                          6035         23200    Imported JPEG=102
    Module 3-Down.jpg                                                        5556         23200    Imported JPEG=102
    Module 4-Up.jpg                                                          5997         23200    Imported JPEG=102
    Module 4-Down.jpg                                                        5584         23200    Imported JPEG=102
    Module 5-Up.jpg                                                          6031         23200    Imported JPEG=102
    Module 5-Down.jpg                                                        5607         23200    Imported JPEG=102
    Module 6-Up.jpg                                                          6030         23200    Imported JPEG=102
    Module 6-Down.jpg                                                        5610         23200    Imported JPEG=102
    Module 7-Up.jpg                                                          5986         23200    Imported JPEG=102
    Module 7-Down.jpg                                                        5575         23200    Imported JPEG=102
    Module 8-Up.jpg                                                          6035         23200    Imported JPEG=102
    Module 8-Down.jpg                                                        5615         23200    Imported JPEG=102
    Module 9-Up.jpg                                                          6031         23200    Imported JPEG=102
    Module 9-Down.jpg                                                        5611         23200    Imported JPEG=102
    Module 10-Up.jpg                                                         6192         23200    Imported JPEG=102
    Module 10-Down.jpg                                                       5707         23200    Imported JPEG=102
    Module 11-Up.jpg                                                         6119         23200    Imported JPEG=102
    Module 11-Down.jpg                                                       5662         23200    Imported JPEG=102
    Module 12-Up.jpg                                                         6189         23200    Imported JPEG=102
    Module 12-Down.jpg                                                       5709         23200    Imported JPEG=102
    Module 13-Up.jpg                                                         6194         23200    Imported JPEG=102
    Module 13-Down.jpg                                                       5710         23200    Imported JPEG=102
    Module 14-Up.jpg                                                         6193         23200    Imported JPEG=102
    Module 14-Down.jpg                                                       5705         23200    Imported JPEG=102
    Module 15-Up.jpg                                                         6197         23200    Imported JPEG=102
    Module 15-Down.jpg                                                       5713         23200    Imported JPEG=102
    Module 16-Up.jpg                                                         6202         23200    Imported JPEG=102
    Module 16-Down.jpg                                                       5716         23200    Imported JPEG=102
    Module 17-Up.jpg                                                         6155         23200    Imported JPEG=102
    Module 17-Down.jpg                                                       5684         23200    Imported JPEG=102
    Module 18-Up.jpg                                                         6204         23200    Imported JPEG=102
    Module 18-Down.jpg                                                       5719         23200    Imported JPEG=102
    Module 19-Up.jpg                                                         6198         23200    Imported JPEG=102
    Module 19-Down.jpg                                                       5713         23200    Imported JPEG=102
    Module 20-Up.jpg                                                         6205         23200    Imported JPEG=102
    Module 20-Down.jpg                                                       5723         23200    Imported JPEG=102
    Module 21-Up.jpg                                                         6150         23200    Imported JPEG=102
    Module 21-Down.jpg                                                       5685         23200    Imported JPEG=102
    Replay Button.jpg                                                        5365         18240    Imported JPEG=102
    Replay Button Down.jpg                                                   4803         18240    Imported JPEG=102
    Next Button.jpg                                                          4965         18240    Imported JPEG=102
    Next Button Down.jpg                                                     4684         18240    Imported JPEG=102

  • How to load and unload external .swfs in a main .fla then load another external .swf on top

    I know that the question sounds confusing. I am new to AS3 but a little dangerous with it.
    The project
    I'm putting together a website tour with has a main .fla with navigation buttons. The navigation buttons load external .swfs using X and Y properties. Every external .swf houses a scrubber bar, play pause buttons which calls to a movie clip which houses the animation.
    The problem:
    Everything was working great, until someone mentioned "Hey, what if at the end of each loaded external .swf, a button appears that says "go to next section".
    So basically we are trying to give the user another way to get to the next section in the left hand navigation once the animation ends, in addition to being able to click in the left hand navigation for the next section. It's kind of like when a youTube video ends and it displays a button to go to the next movie that's in line, but you can also do it in the thumnail navigation as well.
    Ok, let's try it. Well, after many nights, searching the web and trying everything I am waving the white flag. I went through the lynda.com book over and over but I get an error message when I add code related to the parent timeline. I can actually get the next section to load on top of the previously loaded .swf, but it's buggy and I think the previous section is showing through underneath. Plus the scrubber isn't really working right. Since every .swf has a scrubber to control it, shouldn't it just load on top of the previous .swf? Do I need to add coding related to the parent timeline?
    I don't know if I should paste my code here, I have a sample .fla too. Help is so greatly appreciated!!!! If this can work, I think it would be very useful for anyone else doing something like this - I would definitely share any knowledge gained!
    Thanks.
    Jen

    If you want to utilize that code as a starting point (hopefully you understand what it does, and that the code actually works), then you need to modify it such that the array at the start has your filenames instead of the three it now shows, and the three buttons it uses are changed to the next and previous buttons you intend to use.  Here are the functions you need to make adjustments to...
    function onCompletePreloading():void {
            _loadedSWFs = 0;
            contentContainer.addChild(_swfClipsArr[_loadedSWFs]);
            next_btn.addEventListener(MouseEvent.CLICK, setContent);
            prev_btn.addEventListener(MouseEvent.CLICK, setContent);
    function setContent(event:MouseEvent):void {
            var _swfToAdd:MovieClip;
            if(event.currentTarget.name == "next_btn") {
                _loadedSWFs += 1;
                if(_loadedSWFs == _swfClipsArr.length){
                       _loadedSWFs = 0;
            } else if(event.currentTarget.name == "prev_btn"){
                _loadedSWFs -= 1;
                if(_loadedSWFs == -1){
                       _loadedSWFs = _swfClipsArr.length-1;
            _swfToAdd = _swfClipsArr[_loadedSWFs];
            contentContainer.removeChildAt(contentContainer.numChildren-1);
            contentContainer.addChild(_swfToAdd);
            trace(_swfToAdd.customID);

  • The loaded external.swf don't appears on two client connected in VideoCommunication...

    Hi, everybody...
    I have to realize a videocommunication, whit Apache web server and FMS 3. This's ok...
    I have a button that load an external .swf but, when the 2 client are into communication, when I push the button, the external .swf starts only on the local client and not on the other client.
    Can someone help me?
    Thanks.
    Emiliano.

    Hi Csound1, thanks. The email host is 1and1.co.uk, however, i am going to fess up and make myself look like a plonker now -
    the email account in question was set up in Outlook as POP - stupid, stupid, stupid me, wasted an afternoon on this!  I have now changed the Outlook account to IMAP and Mail.app works perfectly - and looks much nicer than Outlook did.  Im in the middle of converting from Windows to a Mac, and still finding my way around the Mac
    The lesson learned, never assume - always double  check!  All my other email addresses with 1and1 are all imap, except this one, and it happened to be the first one I set up in the Mail.app. (bows head in disgrace!)
    Thank you anyway for attempting to help me!
    Cheers

  • UNLOADING EXTERNAL SWF. SOMEONE HELP!

    I have a menu in my site and i recently added a comment form that is loaded when you click one of the buttons of the menu.
    My problem is that when I click on a different menu button the external swf [comment form] its still there I've tried adding the unloadMovie
    option but its not working. Here is the code for both buttons.
    ---------------------HOME BTN:
    on (rollOver) {
    gotoAndPlay(2);
    on (rollOut) {
    gotoAndPlay(6);
    on (release) {
    if (_root.choose != "home" && _root._currentframe!=30) {
    _root.play();
    _root.choose = "home";
    //mysound = new Sound();
    //mysound.attachSound("soundClick");
    //mysound.start();
    --------------------COMMENT FORM BTN:
    on (rollOver) {
    gotoAndPlay(2);
    on (rollOut) {
    gotoAndPlay(6);
    on (release) {
    if (_root.choose != "contact") {
    _root.play();
    _root.choose = "contact";

    unloadMovie() will work if there's a movie clip to be referenced. If you have assigned a name to the loaded movie you can unload it with unloadMovie(). Another option is to call unloadMovie() from the clip itself like: my_loaded_mc.unloadMovie(this); In every case check for incorrect paths (if you load a movie and refer to _root - the root will be the root of the loader, not the movie itself)
    Emil Georgiev - Flash and Web Design

Maybe you are looking for

  • Editing DVDs?

    is it possible to edit the files from the VIDEO_TS folder in the dvd that is not copy protected?

  • A big THANK YOU to B. NOIR! because...

    I just experienced my first "iTunes has encountered an error and needs to close" warning!, when I booted up my machine this morning and tried to launch iTunes. I tried and tried to coax iTunes to open but I wasn't successful! Next, I decided to back

  • Message screen open by default

    Dear Experts! I have a question about the Message screen. On the right side you are able to see messages(errors, warnings) on a little screen.. My problem is, that if you want to see the message you have to open this little screen. Is there a possibi

  • Insert pdf file into another pdf file keeps getting stuck

    I am trying to insert a 5 page pdf file into another pdf file (both unsecured) and it keeps getting stuck at about 71%* conplete. I can't even get the file to show up on the screen so i can close it. Help?

  • Where can I buy Photoshop?

    I own a PowerBook G4 and I have used Photoshop for a while on my Windows laptop but I am not using that anymore(slow,very slow). So I want to buy Photoshop for my PowerPC but I have no idea where to buy it or what it will cost. Basically, Where can I