Embeding a swf in another swf

Hello, heres what I'm looking to do:
I am trying to create a project completely in flash player,
however its very large (its basically a tutorial for a coding
language called "magic")
I want to seperate it out a bit, basically one main flash
file that acts as a menu system with buttons to send you to
different sections of the tutorial, and then I want to make a bunch
of individual flash files for each page of those sections.
How would I go about calling a swf from within a swf file, or
preferably embedding multiple swf files into the main swf file.
This would allow me to make a bunch of complicated timeline
animations without having a completely unmanageable single
timeline.
Or if you have another possible suggestion on how to more
easily seperate functions/animations I'm certainly open to other
idea's. Thank you in advance!

This is pretty simple once you get the hang of it. Create an
empty movieclip and place it on your stage. You can do this with
either code or by actually creating it in your library. Call it
holder_mc. position it where you would like your other movies to
load. Again you can do this by code or by physically moving it.
//This is how to do it with code:
//STEP 1 create your empty movie clip and give it your name/
place it in the next available level
_root.createEmptyMovieClip ( "holder_mc" ,
_root.getNextHighestDepth() )
//position the holder mc
_root.holder_mc._x = 50
_root.holder_mc._y = 50
//create a button and place it in the root - then attach code
that loads your external .swf into your holder mc
homeButton_btn.onPress = function(){
_root.holder_mc.loadMovie("home.swf") }

