Loading as2 swf files into as2

i had load my swf file with as2 and i like to add controls like play pause stop time slider for its pls help me with some examples ........................

use google to search for a tutorial about as2 timeline control.
if you need help with code you're trying to implement, ask here.

Similar Messages

  • Can I combine two methods of code to load various SWF files into the same location

    I presently have a set up where a large SWF file brought on the stage by clicking small icons from the scrollable thumbnail menu on the bottom of the stage. All of it happens at the same frame with .xml loading file.
    Here is the code for constructing the ImageLoader(for thumbnails) and SWFLoader for (bigger SWF files)
    [CODE]
       function _xmlCompleteHandler(event:LoaderEvent):void {
       _slides = [];
       var xml:XML = event.target.content; //the XMLLoader's "content" is the XML that was loaded.
       var imageList:XMLList = xml.image; //In the XML, we have <image /> nodes with all the info we need.
       //loop through each <image /> node and create a Slide object for each.
       for each (var image:XML in imageList) {
        _slides.push( new Slide(image.@name,
              image.@description,
              new ImageLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/thumbnails/appThmb_imgs/" + image.@name + ".jpg",
                   name:image.@name + "Thumb",
                   width:_THUMB_WIDTH,
                   height:_THUMB_HEIGHT,
                   //centerRegistration:true,//messes up the code as places SWFLoader in the upper left corner which is 0,0 coordinates
                   //x:260, y:320,//doesn't work here but works in line 69
                   scaleMode:"proportionalInside",
                   bgColor:0x000000,
                   estimatedBytes:13000,
                   onFail:_imageFailHandler}),
              new SWFLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/images/" + image.@name + ".swf",
                    name:image.@name + "Image",
                    width:_IMAGE_WIDTH,
                    height:_IMAGE_HEIGHT,
                    //centerRegistration:true,//messes up the code as places SWFLoader in the upper left corner which is 0,0 coordinates
                    x:0, y:144,
                    scaleMode:"proportionalInside",
                    bgColor:0x000000,
                    estimatedBytes:820000,
                    onFail:_imageFailHandler})
    [/CODE]
    Here is what I would like to resolve. I have another section on the site with an image collage. Every image is a button. I want to script this each image on click to go to the label with ImageLoader and SWFLoader AND TO OPEN A UNIQUE SWF (ASSOCIATED WITH AN IMAGE CLICKED) ON THAT PAGE
    Previously this is what I did to achieve it. I would specify a String:
    [CODE]
    var sourceVar_ProductsPopUps:String;
    [/CODE]
    and then all my buttons will have their unique SWF assigned for them which opens at another labeled section ("prdctsPopUps" in this example):
    [CODE]
    function onClickSumix1PopUp(event:MouseEvent):void {
      sourceVar_ProductsPopUps="prdcts_popups/sumix1-popup_tl.swf";
      gotoAndPlay("prdctsPopUps");
    [/CODE]
    Then in the "prdctsPopUps" section I would specify that var string to bring up SWF files. The value of sourceVar_ProductsPopUps allows to load mulitple SWFs from the previous page.
    [CODE]
    loaderProductPopUps = new SWFLoader(sourceVar_ProductsPopUps,
    [/CODE]
    But I need both of them to be working at the same time. First there is a sectionA from where a user can navigate to specifically targeted SWF to section B's SWFLoader. Then in the section B a user has an option to bring up other SWF files into SWFLoader from the scrollable thumbs menu. Is there a way to combine these two lines into one:
    [CODE]
              new SWFLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/images/" + image.@name + ".swf",
    [/CODE]
    and
    [CODE]
    new SWFLoader(sourceVar_ProductsPopUps,
    [/CODE]

    Thanks for looking into my issue.
    Unfortunatelly I am not so advanced in AS and do not complitely understand the logic of the problem. I will try to decribe my set up more precise.
    So, my main flash file is broken into labeled sections on the main time line.
    One of the sections is "Applications" It has an animated collage of images. Each image acts as a button and once clicked brings a user to a section called "ApplicationsPopUps".
    "ApplicationsPopUps" section has small image thumbnails scroll menu at the bottom of the screen and a large SWFLoader in the middle of the screen. User can click on an image in the thumbnails scroll menu and a corresponding SWF file will load in the middle of the screen in SWFLoader. User can click on left/right navigation buttons and preceeding/following SWF file will load in SWFLoader.
    Everything works fine (with your previous help)
    Here is the working code for the ImageLoader and SWFLoader (please let me know if you need additional code on the page):
    function _xmlCompleteHandler(event:LoaderEvent):void {        _slides = [];       var xml:XML = event.target.content; //the XMLLoader's "content" is the XML that was loaded.        var imageList:XMLList = xml.image; //In the XML, we have  nodes with all the info we need.        //loop through each  node and create a Slide object for each.       for each (var image:XML in imageList) {         _slides.push( new Slide(image.@name,               image.@description,               new ImageLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/thumbnails/appThmb_imgs/" + image.@name + ".jpg",               {                    name:image.@name + "Thumb",                    width:_THUMB_WIDTH,                    height:_THUMB_HEIGHT,                    //centerRegistration:true,//messes up the code as places SWFLoader in the upper left corner which is 0,0 coordinates                    //x:260, y:320,//doesn't work here but works in line 69                   scaleMode:"proportionalInside",                    bgColor:0x000000,                    estimatedBytes:13000,                    onFail:_imageFailHandler}),                 new SWFLoader("loadingAssets/appThumbnails/slideshow_image scroller greenSock_mine/assets/images/" + image.@name + ".swf",                   {                     name:image.@name + "Image",                     width:_IMAGE_WIDTH,                     height:_IMAGE_HEIGHT,                     //centerRegistration:true,//messes up the code as places SWFLoader in the upper left corner which is 0,0 coordinates                   x:0, y:144,                     scaleMode:"proportionalInside",                     bgColor:0x000000,                     estimatedBytes:820000,                     onFail:_imageFailHandler}) 
    Thumbnails in the section "ApplicationsPopUps" and images in the image collage in the section "Applications" represent the same photographs. So when a user clicks on one of the images in "Applications" section it would be natural that that image will load in the "ApplicationsPopUps" section. However "ApplicationsPopUps" section presently has a working code (as sampled above) It looks too complex for me and I do not know hot to implement this feature. I do want to keep the functionality of the thumbs image scroller in section "ApplicationsPopUps" as it is now. But I want to add that when a user click on an image from section"Applications" then that particular SWF file will load in SWFLoader in section "ApplicationsPopUps" and then the present functionality can as well be exectuted. Presently it just opens on a first image in xml order.
    P.S. I see that you had a download link in your answer. How did you do it? I could also upload a small sample file with my problem. This way you could see all the set up right away.

  • Is it possible to Load External SWF files into Flex Mobile projects?

    Hi Guys,
    I'm trying to load an external asset in this cse (a SWF file) into my flex project (Apple IOS IPAD), don't get any luck. Can any one suggest a solution ?

    In Apple's words, "No interpreted code may be downloaded or used in an Application except for code that is interpreted and run by Apple's Documented APIs and built-in interpreter(s)".
    Hence external swfs cannot be loaded in iOS.

  • Load external SWF file into another SWF

    Hello all.
    I've tried loading a .swf file externally into another .swf file on my  local drive, and it works. Now, when I try to Simulate Download, the  preloader in the 2nd file doesn't get played and the images in there  take a while to get displayed.
    I need to load a .swf file from a server into the parent .swf file(I'm  working on using a "thin flash file" for added security for the company I  work for - blank file which loads the content from another file on  their server).
    So far, I have:
    try
        var myLoader:Loader = new Loader();
        addChild(myLoader);
        var url:URLRequest = new URLRequest("newBook.swf");
        myLoader.load(url);
    catch (e:Error)
        trace("ruhroh");
    When I replace the "newBook.swf" with the URL of another .swf, there's just a blank page.
    I'm not too sure how to proceed, and I hope you will be able to help me out. I'd greatly appreciate the help.
    Many thanks,
    -Nazgul

    What happens is...when I set the speed to DSL(32.6kbps), the screen is blank and the preloader doesn't show up. It just goes directly to the Main screen. And then, the pages inside don't get loaded properly.
    This only happens when I try to Simulate Download.
    But that's not really the problem. I need to load a .swf file from a server into another .swf file, and just adding the link to the child .swf isn't working.
    Anyway, thanks for your help
    -Nazgul

  • Loading as3 swf files into as2

    im having a problem..i,e. i need to load an external swf which is in as3...and need it to be played in my as2 swf layout. with a time slider ,play, pause ,next, previous for that swf movie clip. pls give ur mail id i can sent my original files....................pls help me
    pls give ur mail id i can sent my original files.................[email protected] pls help me am doing my final year college ..........download tis jpg image and convert to rar r zip file.....project

    You'r not able to load as3 files into as2 files.

  • Problem when load more swf files work with xml files into my movie

    hi ;
    I have one flash file & more of swf files which work with xml files .
    when I load one swf file into my flash file  and remove it and load anther one on the same movieclip in my flash file it load the old swf file.
    when i load one on movieclip and remove it and load anther swf  on anther movieclip the file doesn`t work  and stoped.
    when test my flash file to load and remove swf files without xml file it work fine but when repleaced the swf files with other work with xml files the problem hapend.
    thanks;

    YOu should trace the names of the files that are being targeted for loading to see if they agree with what you expect.  If you want help with the coding you will need to show the code that is relevant to your problem (not all of it)

  • Dynamic swf file into dreamweaver cs4

    Good evening to all,
    Can a basic slide show created in Flash cs4 using as2 to load the images dynamically be inserted into a Dreamweaver cs4 page ?
    The swf file shows up but I can't figure out where to put the linking images so the 2 basic "next" and "previous" buttons work ?  
    Thank as always,
    Fred...

    When you load the swf file into the html page, that becomes the swf's reference for loading files.  So if your structure has a folder containing the html file and another folder for the flash file and another folder for the images, as in...
    main_folder...
         - html file
         - flash folder
              - - flash file
         - images folder
              - - image files
    then you need to change where the swf file is looking for the images because when it is in the html page, that is essentially the folder it is trying to get the images to load thru.
    For instance, if you originally tested using Flash with the swf file targeting the images using...
    "../images/imagefile.jpg"
    (or something like that... those dots confuse me at times)
    and the structure is as I described, then when testing in the html file the targeting would need to be changed to...
    "images/imagefile.jpg"
    Just think of the swf file as living in the html file's folder as far as targeting any files it needs to load, because once it is loaded into that page, it has basically moved to that new location.

  • How to load an AS3 swf file into a AS2 swf file?

    Hi,
    i am trying to display a swf file using AS3 in a flash site which uses AS2. I know that loading the swf file in the normal way, into a dummy movieclip (loadMovie) or into a new level (loadMovieNum), doesn't work. The AS2 based flash site doesn't understand the new file. Is there another way to get around this problem?
    Many thanks
    92 North Ltd
    Leeds website, graphic and web banner design
    Phone 0113 815 1158
    http://www.92north.com

    Thanks kglad. Will give that a try
    92 North Ltd
    Leeds website, graphic and web banner design
    Phone 0113 815 1158
    http://www.92north.com

  • What is the code to load a .swf file in AS3 on the same layer?

    I'm new to AS3 and am trying to figure out the code for loading a .swf file on the same layer of the same page, thereby replacing all of the information. I don't want to put it on layer 2, etc. Another easy thing I can do in AS2 but am struggling with in AS3.
    thanks!
    Steve

    There are no 'layers' in AS3 - there is just the display list. You can use addChildAt to add things at a specific depth - thereby placing it behind or above something, but if you just use addChild it goes on top of whatever is currently there...
    Anyway - to answer your question, you can load a .swf with a Loader object like so:
    var l:Loader = new Loader();
    l.load(new URLRequest("myFile.swf"));
    addChild(l);
    You can wait for complete like was shown, but you don't have to. And this will not 'replace' anything - it just loads myFile.swf on top of anything currently being shown. If you want to 'replace' what's there you need to remove it first:
    while(numChildren){
         removeChildAt(0);

  • Embedding SWF file into an Indesign document and later export as PDF

    Hi to everybody,
    I am searching now since 3 days for good solution of my problem. First I wanna tell you that the problem is not just to convert a swf-file into a pdf.  I did this many times with all animations, page flip and stuff.My situation is the following:
    I have varios catalogues with  more or less 12 pages each in an indesign format. Now I created an animated scroll down menu, which appears on an "index-page". On the menu I created buttons. One button for each catalogue. So the idea of the whole thing is to open a document and an index page appears where you have the animated menu and you choose the catalogue you wanna see. Until here it is quite easy. I created a swf file of each catalogue with my animations (as the special page turnover e.g.). So that I just need von Object in with I can load the different swf-files of these catalogues. I already did the process. I linked the buttons to the different swf files and so. So the problem is now when it comes to convert the whole thing into a PDF. Of course I convert it first to swf and then to PDF. After converting it to swf it works 100% fine, but in PDF not, suddenly the swf-files of the catalogues disappear.
    So the summary is, that I don't know how to embed swf files into an indesign document, creat buttons and interactions next to swf file, then save it to another swf, and then to a pdf without losing the first swf files within the pdf.
    Hope I made my self clear would be too nice if someone could help me or if someone may have a better idea of realizing the whole project.

    Jeffrey,
    Thank you for the answer. As you have written:
    I will also add that the ID's play mode contol [plays once] [repeat play] does not always control the file once in Acrobat.
    I presume you mean version of ID older than CS4 or version of Acrobat Reader older than 9.1
    It that is the case I will strongly recommend my visitors to upgrade to this version.
    I hope that would work.
    Thanks again.
    Peter

  • Loading local swf files from Application Dir (ios)

    Hi Guys,
    I would like to load additional local swf files to my ios release build but I am confused a little bit because of the new API changes.
    As far as I know at the moment (from Air 3.7 or newer) it is allowed to load local swf files that contains compiled actionscript both from local folder and from a predefined remote host as well. 
    My assumption based on this article:
    http://blogs.adobe.com/airodynamics/2013/03/08/external-hosting-of-secondary-swfs-for-air- apps-on-ios/
    I created the text file to include all of my local swf file names and created the following node in the application.xml:
    <iPhone>
           <externalSwfs>assets/SampleSWFInfoFile.txt</externalSwfs>
    </iPhone>
    When I compile the release build (ipa) using command line adt, it converts all of my local swfs into the stripped swfs which is perfect, but even though I include all the swfs in the compiler command, it puts only the SampleSWFInfoFile.txt file into the assets folder in the ipa but not the swf files.
    I assume, it thinks I will load these files from an external host, but I would like to include them in the app itself.
    I tried to copy the stripped swf files from the externalStrippedSwfs folder and comment the <externalSwfs>assets/SampleSWFInfoFile.txt</externalSwfs> node in the application.xml and compile it and this way it puts the swf files into the ipa, but when I try to install and launch the app it crashes and when I test it using Flash Builder it shows an error message
    "VerifyError: Error #1042: Not an ABC file."
    Do any of you guys know the  solution for this problem?
    Thank you for your help in advance!

    You're publishing in AOT mode as long as you use one of these:
    The AIR Developer Tool or ADT has targets that lets you package apps either for the AOT mode or Interpreter mode. The targets for packaging in AOT mode are ipa-app-store, ipa-ad-hoc, ipa-test and ipa-debug.
    Flash Pro CS6 and Flash Builder automate this process pretty well so it's invisible but the SWF loads and executes code just fine for me when directly published.
    If I take it to command line I can use this to compile successfully (iPad test app):
    adt -package -target ipa-ad-hoc -storetype pkcs12 -keystore my.p12 -provisioning-profile my.mobileprovision NameOfApp.ipa NameOfApp-app.xml NameOfApp.swf iTunesArtwork iTunesArtwork@2x AppIconsForPublish swfs/swfs.txt swfs/GenerateText.swf
    I at least include generic icons in there but I made a 'swfs' folder and placed 'swfs.txt' and 'GenerateText.swf' in there. The SWF uses code to randomly generate text and changes every second using a Timer. I load it in using the same code you do with the ApplicationDomain.currentDomain context. I see the SWF appear and text start randomly changing.
    As I compile there's a folder generated called 'externalStrippedSwfs' with the stripped SWF in there.
    One thing to note is I do not supply <externalSwfs>swfs/swfs.txt</externalSwfs> in my iPhone settings. If I do that it doesn't work. I supply the path to the text file containing the SWF I want to be stripped to adt itself along with the SWFs I want stripped and it takes care of the rest.

  • Getting .CP or .Swf files into .FLV

    Hello:
    I used Captivate to create 3 e-learning modules. My hope is
    to deliver them via web. When enclosing the SWF files into a web
    page, the application takes **FOREVER** to load (3 minutes). So,
    after looking into retaining a streaming web host, I discovered
    that I need an .FLV file to stream adequately.
    Exporting my .CP files to Flash 8 results in drastically
    degraded quality and un-synched audio and animation. Exporting the
    .FLA file to .AVI is even worse. I can't seem to de-compile my .CP
    file to any other Flash application in a way that maintains the
    qualtiy. The SWF files are beautiful, but they can't be used to
    stream.
    Does anybody have any answers?

    Hi, TriSys G!
    If I'm understanding "lightning speed" playback of embedded
    .swfs, it sounds like a frames per second (fps) mismatch. By
    default Adobe Captivate records and plays back at 30 fps. However,
    if the .swf you are inserting as animation was created at a
    different fps rate, you can end up with the scenario you outline.
    The best solution would be to go back to the original
    developer of the .swf and have them re-compile at 30 fps. Of course
    the developer may not be available.
    The alternative is to go the other way. If you know the fps
    of the swf you are embedding, you can adjust your movie's frame
    rate to match the .swf. Here's the command path for that:
    Project>>Preferences>>Preferences>>Frames Per
    Second.
    BTW, since this thread was created to answer a different
    question, next time I'd suggest create a new topic so we can see
    more quickly
    john

  • Insert Photoshop Web Gallery swf file into Dreamweaver

    So i tried to take a shortcut, and created a flash photoshop
    web gallery and placed the "gallery.swf" file into my html file in
    Dreamweaver. However, it is showing a blank white screen (i'm
    guessing it can't find the images?) but when I view it on my hard
    drive, it is working fine, just not in dreamweaver or any browser,
    even after I upload to my server. Any help would be GREATLY
    appreciated!! I've also tried pasting the body html code from
    "index.htm" that photoshop creates, as well as move my image files
    to the root folder where the swf is, but that doesn't work either.
    I have my scripts in the same directory, and not in
    subfolders.

    Kizat727 posted in macromedia.dreamweaver:
    > and the link is
    >
    > www.micromediapubs2.com/dyers/portfolio.html
    That page is very different from the code you posted and I
    know nothing
    about Geoff Stearns' FlashObject code.
    For the above link, I see nothing in the source code that
    attempts to
    load a .swf file. However, it is linking to
    AC_RunActiveCon.js file in
    the wrong place:
    GET /dyers/assets/flash/pages/AC_RunActiveContent.js HTTP/1.1
    Referer:
    http://www.micromediapubs2.com/dyers/portfolio.html
    HTTP/1.x 404 Not Found
    The file is actually here:
    /dyers/Scripts/AC_RunActiveContent.js
    So if you actually do have a page in the dyers/ folder that
    links to a
    .swf file, just make sure the link to the .js file is
    correct.
    Most likely, change this:
    <script src="assets/flash/pages/AC_RunActiveContent.js"
    type="text/javascript"></script>
    to this:
    <script src="Scripts/AC_RunActiveContent.js"
    type="text/javascript"></script>
    Mark A. Boyd
    Keep-On-Learnin' :)

  • Using a container to load several swf files and play them

    I need some help. I want to use several swf files and have them be called upon in a container file and play them in sequence. It's a presentation that needs to play thru but still have the ability to stop, click on items, open a popup and then continue on in the presentation. I am building all the individual "chapters" and their "sub-chapters" as swf files, with the hope that I can load them in order. I am relatively new to AS3. Help?

    If you will be loading swf files into a container then you will use the Loader class to accomplish that, so give that a looking over in the help documents and see what you can do.  If you have a problem getting it to work, post your code and describe what you have done.

  • Importing another swf file into the flash-homepage (swf is a gallery)

    hi there!
    have a problem that i cant resolve myself ..
    i downloaded a free of use gallery from juliuswebdesign.com (this gallery) and i'm trying to load it in my flash site ..
    now, the gallery works if i open it directly (i open the swf file)
    BUT
    when i try to load the external swf file into my site
    loadMovie("image_gallery.swf", box);
    then the movie loads .. the gallery is displayed the message "loading xml file" displays and then when the xml is loaded the message "loading image 1/7" displays and only the first image loads.
    once the first image is loaded it will not be displayed (it remains outside of my swf file .. i can see it when i resize the window) and no other images will be loaded.
    if i open the gallery.sfw file again everything works fine .. the problem is only if i try to load the gallery.swf in another swf ..
    something must be wrong ..
    i tryed to opern the gallery.fla file and copt everything directly in my site and the problem remains the same .. only 1 image loaded and not displayed in the gallery ..
    i'ts like something in my site "blocks" the gallery beeing loaded..
    any suggestions?

    to the gallery's fla add the following and retest:
    this._lockroot = true;

Maybe you are looking for

  • Windows no longer fit

    I have a macbook pro running 10.6.3 and whenever I open a program the image displayed within the program is zoomed in. It isn't the entire screen, so it's not a resolution issue, nor is it universal access or a ctrl+scroll issue. also tried command'/

  • BPC 10.0 NW - Black data cells

    Hello experts, we experienced quite a strange behaviour of our BPC webreports. Some of our reports show black data cells (see screenshot below). The same reports executed in BPC for Excel look perfect. [Screenshot|http://img131.imagevenue.com/img.php

  • Post key from array into value upon submit

    Hello, I am new to ColdFusion and new to this forum, so be kind please.  I have a form the gets a select list from an array and I need the key of the array to post into another hidden field upon submission of the form.  I have some javaScript validat

  • Oracle Behind Firewall

    Hi All, I am running Oracle 9.2 on XP Home and have been for a few years. I connect to oracle from Tomcat using JDBC. I have this running in a datacentre. I now have another box with Tomcat on, and I want to connect to the first box's Oracle. I added

  • HTML file in an Applet

    How can I display the HTML file inside an applet. Somebody please help. Thanks