Swf within a swf

So I've been nesting a lot of MCs within each other.
What I want to do is have a basic "image gallery," so to speak, that links to about 6 other SWFs I already have made. For the life of me I cannot think of how to do this properly.
The main thing is the button and the goto function. Is that even the right function?
Hopefully someone understands. This is time sensitive. Thanks.

I don't know if it matters, but I would avoid capitalizing Event in... Event:MouseEvent
because Event is a class just like MouseEvent
I get the impression you are using the UILoader component--fair warning, I tend to avoid using components, so I can only reference the help files to try tio help.  If you mean that code is not working for you, then I think you have to use the load method to actually load what you identify as the source.
var swf:Array = new Array("flash1.swf", "flash2.swf", "flash3.swf")
obama_btn.addEventListener(MouseEvent.CLICK, obama);
function obama(Event:MouseEvent):void
    media_mc.source = swf[0];
     media_mc.load();
You may be able to replace those two lines in the function with...
media_mc.load(new URLRequest(swf[0]));

Similar Messages

  • Using AS 3.0 to create a popup .swf within an .swf

    Hi,
    I need to have an .swf running for a game.  Within this .swf there will be a "Help" button, which, when clicked, needs to create a new popup window from a different .swf file. The second .swf file must appear in a new window, in a separate popup, and not replace anything in the first .swf window.
    I want to know how to do this in ActionScript 3.0. I don't need help with the button click event, but I do need help on how to make the popup appear.  Any advice?
    Thanks.

    use
    navigateToURL(new URLRequest("yourswf.swf"));

  • Saving/Printing work from within a .swf file

    Okay so here's the deal. I have to create a flash game in
    which users will be creating artwork. When users are done with
    their artwork we want them to be able to SAVE their work, EMAIL it
    to a friend, and PRINT it out all within the .swf file.
    HOW IN THE WORLD DO YOU DO THIS?????? I have been searching a
    researching and going through many forums and tutorials trying to
    see if anyone out there can help but I have come up with nothing.
    Although I did come a across a website that was able to achieve
    what we are looking to do in this flash game.
    Click here to view
    Snowflake Website
    On this website users can make snowflake art the old fashion
    way but this time on the web within a flash site. When users are
    satisfied with their snowflake they can save it and the snowflake
    is added to an ever growing database of user created snowflakes
    that also can be viewed by others at anytime. Users are also given
    the option of emailing their snowflake design to friends and
    downloading their design as a JPEG or and EPS file. You can also do
    the same to any of other numerous snowflake designs with the
    snowflake design database.
    HOW IN THE WORLD DO YOU DO THIS??? I have contacted the
    agency that was responsible for creating this site for their help
    as well but any assistance I can get from you guys would be greatly
    appreciated as well.
    Still quite confused but eagerly awaiting your
    responses.

    Printing object:
    on (release) {
    //creates the object of the class printjob
    var pj:PrintJob = new PrintJob();
    //starts the procedure
    //opens the windows printing window
    pj.start();
    //sets the printing area (i may be made outside the stage,
    so using the A4 area and adding any other information that should
    not appear on screen)
    area = {xMin:0, yMin:28, xMax:465, yMax:296};
    //printing options - true=bitmap / false-=vetor... bitmap
    generates a bigger file, but results in better quality for images,
    vector is smaller and a good option if you work just with text
    options = {printAsBitmap:true};
    //adds the page the the printing queue
    pj.addPage(_root, area, options, null);
    //sends the page to the printer
    pj.send();
    //deletes the object to clear memory (very important)
    delete pj;

  • A swf within a swf

    Hi,
    Hopefully someone can help me with this...
    I would like to embed a swf (call it swf 1) within my captivate 5.5 project (swf 2), but the catch is that swf 1 is interactive.  More specifically there are pause points within the course where learners need to play around with roll-overs or other features before clicking a button to resume.  There are a number of swfs going into swf 2, but I thought it best to focus on one for now.
    The idea is to publish the main project (swf 2) with a skin and TOC and to be able to control progress all progress, including the progress within swf 1, using the playbar from swf 2 - i.e. if I click on the playbar at a certain point, it should take me to that point even if it is half way through swf 1.
    I know how to add an animation to a slide and synchronise it with the project so that I can get that kind of playbar functionality.  However, this only works if swf 1 plays from end to end without any interactivity.  It doesn't seem to work when swf 1 pauses in the middle (in fact swf 1 barely even starts, before it vanishes again, leaving me watching the background of the slide that it was on).  Alternatively, if I don't synchronise it, then the main project will continue on to the next slide regardless of whether swf 2 has finished or not.
    So, the question is, how can I insert an interactive swf into the main project, synchronise it and retain the interactivity?  Any helpful, not too technical suggestions?
    Thanks.

    You won't be able to achieve this in Captivate without having advanced ActionScript 3 coding skills.
    You are better advised to find another way of delivering the effect you want that does NOT involve nested SWFs.

  • FLV. not working in SWF within HTML page

    I have created a SWF presentation which contains several videos as FLVs. The videos are uploaded to a folder on the clients server.
    The exported SWF and HTML files of the presentations worked perfectly when hosted on my local machine but when sent to the client, who uploaded to their own server, the SWFs ran but would not play the FLV files within. When they changed the HTML files to HTM they worked perfectly.
    However...when they embedded the pages into the content management system the use it required that the pages were reverted back to HTML, therefore the FLVs are not working again.
    The 'still' frame appears where the FLV should be, but the skin and the video itself does not load.
    Does anyone have any idea why this issue has occurred?
    Thanks in advance.

    @Ned
    Not sure about the folder structure of their site, to be honest they've been a nightmare client from day one so getting information like that out of them has been nigh on impossible.
    The flv files are all in a folder together and these are linked from the swf with this link structure: http://www.sitename.org.uk/folder/video.flv
    I'm not entirely sure how their CMS is structured. I was throwing this question out on the off chance that someone had seen a similar instance where HTML/HTM file types had affected functionality.

  • How do I Re enabled the Buttons in MainMovie.swf from a Button within SecondMovie.swf???

    I have the following situation
    MainMove.swf is doing a loadmovie of SecondMovie.swf
    The Button that loads SecondMovie.swf also disables other buttons in MainMovie.swf
    on (release) {
        _root.intro_btn.enabled = false;
        loadMovieNum("SecondMovie.swf", 2);
    How do I Re enabled the Buttons in MainMovie.swf from a Button within SecondMovie.swf???
    Using AS2 is this current project
    Thanks

    lol Sorry bout that I'm brand new here and was looking for the option to remove the post from the other location.

  • Flash SWF file within Swing JFrame

    I was wondering whether its possible to open a Flash swf file within a JFrame
    I am looking for a solution similar to the usage of Flash Activex control in .NET
    thanks in advance
    Vikas

    I have read the forum link and other such entries in this forum. I have found the following:
    1.) JFlash - a java based flash player. https://jflash.dev.java.net/
    Could'nt find the app or the official site
    2.) a few projects on sourceforge.org :
    java flash bridge where you embed the flash inside an Integrated Browser Component
    3.) SWT Flash integration.
    I do not find any of these solutions satisfactory.except the SWT/Flash integration which I havent tried.
    My question is that isnt there an easier and simpler way to :
    Embed Flash into Swing app where actionscript and java can communicate.
    I am aware of Remoting and web services. But It is a desktop app I am talking about.
    Can anyone suggest anything?
    thanks in advance..
    from a very frustrated programmer....

  • Rotating Video Playback within SWF

    At playback I am rotating a video (FLV) from a landscape to a
    portrait perspective (90 degree rotation) within a flash SWF. From
    a technical perspective, does flash just rotate the video on the
    fly, or does it go as far as to recreate and redraw the video in
    the new perspective?
    Are there any known issues with rotating video using
    flash?

    Here is a link to a great example...
    http://www.adamfrost.net/elearningMaterials/flash/rotateVideo/rotateVideo.htm

  • Calling functions of a SWF embedded within an HTML Text Field...

    I have a slideshow SWF of size 150px by 150px which changes
    image every 5 seconds with the use of a timer, the SWF has a kill()
    function which stops the timer.
    In a larger content holding SWF I have a dynamically
    generated textfield which populates its htmlText property via an
    XML feed.
    Within the htmlText I am inserting the slideshow SWF using
    the <img> tags... It all works great until I proceed to
    another page as there is no way to unload the slideshow SWF or call
    its kill() function which eventually lags the system as I have
    several heavy animations in the pages on ENTER_FRAMES.
    Does anyone know how to unload a SWF or gain access to its
    functions which is embedded within htmlText...

    Thanks for replying :)
    I tried that and using txt.getImageReference("idHere") I
    casted it to a loader object however it wont let me then get access
    to the SWFs functions...
    I tried creating a sprite and using addChild() tried adding
    the loader to the sprite but it gave me cohesion errors...
    Any other help MUCH appreciated

  • Is there a way to navigate (TOC) within a video without SWF?

    My project requires that we do not use Flash. Is there a way to create bookmarks/TOC inside a video without using Flash/SWF? I was thinking maybe a PDF, but that bookmarks pages, not within a video.
    Suggestions?

    I created something like it with Captivate in the past so I was going to again. I guess the scope has changed enough that Captivate is not the right tool. But I thought it was worth asking in case a Captivate user has had a similar need and might have some advice in how I can accomplish this. I don't know much about video editing, but in my research, I haven't yet found a way.

  • Loading external swf, how to deal with errors within the loaded swf?

    I have a Flex app that basically lets you browse a bunch of thumbnails that represent swf files, when you click a thumbnail it opens a window that loads the actual swf into an image control. The problem I have is that these swfs can be uploaded by our clients, so they may have actionscript errors being thrown, etc. We can't really predict what they may do. Is there a way I can load these swf in such a way as to ignore any errors that the loaded swf may generate within itself.
    For example, one such swf reads some text from a text file to display, but when they are viewing it in this manner the file isn't there so a stream error is generated. My parent Flex app doesn't care about this error and I don't want to see it thrown up in an actionscript error box (I have debug verison loaded on my PC obviously) or interfere with the parent app in any way.
    Would application domains help at all? Would it make a difference if I loaded the swf into a separate domain? Or is there some way I can generically trap any error coming from the loaded swf and just ignore them?
    Any help appreciated.
    Thanks,
    Marcus

    There is no way to catch errors thrown at random times.  Remember that most folks have the release player which does not show error dialogs.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • SWFloader loads SWF movie within Flex but not when compiled

    When I run my app in Flex, SWFLoader loads the SWF okay as a movie clip but as soon as I Export/Release Build, the new app SWF that is generated won't show the movie clip anymore.  If I take another SWF that is an app (not a movie clip) and give it the movie swf name, my compiled app will show the sub app in a frame.  Why would running something within Flex be any different than running a compiled version?
    Here is some of the code:
    button1 loads the swf.
    button2 loads a sound and when the sound is loaded, the sound is played and the swf is played in onSoundLoaded();
    public  function onSoundLoaded(event:Event):void{
    var localSound:Sound = event.target as Sound;localSound.play();
    var clip:MovieClip = MovieClip(swflodr.content);
    clip.play();
    private  
    function button1Handler(event:Event):void {Alert.show("test 1");swflodr.load(
    "dog.swf");Alert.show(
    "test 2");}
    private  
    function button2Handler(event:Event):void
    var s:Sound = new
    Sound();s.addEventListener(Event.COMPLETE, onSoundLoaded);
    var  
    req:URLRequest = new URLRequest("test.mp3");
    s.load(req);
     private function SwfLodrEventHandler(event:Event):void { 
    var clip:MovieClip = MovieClip(swflodr.content);clip.gotoAndStop(1);
    Alert.show(
    "The event loader is ready");}
    thanks, Mike

    Maybe timing?  The child SWF may not be fully loaded.  Sounds and SWFs are asynchronously loaded.
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Inserting swf within a swf

    I am creating a Captivate project, basically, as a shell with
    5 slides. Within each slide, I would like to insert swfs that I
    have previously published. As a result, each of the 5 slides will
    play while the embedded/inserted swf plays within. Have you ever
    tried to do this? It seems to work only if I don't include a
    skin--but I would like to include a skin on each of the swfs that I
    have inserted.
    Any ideas? Thank you.

    quote:
    Originally posted by:
    jdmosley
    How do you revert a project back to Captivate 3 when you hit
    a Captivate 4 limitation? Is there a simple way? I made a ton of
    changes in Captivate 4 and don't want to have to re-do them with
    the previously saved Cap3 version of the project. Thanks!
    You could copy/paste the slides from CP4 to CP3 - we just did
    that with a project. It doesn't retain all the slides settings (I
    think the buttons / goto slide etc) needed to be configured again,
    but it still beats having to redo the project from scratch in CP3
    ;o)
    quote:
    Originally posted by:
    isv2009
    Thanks for your reply.
    It seems to work whenever the embedded swf does not have a
    skin... and not work with a skin on it. Have you tried both cases?
    Sorry no I haven't tried this with swf's with skin. I just
    saw that your original question actually stated that, but I missed
    that part. I would imagine that a skin with a second playbar could
    mess things up in Captivate.
    If you have Flash skills an idea could be to make a simple
    "loader shell" which loads the animation you wish to import. That
    way the levels of the two playbars would be seperated even more and
    perhaps it would work.
    /Michael

  • Track completion of embedded swf within captivate project

    I have a swf created within captivate 4 which is a traiining simulation.  Now I want to embed this simulation on a screen within a new host captivate project and enable the next progress button only when the embedded training simulation is done. What is a good way to do this?
    While trying different options, a problem I am running into is the embedded training simulation does not close when all the interactivity is done even if the swf publish options are set to close upon completion.  It wants to run for a set time. Any ideas are much appreciated.

    Hi Gaspar,
    Are you using a preloader for the project? If so, the default
    one in Captivate waits for 60% of the project to load before
    playing. Perhaps try to add the preloader if you aren't using one,
    or remove it if you are to see if that makes a difference. In
    Captivate 3, you can change this option in Preferences -->
    Project --> Start and End --> Loading Screen.
    Good luck,
    David
    Edit: I just tried this too and got the same results when
    publishing with all versions of Flash - I was a little surprised to
    see it even with Flash 7 exports, because Captivate has let me
    embed .swf animations into a single .swf project file using Flash
    7. I'm guessing that whatever Flash "engine" Captivate uses to
    create its own FMV .swfs must be Flash 8 or 9. That would be
    something that would be nice to adjust - especially because of the
    lack of the ability to merge .swf files into one file. I guess I'll
    send a feature request again...

  • (MX04) Pausing a loaded swf with sound objects within it

    Hi,
    I'm working on a PowerPoint-esque presentation where a user
    watches and listens to a loaded swf in the main movie, clicks the
    next button (which unloads the swf, advances to the next frame and
    loads the next swf), and watches the next one. Lather, rinse,
    repeat. Some of the sections are rather long, and I'd like to give
    the user the ability to pause and play by button click.
    I know how to stop and start the container MC, but that
    doesn't stop the sound object (and the embedded MCs). I also know
    how to pause and start a sound object using the object's instance
    name. Is there a way to pause everything from the main timeline,
    and keep the AS general enough so that any sound object pauses when
    clicked?
    Any help is most appreciated! MX04 and AS2.0.
    Thanks!

    Kglad,
    I tried your code and ran into some problems with stopping
    the mc's, as the embedded mc's within the loaded swf need to stop
    as well. I found the attached code to stop the mc's, but now am
    having trouble with the sound objects.
    Here's the issue, I used this:
    this.soundPosition = currentMovie.loop1.position/1000;
    this.currentMovie.loop1.stop();
    ... for the sound object stop commands and listed a new one
    for each loop I was using. On the play button I started them back
    up again. This all works, but when I start them up again they all
    play, not just the one that is currently paused. Do you mind giving
    me some guidance with the for (obj in mc) loop? My loop experience
    is nil. What I want to do is have the code cycle through all of the
    loops to see which one is playing, then store that information in a
    variable, then pause and play the variable. Does that sound right?
    Thanks again for the help!
    -Sandy