Similar Messages

  • Embedding a .swf published in Catalyst in another Catalyst project

    Ok,
    i've been trying different things but now i can't figure it out.
    It's actually a school assignement where we have to create an interface similar to a smartphone.
    Me and my partner decided to create a Catalyst project for each page and publish each of them in swf. Then, we wanted to create a main Catalyst project that was embedding each swf in different states.
    BUT
    It just doesn't work! The embedding doesn't work.
    Is the swf published in Catalyst actually  compatible to embed in Catalyst?
    Thanks!

    A custom component is like other components like buttons, scrollbars, etc.  except you get to define all the behaviors and states.
    Try this
    1. draw a sqaure
    2. right click and choose Convert Artwork to Component > Custom Component
    3. Now double-click the custom component to edit it
    4. Create a few states and modify the square in each state
    5. to exit editing the custom component double-click the white area of the artboard
    6. Now add a button to the app
    7. With the button selected go to the Interactions panel and choose "On Click, Play Transition to State" and pick a state of your custom component.
    Notice that in this example the application only has one state, but a custom component with multiple states was able to capture different appearances of the app.
    You can think of designing your app by breaking down the functional parts into custom components. For example: navigation bar, content area, ad area, etc.
    Regarding "export library":
    After creating a custom component or customizing a built-in component like button you will notice that the library will contain an item representing the definition of that component. When you export as an fxpl file, all components in your library are exported.
    Ty

  • Embedding a SWF file with an iFrame

    I wanted to embed an assessment in to one of my PDFs. I know I can't do it directly so I tried to create a small little Flex app that shows an iFrame (see here for the example). I then tried to insert this (as a SWF) in to my PDF file. I have a problem where when selected in the PDF it displays the SWF file, but not the linked URLs for the iFrames. Any ideas? how I might be able to get around this. Here is an example of what I was working on.
    Any help would be much appreciated.
    Noel

    hat do you mean with embedding a SWF file into another?
    you can embedd a SWF file in a HTML file. you can load a SWF
    file in another SWF file.
    but to embedd a SWF into another is not possible.

  • Embedding Flash swf in Google Site displays NaN output but works in Debug mode

    Hello,
    I am loading a text file with three variables into a flash file (CS5). The flash file then calculates and prints the three values based on some calculations. I am storing the text file as an attachment on the google page in which I am embedding the swf file. What's weird is that the flash file plays correctly in debugging mode (i.e., prints the 3 variables correctly), but as soon as I upload the swf to the Google site page (as an attachment in the same location as the text file), the flash file outputs NaN. I am stuck as to why the file works in debug mode in Flash, but not when it's uploaded to the google site page. I have tried storing the text file on SharePoint and referencing it from there, but I get the same results when viewing the swf on the Google site page.
    Is it because the google site page is using SSL?
    I am fairly new to flash, so any help would be appreciated.
    Thanks!
    Lori
    Variables.txt stores this: "current=6950&goal=7175&low=6950"
    Here is the code in my flash file:
    _global.getPercent = "";
    myvars = new LoadVars();
    myvars.load("variables.txt");
    myvars.onLoad = function(success){
              l = Number(myvars.low);
              c = Number(myvars.current);
              g = Number(myvars.goal);
              getPercent = (c-l)/(g-l);
              if (getPercent > 0) {
                        colorshow._height = (getPercent*colorshow._height);
              } else {
                        colorshow._height = 0;

    I have this in front of the trace:
    myvars.onLoad = function(success){
    When I put in the full URL to the attachment on the Google page (i.e., something similar to "myvars.load("https://sites.google.com/a/..../home/department-sites/sales/variables.txt,");" - instead of just "myvars.load("variables.txt");", it doesn't work. So right now its set to just "variables.txt" and the swf file is in the same root location as the variables.txt file on the Google page. I also have a copy of the variables.txt file in the same local directly in which I am running the flash file for testing. So I think when I run it in debug mode, its referencing the variables.txt file in the local directory, rather than the one stored as an attachment on the Google page.
    That's what seems so weird...it runs locally in debug mode...but not when I embed it on the Google page. I can also get it to work if I explicity define the variables in the flash file, rather than rely on the external text file. That's the only time I can get it to work on the Google page.
    Thank you for your help!

  • Unable to apply embedded font swf to text in text layout framework

    Hello,
    We have created a swf for a given font (for e.g., Calibri.swf) which contains all the styles (Regular, Italic, Bold, BoldItalic).
    We have created a xml which lists the name of the font and the corresponding swf file path. The names from the xml are loaded into a combo box in the application.
    When we try to apply the selected font to a text in the text layout framework, it does not apply the same. It sets the font to default "Times" font.
    Following is a snippet of code to apply the font to the text:
    private function selectFont(fontXML:XML):void {               
                    var path:String = fontXML.@source;
                    var myEvent:IEventDispatcher = styleManager.loadStyleDeclarations(FlexGlobals.topLevelApplication.url.substring(0,FlexGl obals.topLevelApplication.url.lastIndexOf("/"))+"/"+path);
                    myEvent.addEventListener(StyleEvent.COMPLETE, function(event:StyleEvent):void{
                        var editManager:EditManager = textFlow.interactionManager as EditManager;
                        var itextLayout:TextLayoutFormat = new TextLayoutFormat();
                        itextLayout.fontSize = 20;
                        var fontName:String = fontXML.@name;
                        Alert.show(fontName);
                        itextLayout.fontFamily = fontName;   
                        Alert.show( "itext = " + itextLayout.fontFamily);
                        editManager.applyFormat(itextLayout,itextLayout,itextLayout);
                        var flowLeafElement:FlowElement = textFlow.findLeaf(editManager.anchorPosition) as FlowElement;
                        editManager.changeStyleName(fontName,flowLeafElement);
    Can anyone please let us know what is missing in the implementation?
    Thanks in advance.
    Vikram

    My recommendation: unless you really care about ISWFContext implementations and the application domain issues, ignore Alex's post about embedded fonts.
    It is a nice discussion about the inner workings of the domain and security of how this works but it is imho broken and is an insane concept to require an ISWFContext to just use an embedded font. It also breaks runtime CSS loading that has fonts embedded in it because the Flex compiler (last I checked) was also busted – it doesn't include the function necessary to create within context the font embed so that it may be applied. You can't create an ISWFContext with a compiled CSS file.
    These issues were introduced in the last Flex SDK beta before FB4 was released in final form. There are multiple bugs logged against the issue of applying loaded font files to TLF text (in short, SWFContext is broken and you have to override GlobalSettings.resolveFontLookupFunction to return embedded or null, all the time).
    Here's some more details to get you started - with links to at least one of the SDK bugs that were filed:
    http://forums.adobe.com/message/2656152
    For example:
    import flashx.textLayout.elements.GlobalSettings;
    import flash.text.engine.FontLookup;
    GlobalSettings.resolveFontLookupFunction = function makeValid():String { return FontLookup.EMBEDDED_CFF };
    And you may need to do this after your font is loaded:
    yourTextBlock.textFlow.invalidateAllFormats();
    Disclaimer: I haven't seen the latest Flex SDK release to see if this was fixed. I have an AIR application with native process that builds embedded font SWF files for use and stub code for FB4 usage but haven't updated to the latest SDK yet to see if it's working properly.
    Anyhow, your best bet is to look at the Flash Builder forums. I think this is/was a Flex team issue, not TLF.

  • Embedding a SWF Video in an AIR 2 HTML App

    I've been through the forums for awhile and I can verify that my issue doesn't have to do with transparency or chrome.  I have an IFRAME which is in the application sandbox, giving it access to files in app-storage.  Dynamic images are loading fine, but my dynamically generated <OBJECT> code that is placed in the DOM is not loading the SWF video.  I can see the object placeholder, but no video.
    Are there any requirements to embedding a SWF file, perhaps size requirements (both height and width required)?  Given the fact that my content is dynamic and I don't know the dimensions of the SWF file, I currently have two options for embedding:
    1. Calculate the height and width of the parent element, and assign those values to the OBJECT params.
    2. Use 100% width and height on the OBJECT
    This might pose problems with the proportions of the SWF file, which I'm hoping can be fixed by the scale PARAM (http://kb2.adobe.com/cps/127/tn_12701.html).
    Please help, I haven't been able to find any similar problems.  I followed the documentation for embedding from here:
    http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS4B441C24-BAE3-4110-91FD-A4E5EEFB2467.htm l

    Is this happening for any swf file, or is this an issue related to video?

  • Embedding excel workbook in another workbook

    Embedding excel workbook in another workbook
    GSKR

    Hi,
    We can Embbed a Excel file to aworkbook.
    In the Excel tab->Click Insert->The Object window will open->Select Create from File tab-> Select the check box Display as Icon->Click Browse and select the file you want to attach->The file will be shown on the worksheet as an icon.
    However, I don't think we can embed an Excel workbook into a workbook. Could you please re-upload the picture? Thank you.
    Wind Zhang
    TechNet Community Support

  • Embedding a SWF inside another SWF

    I used inDesign CS4 to develop a catalog of services for the
    company I work for. Then exported it to a Flash document with
    interactive buttons and page turns. This is the current look:
    http://www.directrixsolutions.com/cw
    My question in regards to my file is, can you import the .swf
    file, which inDesign makes, into a Flash document so that a
    preloader for the file can be used? My .swf (packet.swf) is about a
    1mb large and so should have a preloader. But, when I import it, or
    have an attached .swf within the file that points to my packet.swf,
    this is what happens. WARNING: IF YOU ARE PREDISPOSED TO HAVING
    SEIZERS, YOU SHOULD PROBABLY NOT CLICK ON THIS LINK. (c8
    http://www.directrixsolutions.com/cw/FlashVersion.html
    As you can see, the document goes crazy. Any ideas?

    NedWebs. Yes, I did add that message myself, and it isn't a
    virus. I can explain what it is doing if that would be better. When
    the FlashVersion of the packet is loaded, it goes through the
    preloader, then goes to the packet.swf. But instead of remaining on
    the first page of the packet and waiting for instructions from the
    viewer on going to the next page. It jumps to the next page, then
    to the next and so on. Very quickly. I would have to say that it
    goes through the entire 11page packet 3 or 4 times each second. It
    is as if when the packet.swf is opened, it goes through each frame
    and is on a loop. Maybe the stop(); script for each page is not
    being recognized? I have attached the ActiveScript code that I used
    within this project.

  • AS3 issue embedding AS2 .swf files

    Hi there,
    I'm attempting to create a menu navigation system with Flash/AS3 that opens up a series of older AS2 activities.
    At the moment I'm testing it with two buttons/two activities.
    The problem I'm having is that when I'm testing the navigation, the first button clicked will open its respective activity correctly, which can then be shut down using the original activity's exit button, and return to the two buttons on my AS3 menu. However, if I then select the other activity from the same screen, it won't load. I'm able to click the original activity again, and have it open, but not the new one.
    If I test the main flash navigation file again and click the other button first (that wasn't working), the other activity opens fine, and can be closed down. However the first button now won't open the activity. So both the buttons work (if they're the first ones clicked), but from then on, only the first button clicked works.
    In the debug panel, it looks as if the AS2 .swf files that I'm attempting to embed are themselves embedding a wrapper.swf file (with navigation buttons) as well as another sub set of shared .swf files for their own operation. Might it possible that these sub swf files aren't being unloaded properly when I switch between the main AS2 movies from my menu system?
    Is there a way to clear/unload everything that's been loaded (even resources loaded by the external files themselves - like a hard reset) between button presses?
    I have no access to the original AS2 code as this was done by another team years back.
    I'd be really grateful for any help or advice that anyone might be able to give.
    Thanks

    Just looking at the debugging panel, this is what I see when I try and run the program:
    Attempting to launch and connect to Player using URL /*****/*****/****.swf
    [SWF] Volumes:Data:Documents:*****:****:****:*****.swf - 876582 bytes after decompression
    [SWF] Volumes:Data:Documents:*****:****:****:*****:F11_pr_qu_3:quiz.swf - 176016 bytes after decompression
    LocateFolders.enginesFolder(file:///*****/****/****/*****/F11_pr_qu_3/quiz.swf)
    [SWF] Volumes:Data:Documents:*****:****:****:*****:F11_pr_qu_3:wrapper.swf - 481279 bytes after decompression
    ### Latest wrapper ###
    etc etc...
    Then follows a whole set of loading instructions and trace instructions put in the as2 swf which show XML files being loaded and the program launching. These must have been put in place by the previous programmer.
    When I click the exit button on the 'embedded' swf, the debugging panel shows things shutting down:
    ActivityToolbar clickQuit()
    Wrapper quitActivity()
    EndGame clear(false)
    Now when I click the second button, I should see a similar set of launching greetings etc. instead it bottles out at the following:
    [SWF] Volumes:Data:Documents:*****:****:****:*****:F11_wb_fc_1:flashcards.swf - 94720 bytes after decompression
    LocateFolders.enginesFolder(file:///file:///*****/****/****/*****/F11_wb_fc_1/flashcards.s wf)
    And there it stops.
    If I restarted the program and pressed the second button first, it would show the flashcards.swf activity loading correctly, but would then refuse to load the first activity when I clicked on the button.

  • Controlling Embedded Captivate SWFs

    Hi:
    I have a SWF (SWF A) that I'm loading into a movieclip
    (Movieclip C)which is part of another SWF (SWF B). Basically, SWF B
    functions as a player, with play and pause controls. These controls
    control Movieclip C where the external SWF A is loaded into.
    Normally, I have had no problem with this and it always
    works. At run time, when you click the pause button on SWF B, a
    stop() command is issued to Movieclip C, which stops the play of
    the external movieclip (SWF A) loaded into it.
    However, I did a screen capture with Captivate and published
    it as a SWF. I loaded this SWF (SWF A) into Movieclip C in SWF B at
    run time. However, clicking the controls on SWF I created has NO
    EFFECT on the SWF I created in Captivate. It just keeps playing.
    I guess all SWFs are NOT created equal. How can I make this
    work?
    By the way, I do not want to use the embedded controls that
    come with Captivate.
    Loren
    “The only real mistake is the one from which we learn
    nothing." - John Powell

    Loren,
    > Normally, I have had no problem with this and it
    > always works.
    Good.
    > However, I did a screen capture with Captivate and
    > published it as a SWF. I loaded this SWF (SWF A)
    > into Movieclip C in SWF B at run time. However,
    > clicking the controls on SWF I created has NO EFFECT
    > on the SWF I created in Captivate.
    I'll bet it does have an effect, but you just don't see the
    effect
    you're expecting.
    > It just keeps playing.
    > I guess all SWFs are NOT created equal. How can I
    > make this work?
    A SWF is a SWF is a SWF. They are all created equal, from a
    certain
    point of view. Flash Paper SWFs are just SWFs, at bottom,
    even though they
    have additional functionality. Captivate SWFs are also just
    SWFs -- which
    means they must adhere to the MovieClip class, all of whose
    methods,
    properties, and events are listed in the "MovieClip class"
    entry of the
    ActionScript 2.0 Language Reference.
    It may be that Captivate nests its SWFs, so that you need to
    adjust your
    target when telling a given movie clip container what to do.
    Would you show
    the exact ActionScript you're using?
    David
    stiller (at) quip (dot) net
    Dev essays:
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • Embedded container swf loading swf with xml

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

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

  • What is the use of embedding Xcelsius Swf file in to Crysatl report?

    Hi all,
    I read some documents related to this integration, but still am in a confusion about the final purpose.
    Can any of you answer my question patiently?
    1.Is the embedded SWF acts just like a static object (just like a SWF)?
    2.If, I embed a swf file in CR 2008, Will both have any interactivity between those two?
    I mean, if I change the source data for CR , will the data SWF be changed? (If I have same columns like Country, Sales)
    3.How the interactivity will work..? From SWF to Crystal data OR Crystal data to SWF (as I asked above).
    4.I read BO doc with an example, but its not clear up to my doubts.
    It would be thank full if any of you spend your time for a clear description.
    Thank you,
    Krishna Pingali
    Dell India.

    Hi Mathew,
        The Convert to Formula in Excel Allows you to Convert you Embedded Bex Query into API Calls. This enables you to Better Format the Excel Output by allowing you to move your Cells Around.
    This helps because when you refresh you Query all the Changes you make will be maintained.
    [More Info on Working with Formula|http://help.sap.com/saphelp_nw70/helpdata/EN/d3/015369f54f4a0ca19b28c1b45acf00/content.htm]
    Hope this Helps
    Datta.

  • Problem in embedding 2 swfs in a single html

    hi,
    i am currently embedding 2 different swfs in a single html file,but i'm having problems.
    i am trying to embed the other swf programatically using js, but i'm getting a script error..
    i am also having problems in running it in other browsers because it's only working good in ie and firefox..
    i know that we need to embed it, using object,embed tags and embed it in the active content area.
    how do i embed it properly?
    here is my code.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
        <head>
            <title>DWP Test Page</title>
            <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
            <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
                <script language="JavaScript" type="text/javascript">
        //Declare all global variables
                var mediaDivId="m1";
                var imageDivId = "m2";
                var imageNode;
                var mediaNode;
                var propertyStyle;
                //Function to access the Flash movie
                function getFlashMovie(FlashMovie)
                            var isIE = navigator.appName.indexOf("Microsoft") != -1;
                            return (isIE) ? window[FlashMovie] : document[FlashMovie];
                //function to play media in Main Page
                function OpenMedia(type,url)
                        //Declare local variable and pass the div ID of Image and Media node
                        //and set a value for property style
                        var content;
                        var activeContent;
                        imageNode = document.getElementById(imageDivId);
                        mediaNode = document.getElementById(mediaDivId);
                        propertyStyle = "hidden";
                        //Set Image property to hidden and Clear media
                        imageNode.style.visibility = propertyStyle;
                        mediaNode.innerHTML = "";
                        //Embed Media Skin in Main Page
                        content='<noscript><object id="FlashMovie"  classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="500" height="500" id="dwpPlayer" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="dwpPlayer.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed name= "FlashMovie" src="dwpPlayer.swf" quality="high" bgcolor="#ffffff" width="500" height="500" name="dwpPlayer" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /></object>';
                        activeContent = '<script language= "JavaScript" type="text/javascript">' + "AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0','wid th', '500','height', '500','src', 'dwpPlayer','quality', 'high','pluginspage', 'http://www.adobe.com/go/getflashplayer','align', 'middle','play', 'true','loop', 'true','scale', 'showall','wmode', 'window','devicefont', 'false','id', 'dwpPlayer','bgcolor', '#ffffff','name','dwpPlayer','menu','true','allowFullScreen','false','allowScriptAccess', 'always','movie', 'dwpPlayer','salign', '');" + "</script>";
                        mediaNode.innerHTML = activeContent + content;
                        //Calls action Script and Pass Media type and URL
                        switch(type)
                            case (type == 'video'):
                            getFlashMovie("dwpPlayer").sendVideoURLToFlash(url);
                //function InsertActiveContent()
                //    var active = '<script language= "JavaScript" type="text/javascript">' + "AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0','wid th', '500','height', '500','src', 'dwpPlayer','quality', 'high','pluginspage', 'http://www.adobe.com/go/getflashplayer','align', 'middle','play', 'true','loop', 'true','scale', 'showall','wmode', 'window','devicefont', 'false','id', 'dwpPlayer','bgcolor', '#ffffff','name','dwpPlayer','menu','true','allowFullScreen','false','allowScriptAccess', 'always','movie', 'dwpPlayer','salign', '');", "</script>");
                //Function to close the Media and show image
                function RemoveMedia()
                        alert("Hoy!");
                        //Set value for local variable
                        mediaNode = document.getElementById(mediaDivId);
                        imageNode = document.getElementById(imageDivId)
                        propertyStyle = "visible";
                        //Clear InnerHTML of division for media
                        mediaNode.innerHTML="";   
                        //Set Image property to visible
                        imageNode.style.visibility = propertyStyle;
                            // -->
                </script>
        </head>
        <body>
            <object id="FlashMovie1"  classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="600" height="600" id="dwp_CarouselBackUp" align="middle">
            <param name="allowScriptAccess" value="always" />
            <param name="allowFullScreen" value="false" />
            <param name="movie" value="Carousel.swf" />
               <param name="quality" value="high" />
               <param name="bgcolor" value="#ffffff" />
            <param name="flashvars" value="xmlFile=Carousel.xml" />   
            <embed name= "FlashMovie1" src="Carousel.swf" flashvars="xmlFile=Carousel.xml" quality="high" bgcolor="#ffffff" width="500" height="500" name="dwp_CarouselBackUp" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
            </object>
            <input type=button value="Send" onClick="javaScript:OpenMedia('video', 'Call_to_action.flv')"/>
            <table style="TABLE-LAYOUT: fixed; OVERFLOW-X: hidden; WIDTH: 808px; HEIGHT: 706px">
                <tr>
                    <td>       
                    </td>
                    <td>
                    <div id ="m1"></div>
                    <div id = "m2"></div>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                    </td>
                </tr>
            </table>
        </body>
    </html>

    the thing thats now working is the part where the js embedded the dwpPlayer.swf.
         //Embed Media Skin in Main Page
                        content='<noscript><object id="FlashMovie"  classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0 ,0,0" width="500" height="500" id="dwpPlayer" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="dwpPlayer.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed name= "FlashMovie" src="dwpPlayer.swf" quality="high" bgcolor="#ffffff" width="500" height="500" name="dwpPlayer" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /></object>';
                        activeContent = '<script language= "JavaScript" type="text/javascript">' + "AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0 ,0,0','width', '500','height', '500','src', 'dwpPlayer','quality', 'high','pluginspage', 'http://www.adobe.com/go/getflashplayer','align', 'middle','play', 'true','loop', 'true','scale', 'showall','wmode', 'window','devicefont', 'false','id', 'dwpPlayer','bgcolor', '#ffffff','name','dwpPlayer','menu','true','allowFullScreen','false','allowScri ptAccess','always','movie', 'dwpPlayer','salign', '');" + "</script>";
    the player is showing but it doesnt retrieve any values. unlike when it was embedded normally.
    If i may ask,
    normally how will we embed 2 swfs? coz, i normally embed them by creating separate instances of the 2 swfs.
    Like this:
    Note: this embedding works manually if js doesnt need to create the embed itself.but when we translate it by embedding it programmatically. the player shows upon click but theres a script error that an object needs to be embedded.
    <script language="JavaScript" type="text/javascript">
        AC_FL_RunContent(
            'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0',
            'width', '800',
            'height', '600',
            'src', 'dwp_Player',
            'quality', 'high',
            'pluginspage', 'http://www.adobe.com/go/getflashplayer',
            'align', 'middle',
            'play', 'true',
            'loop', 'true',
            'scale', 'showall',
            'wmode', 'window',
            'devicefont', 'false',
            'id', 'dwp_Player',
            'bgcolor', '#ffffff',
            'name', 'dwp_Player',
            'menu', 'true',
            'allowFullScreen', 'false',
            'allowScriptAccess','always',
            'movie', 'dwp_Player',
                'flashvars','xmlFile=3DCarouselSettings.xml',
            'salign', ''
            ); //end AC code
    </script>
    and like this..
    <noscript>
        <object id="FlashMovie"  classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="800" height="600" id="dwp_Player" align="middle">
        <param name="allowScriptAccess" value="always" />
        <param name="allowFullScreen" value="false" />
        <param name="movie" value="dwp_Player.swf" />
        <param name="quality" value="high" />
        <param name="bgcolor" value="#ffffff" />
        <param name="flashvars" value="xmlFile=3DCarouselSettings.xml" />   
        <embed name= "FlashMovie" flashvars="xmlFile=3DCarouselSettings.xml"  src="dwp_Player.swf" quality="high" bgcolor="#ffffff" width="800" height="600" name="dwp_Player" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
        </object>
    </noscript>
        <object id="FlashMovie1"  classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="800" height="600" id="Carousel" align="middle">
        <param name="allowScriptAccess" value="always" />
        <param name="allowFullScreen" value="false" />
        <param name="movie" value="Carousel.swf" />
        <param name="quality" value="high" />
        <param name="bgcolor" value="#ffffff" />
        <param name="flashvars" value="xmlFile=3DCarouselSettings.xml" />   
        <embed name= "FlashMovie1" src="Carousel.swf" flashvars="xmlFile=3DCarouselSettings.xml" quality="high" bgcolor="#ffffff" width="800" height="600" name="Carousel" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
        </object>

  • Embedding a SWF inside a MovieClip - width = 0

    I have a class that extends a MovieClip and receives a MovieClip inside it. The movieclip is embedded like this:
    [Embed(source='assets/emi_dir.swf')]
    protected var MyMovie:Class;
    and I add it on the Parent constructor like this:
    public function Item(content:DisplayObject) {
    super();
    var lines:Sprite = new Sprite();
    lines.graphics.lineStyle(1, 0xFFFFFF, 0);
    lines.graphics.moveTo(0, 0);
    lines.graphics.lineTo(0, content.height);
    lines.graphics.lineTo(content.width, content.height);
    lines.graphics.lineTo(content.width, 0);
    lines.graphics.lineTo(0, 0);
    addChild(lines).name = "bg";
    addChild(content).name = "content";
    I had to include this "lines" MovieClip so that the Parent wouldnt be with width = 0 and height = 0, which happens when I only do this:
    public function Item(content:DisplayObject) {
    super();
    addChild(content).name = "content";
    When I add a Bitmap the Parent Item grows to accomodate the child, but this do not happen with SWF's... Why is that?
    Thanx
    Bruno

    Here it goes
    public function pushItemFromURL(url:URLRequest, row:int = -1):void {
    var loader:Loader = new Loader();
    loader.load(new URLRequest("http://127.0.0.1/emi_dir.swf"));
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(ev:Event):void {
    pushItem(loader.content, row);
    public function pushItem(obj:DisplayObject, row:int = -1):void {
    var item:Item = new Item(obj);
    if (row < 0 || getLinha(row) == null)
    row = getGrelha().numChildren - 1;
    if (item.width > maxWidth)
    maxWidth = item.width;
    if (row >= maxHeights.length)
    maxHeights.push(item.height);
    getLinha(row).addChild(item);
    refreshPlacement(row);
    public class Item extends MovieClip {
    public function Item(content:DisplayObject) {
    super();
    var fill:Sprite = new Sprite();
    fill.graphics.beginFill(0, 0);
    fill.graphics.moveTo(0, 0);
    fill.graphics.lineTo(0, content.height);
    fill.graphics.lineTo(content.width, content.height);
    fill.graphics.lineTo(content.width, 0);
    fill.graphics.lineTo(0, 0);
    addChild(fill);
    addChild(content);

  • Embedded AS3 SWF access in Flex 2

    I have an SWF (Action Script 3) created in Flash 9 Alpha
    Public.
    I can access all its methods and variables when using
    SWFloader, but fail to do so when embedding it by using [Embed]
    tag.
    I need to do it to use it as a custom cursor (CursorManager
    accepts objects of Class type as cursors). Before I was using SWF 8
    (AS2) with LocalConnection, but since the new SWF 9 is in Action
    Script 3, I want to use it directly.
    The code looks like this:
    [Embed(source = "cursor_9.swf")]
    private var newCursorSymbol:Class;
    private function changeCursor(event:MouseEvent):void
    CursorManager.setCursor(newCursorSymbol);
    The question is. Can I, and if I can, then, how, access this
    swf methods from within a Flex 2 application?
    or else, can the CursorManager somehow accept the content of
    SWFloader, which is a MovieClip object?
    Thank you

    This is tough. The DisplayObject that represents the customer
    cursor is instantiated internally by the CursorManager and is
    stored in a private variable, so there's no way to get at it. I
    believe there is a hack you can do if you ever only have one
    instance of that cursor. The Class you pass to the CursorManager
    can be any DisplayObject, so you can cook one up to wrap your SWF.
    For example, call it MyCursor.mxml:
    <mx:Canvas xmlns:mx="...">
    <mx:Script>
    <![CDATA[
    public static var sCursorLoader: SWFLoader;
    ]]>
    </mx:Script>
    <mx:SWFLoader id="loader" source="cursor_9.swf"
    creationComplete="sCursorLoader = loader"/>
    </mx:Canvas>
    And then use the CursorManager:
    CursorManager.setCursor(MyCursor);
    The idea is that once the CursorManager instantiates the
    MyCursor class, the static variable will point to the SWFLoader, so
    you can access it in a global way:
    MyCursor.sCursorLoader
    Of course, you'll have to put in some kind of delay to make
    sure the SWF is completely loaded, etc. This is just something I
    thought of off the top of my head, so take it with a grain of salt.
    :-)

Maybe you are looking for

  • ITunes List View of Movies on my iPod

    I load movies on and off my iPod Touch all the time using iTunes on my Mac. But it's really a pain in the *** because when I'm viewing my iPod's contents in iTumes and I select the Movies tab, all it will display is an alphabetical list of all the mo

  • PL/SQL web service code in 1013 is schema-specific

    When I generate a Web Service from a pl/sql package in 1013 (ea3), the code will only run against the schema that owns any user-defined SQL types that the package references. These types have synonyms on the database, but to get the code to execute a

  • Ipad was stolen and no longer in icloud

    My ipad was previously in Icloud and had been for years. It was stolen yesterday and now when I try to track it It is no longer listed as a device in Icloud. What can I do?

  • System Configuration for CRM Business Package 4.0-60.2 in Portal

    Hi All, We have configured CRM Business Package(4.0-60.2) on EP6 SP11. Also created the SAP_CRM system with required fields. But I am confused with where do I have to specify the ISA related parameters? Should I create new systems with the aliases sp

  • Resend AS2 messages from the Seeburger Workbench

    Hello, We have a EDI integration scenario where we are sending an asynchronous AS2 message via the Seeburger EDI adapter. As part of sending the message, we also request a synchronous MDN. In cases where we have successfully sent the message but not