Load SWF Question

In an effort to explain my question as best I can, I will
name the three swf files A, B, and C.
So I have swf A which has an opening call to load swf B into
an empty container inside swf A. This works just fine using:
loadFile("B.swf");
Now, once swf B loads into the container which contains an
"enter site" button, I cant figure out how to load swf C into swf
A's container to replace swf B. Does that make sense? I have
uploaded my struggle so far for you to see...
http://vojodesign.com/proofs/bohemianInd
Thanks in advance

Hmmm, I'm not quite sure what you mean. Here is what I have
currently inside swf A's timeline. Where do I plug in the code you
suggested?
btnEnter.onRollOver = over;
btnEnter.onRollOut = out;
btnEnter.onRelease = function() {
if(current != "bohemianIndHome.swf")
loadFile("bohemianIndHome.swf");
function over():Void {
this.over = true;
this.play();
function out():Void {
this.over = false;
this.play();
}

Similar Messages

  • Loading a SWF inside another SWF question

    Hello friends,
    1. (IMPORTANT) As all we know when putting some Flash SWF
    inside an HTML page, normally it starts playing as soon as its
    first frame is loaded.
    Now in my case I have to load a SWF (let call it Flash A)
    inside another Flash, I used mx.controls.Loader control to do this.
    But this internal loaded SWF (Flash A) doesn't display untill it is
    completely loaded. Although what is interesting is that if it
    contains a sound track I can hear it while it is being loaded.
    I wana know is there any way that we can make this Flash
    display while being still loaded.
    2. Is there anyway to change a Flash playback FPS at runtime?
    Thank you so much for any note and help.
    - M

    damatrixhasu wrote:
    > i want to know how i can load a flash inside another
    flash container
    go to help - search for 'loadmovie'
    Best Regards
    Urami
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • 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.

  • Load SWF file in main SWF with parameters

    Hello everybody,
    I recently got a new flash Application which is a Photo Gallery.
    This App is made of multiple folders (source files), a FLA file, a SWF with its javascript SWFObject and an Html page which instantiate this App with some parameters (size, config file path, ...).
    It needs an XML file to find all the Photos it displays, to do it I need to configure my application in the HTML Page and give it the "xml_path" :
    var so = new SWFObject("index.swf", "gallery", "249", "249", "10", "#111111");
    so.addVariable("xml_path","load/config.xml"); // this line is adding the path to the xml file make sure that it's name is xml_path
    so.addParam("allowfullscreen","true"); 
    so.write("flashcontent");
    By the way, I have a second application, the WebSite, which have to display the Gallery SWF in its "Gallery" page.
    Here is how I do it at the moment (in ActionScript3) :
    var swfRequest:URLRequest = new URLRequest("C:/......../Galerie/index.swf");
    var swfLoader:Loader = new Loader();
    //Charge le SWF Galerie dans le SWF Site
    swfLoader.load(swfRequest, context);
    container1.addChild(swfLoader);
    //Positionne le SWF
    swfLoader.x=10;
    swfLoader.y=120;
    It successfully loads the Gallery application but It shows an error telling me it doesn't find the XML configuration file... In the HTML file I simply had to write the "so.addVariable("xml_path","load/config.xml");" to tell where the XML file is...
    So, my question is : How can I integrate my SWF application giving it some parameters like above, in Action Script 3?
    Thank you ,
    Patrick

    No, nothing with HTML.
    I have 2 SWF applications. One is the Gallery, and the second is my Main Page.
    My Main Page must integrate the Gallery module in one of its page.
    The problem is when I try to integrate it, I think I must give de future loaded SWF some parameters like this :
    (My Main SWF loading in HTML)
    var so = new SWFObject("WebSite.swf", "flashcontent", "520", "700", "10", "#111111");
    so.addParam("allowfullscreen","true");
    so.addParam("allowScriptAccess","always");
    so.addParam("menu","false");
    so.addParam("wmode","opaque");
    so.addParam("bgcolor","#000000");
    so.setAttribute("id","flash");
    so.write("flashcontent");
    It was for the Main App. For my Gallery SWF I had to load it like this (in HTML) :
    var so = new SWFObject("Gallerie.swf", "gallery", "249", "249", "10", "#111111");
    so.addVariable("xml_path","Galerie/config.xml"); // this line is adding the path to the xml file make sure that it's name is xml_path
    so.addParam("allowfullscreen","true"); 
    so.write("flashcontent");
    So at the beginning I had 2 different projects with an HTML page for each.
    Now I wan't to directly integrate the Gallery SWF into the Main SWF. And as you have seen I must give it some parameters such as the "xml_path" and "allowfullscreen". This must be done in ActionScript 3 and I don't know how...
    I think I have to use FlashVars but I don't know how. As I said before, I have tried using the loaderinfo.parameters, but it is in read-only...
    Do you have an idea of how I can make it work ?

  • Map and externally loaded swf working together

    Here's the setup:
    I have a panoramic viewer, and i'd like to have a map go
    along side it. The panoramas are loaded externally into the player.
    Inside these external swf files are "hotspots" that link to other
    panoramic swf files that load and take the previous swf's place. I
    have all of this set up, and you can see how I did it in my
    previous post:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=288&threadid =1274410&enterthread=y
    So now my new question is... how can I have a map with points
    on it, that when you click on a point, it will load a corresponding
    swf file into the player. I believe that part is easy. My big
    problem is if someone clicks on a hotspot in the external swf file
    first, which in turn loads another swf file, and if that person
    goes back to the map, I want the map to change the position of lets
    say, a marker or a pin to indicate the new position on the map that
    correllates to the new external swf that was loaded.
    make sense? Any ideas? I was thinking maybe it would be some
    kind of listener or something so that should a specific swf load,
    it will recognize it and automatically change the location of the
    marker on the map to the point that relates to the loaded swf or
    something...

    Hi Thanks for your reply, I tried with a small AS3 file as
    well and I get the same ERROR.

  • Load SWF into empty movieClip?

    Hello,
    Could anyone please point me in the right direction to find
    out how to load an external SWF into an already existing movieClip
    instance that is already placed on the stage? This is the way I've
    always worked in AS2, but I can't find how to do it in AS3. Can
    anyone point me to an example where URLRequest works with a
    specified movieClip instance?
    Thank you!

    I understand why you might think I was ignoring your advice,
    but this isn't the case. You're expertise is much valued and
    respected.
    My purpose for continuing to experiment with loading into a
    movieClip was an attempt to find an easy way to layer the SWF
    behind other elements, but as you know, although it works for this
    purpose, it doesn't allow control of the loaded SWF from the main
    timeline. For others struggling to learn as I am, here's a link
    where I found the answer to my question above:
    http://www.hostingforum.ca/776586-as3-controlling-loaded-swf.html
    The transition to AS3 is not as easy for some as for others,
    and there are new concepts to understand.
    Don't know what "nvm" means... curious, but might be better
    off not knowing ;) Thanks again for all the help you offer to all
    of us who are struggling.

  • TypeError: Error #1009 (loaded SWF)

    I'm pulling out my hair on this one!
    I'm just starting a site (full-Flash site) using CS3 and AS3.
    I'm pretty much accustom to the new AS3 changes. I built a rough
    structure to make sure the way I wanted to set the site up would
    work (loading in external SWFs, etc.). The tests worked.
    Now, I'm going in to make some things real, and I'm getting
    this error as soon as an external SWF loads in:
    TypeError: Error #1009: Cannot access a property or method of
    a null object reference.
    at test_fla::MainTimeline/test_fla::frame2()
    I've tried narrowing it down, couldn't find the exact culprit
    (had to remove every ounce of ActionScript before it started to
    function again). So I started to rebuild that movie entirely --
    cleared out the Library and deleted every layer. Didn't work.
    Couldn't even add a stop(); action in Frame 1.
    Then I started completely fresh File > New, rebuilt again.
    I tested after every single change. I finally built it up to the
    point where I first tested the original, and it worked. So, then I
    added a couple more things tested again, and got the error again.
    Ahh, so I removed EXACTLY what I had just added. Tested again. SAME
    ERROR -- now it won't go away no matter what I remove!
    Crazier yet is that I can still load in my other test SWF
    files and they have actions in them, and they're set up the exact
    same way -- but they work...
    The whole site is new, so every SWF is CS3/AS3. I'm not even
    doing anything crazy, so I'm getting pretty frustrated trying to
    build an all AS3 site and I can't even do basic stuff....
    I can upload/email the FLA files in question if anyone has
    time to look...
    Thanks,
    Brandon

    Well, when I test the loaded SWF within the Flash environment
    (by itself), it plays just fine.
    Then, I try to play the root containing movie (both within
    Flash and on the web server) and as soon as that section loads, is
    when the error occurs.
    I've tried tracing everything. even down to putting trace()
    actions between every layer. Can't determine what causes it...
    One thing I noticed (but I assume is a naming convention that
    Flash uses), is in the error above you see "test_fla", well, lets
    say I have these files:
    test-container.fla
    test-home.fla
    I don't have a test_fla, but the error code refers to it
    anyway...

  • Calling a function in the main movie from a loaded swf

    I realize this is probably a very basic question, but I have
    loaded a SWF file into another movie. I now want to call a function
    in the main SWF. Is there a way to do that? Alternatively, I have a
    custom class where I could put the function, but I haven't been
    able to figure out how to call it from the loaded SWF either. Do I
    somehow need to associate the class with the main movie,
    or...?

    Never mind - I was doing something very stupid and wasn't
    calling the function as a method of a movie clip. I was simply
    calling checkTarget(event) rather than
    event.currentTarget.checkTarget(event); which seems to work.

  • Acessing loaded swf movieclip sctructure on as3

    Hi, I'm using external swf files to add skins to an
    application. Currenlty,I'm loading isolated elements successfully
    by the use of the Loader class. However, now I want to load a more
    complex skin structure that will have some movieclips already
    placed on the loaded swf stage. The question is: when I load an swf
    that athe edit time, I placed some elements on stage and gave them
    instance names, how can I access this external swf movieclip
    structure? It's something like this:
    1. First, I create the external file by placing some elements
    on its stage, naming these elements instances, like "console_bar"
    and "console_button".
    2. Then, I load this swf using the Loader class (into a
    loader called "playerConsole", for example) and, whe it finishes
    loading I try to access the elements placed on stage:
    this.addChild(playerConsole);
    playerConsole.console_bar.x = 0; // won't work - how can I
    access this instance?

    This code generates an error when I try to compile:
    1119: Access of possibly undefined property console_bar
    through a reference with static type
    flash.display:DisplayObject.

  • Loading swf files from an iPhone Air App

    Although the faq says its possible ( http://bit.ly/gyxmCo  )  I can't seem to load .swf files from my app.
    There's no .AS code in the .swf file I'm trying to load.
    PNG files load with no problems, swf's fail.
    A working example would be appreciated instead of suggestions, I've spent the entire day trying out suggestions
    regards,
    Martijn

    Because I can't see any library assets in an as2.0 file.
    I've discovered that the swf fails to load as soon as you make a symbol 'export for actionscript'
    probably because it will then create a class. So you can only load SWF's as simple pictures or animations, you cant use it as an asset library with multiple animations/images/sounds in it..
    As for you other questions:
    it doesnt matter if the file is local or on the web. same results
    I created the swf file from a fla in CS4,  and I'm compiling my air project that loads the swf  with FlashDevelop.

  • Controlling loaded SWF inside a child

    Hello to everyone, may this question be too obvious to
    everyone, but I've been googling for hours without any luck.
    Have seen examples but they are not exactly as my scenario...
    Please, I need some help.
    I have loaded a SWF and attached to a MovieClip which exist
    in my current movie using the following code, and now I just want
    to access the loaded SWF to send it orders like play() or
    gotoAndPlay(); I have tried also: container=
    MocieClip(loader.content); instead adding child, but it trhows an
    error

    //this is your minimum code to load a file
    var url:String = "put your url here ";
    var request:URLRequest = new URLRequest(url);
    var loader:Loader = new Loader();
    loader.load(request);
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    loadComplete);
    function loadComplete(event:Event):void {
    addChild(loader.content);
    //you don't need all that code just concentrate on the bit
    you need; when this work then you can start putting the rest

  • Flash MX2004 Loader Component Question

    Hi all,
    I have a question regarding the loader component that ships
    with Flash MX 2004. I am using the component to load .swf files. As
    far as I can tell, the component will not begin to play a .swf file
    until it is 100% loaded. Is this correct? If not, is there any way
    to make it play as it is downloading? This IS possible with the
    MovieClipLoader class but I currently have a complex application
    built using the loader component.
    If anyone has any suggestions, I would appreciate it.
    Additionally, I could extend the class if anyone can point me in
    the direction of what would need to be changed in the class.
    Thanks,
    John

    I'm only trying to interpret what that message is telling me in this response.  It seems to be indicating that you have some object in the library that you have named "calLoader" and assigned it a linkage ID of Loader (possibly by default) as well as another object in the library named myLoader that has the same linkage ID (possibly by default).
    If these two objects are the same component type, then you only need one of them in the library.  The different naming of them can be managed on the stage.

  • Invoking class from loaded swf

    I'm working on a project where I'm loading in a video player
    as an external swf to my main movie. I'm not able to get my video
    or the custom player to show up, but sound is there (I've done the
    whole Library>New Video thing, so I have a video object to
    reference).
    My question is: My loaded swf uses #include to include a
    script which imports two classes from a subdirectory, could that be
    causing the problem? My main movie never uses the classes.
    Just want to make sure this isn't my problem before I go
    digging into the script again!

    That is unlikely to be the problem. The .as includes are
    compiled into the
    SWF at publish. Much more likely is that you have
    inappropriate references
    to _root in your loaded movie. As it stands, the scope of
    _root, once you
    load the movie into another, is the _root of the *loading*
    movie. Either
    change these refs, or set the _lockroot property of the mc
    you are loading
    into to true.,
    Remove '_spamkiller_' to mail

  • Loaded SWF communicating with Main Timeline

    Let's say I load an external SWF to my main timeline. In that
    loaded SWF, I'd like to have a button that when clicked, removes a
    Movie Clip from the main timeline.
    How do I do that? Should be simple, right?

    Sorry I misunderstood your question, but here is the code.
    The second part is original swf altering a movie clip in the
    external (mov2.swf), just making an mc 50% transparent....
    circle_btn.addEventListener(MouseEvent.CLICK, printButton);
    function printButton(myevent:MouseEvent){
    var portLoader:Loader=new Loader();
    var printThumbRequest:URLRequest=new URLRequest("mov2.swf");
    portLoader.load(printThumbRequest);
    stage.addChild(portLoader);
    portLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    loaded);
    function loaded(event:Event) {
    circle2_btn.addEventListener(MouseEvent.CLICK,
    talkToExternal);
    function talkToExternal(myevent:MouseEvent){
    event.target.content.green_mc.alpha=.5;
    }

  • Using embeded fonts in loaded swf.

    I have a .Swf, which has 3 fonts embedded in it, they are all exported in frame 1 for AS.  This swf loads any number of external .swfs which have dynamically generated textfields inside of them.  This text must be embedded text because effects may be applied to them.  I do not want to embed the three fonts into every external swf, and do not think I should have to.  The font exists in the Loading swf and I have registered the fonts to the global font list.  If I print this list from the loaded swf, all three fonts are present, but when I try to use any of them, my textfiels are empty.
    My question is how do I utilize a font which is embedded in a swf, from a swf which has been loaded into that swf?
    From my external swf, this code:
    [PHP]var embeddedFonts:Array = Font.enumerateFonts(false);
    embeddedFonts.sortOn("fontName", Array.CASEINSENSITIVE);
    trace(embeddedFonts);[/PHP]
    produces the following:
    [PHP][object CenturyBook],[object MyriadProRegular],[object MyriadProItalic][/PHP]
    which are the three fonts that are embedded in the loading swf, So I assume the LOADED swf has access to these fonts.
    When I apply this code to the externally loaded swf:
    [PHP]var FontClass:Class = getDefinitionByName("MyriadProRegular") as Class;
    trace("FontClassInstance -> " + FontClass.toString());
    var linkedFont: Font = new FontClass();
    trace("Font name: " + linkedFont.fontName);
    var textFormat: TextFormat = new TextFormat(linkedFont.fontName, 14);
    //... The next lines set up the text box and apply the format.  I am sure this is done correctly.
    [/PHP]
    I get the following output:
    [PHP]FontClassInstance -> [class MyriadProRegular]
    Font name: Myriad Pro[/PHP]
    which is exactly what I would expect.  Yet, my text box is still blank.  I have embedText = true on the text box, and have applied a string to the "text" property, so it's nothing silly liek that.
    Any help would be appreciated...

    You may also want to look at the various embedded font format issues. Many of the Flex 4 components use a newer embedded font fortmat, which is not the same as the one generally used in Flash. So even if ther Flash font gets registered properly, it still may not work with some of the spark components.
    You should be able to create a swf using Flex that contains fonts embedded in either format, which can then be used in the way you describe, though, since Flex 4 suports both font formats.
    Hopefully, someone else will jump in here if I got some of this wrong.
    -JM

Maybe you are looking for

  • My itunes wont connect to the internet help :S

    my itunes keeps saying im not connected to the internet when i am

  • Comparing the "line" results of two Cubesets- is it possible?

    Hi all- I had asked this previously- I'm going to try again and hopefully be clearer about what I'm hoping to accomplish. I'm open to any way to accomplish this, although in the best possible world I'd be able to keep it inside one or more cubeformul

  • Importing from Memory Id

    Hi All, Please tell me how the following command works and how can we see the contents which are being returned from this memory Id. IMPORT /ICO/MO_RUP-BERNR TO WLV_BERNR FROM MEMORY ID 'ZOR'. Also, GET PARAMETER ID 'ZOR' FIELD WLV_BERNR. Thanks, Arc

  • N8: Power saving - Visibla or not visible

    In the power saving settings of my N8 there is the choice  among "Visible" and "Not Visible" related to the request to switch to power saving mode when battery low. Someone knows the difference? I'd prefer the N8 to switch automatically in power savi

  • Unable to view Content pane or playback buttons from play.exe

    After publishing Player files, I want to preview the Player output so I launched player.exe. It opens in Internet Explorer, and I can see and expand the modules and view the topic listing. However, I cannot see the Concept pages. All I get is a blank