External swf keeps looping.

Posted on 2009-02-08
Last Modified: 2012-05-06
I have main flash file which loads and external swf file.

The external swf has a preloader.

When I run the external file, it runs the preloader, then shows the content, so this works fine.

however when I load it via the main movie, the preloader constantly loops and never show the content.

here is the code I use to load the external swf.

Open in new window

Question by:Cheryl Lander
    LVL 9

    Accepted Solution

    How does the preloader determine when it's loaded? If it's something to do with _root then that'll probably be your problem...

    If it's not immediately obvious then post your preloader code here so we can have a look through it.

    Author Comment

    by:Cheryl Lander
    I have this code on line 1 of the main movie
    This is the only code I have on the timeline fo the main movie.

    I have a preloader on the external file.

    The external file plays fine.

    Author Closing Comment

    by:Cheryl Lander
    just worked it out.

    Changed _root to _parent

    LVL 9

    Expert Comment

    Yep, but the preloader will be the bit causing the problem - it will probably be doing some check for the loaded file, using the root or parent or something, and it'll fail cos the reference will be different when it's loaded in.

    Can you post the code behind the preloading, and then we'll help you to work this out...
    LVL 9

    Expert Comment

    Excellent, glad it worked out!

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
    There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
    The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
    This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now