Maybe you are looking for

  • Web links in .pdfs inoperable- "Acrob. could not run the browser"

    I keep my Adobe Reader updated often, but I've been experiencing a severe inconsistency with the ability to open a (FFox) web page by clicking a link given by the author of any given .pdf., embedded in it. Sometimes it works and opens up the new FFox

  • Cold fusion files not compile by  the cfcompile utility

    Hi, I am trying to compile coldfusion file using cfcompile , but not find the compiled file in the output-directory. here some help about what i did: coldfusion mx 7 load on linux, and coldfusion files exist in the directory that exist in a directory

  • Overriding paintComponent ?

    Hello, I'm working with some JScrollBars, but I want to give them a more unique look, because it's for use in a game. But I'm not sure how to repaint them. should I override the paintComponent method, and how will I know all the dimensions of al the

  • How to create/setup/configure

    I am trying to create Active Sync, so as to synchronize and UPDATE all the data for each user across 2 different Resources. I know that there is documentation on this somewhere. But, I can't find it. I've searched through Sun's forums, and online doc

  • Block transfer when material is reserved for SO

    Hi All, - When I create SO1 -> outbound delivery for material A with batch number 111 in storage location X   That batch is reserved for SO1. - After that, someone use MIGO-transfer batch 111 to other location Y. So when I Post Good issue for SO1, I