5 Replies Latest reply on Nov 15, 2007 6:52 AM by joeflashTO

    super novice questions

      Hi Gang, my apologies right up front...just started learning flash one week ago...but read a book or two in advance. My question (s) revolve around AS3.0 ... as I continue to learn I've hit a major stumbling block in AS3.0...

      Project description: Building a site for my professional photography. I want to click a button (Iknow how to make these and instances of them), titled, "Weddings." I need a container (movie clip symbol????) that will then show a slideshow I created in another piece of software, but an .swf file. I'll have three buttons total, to load three different slideshows (Weddings, Commissions, Special Events). Would the code be essentially the same regardless of whether I'm loading a slideshow or a jpg?

      Would some be so kind as to provide a basic AS code for me, and advice on the type of container I use to place and dispaly the slideshow? THANK YOU!!!!!!!!!
        • 1. Re: super novice questions
          kglad Adobe Community Professional & MVP
          yes, the code's the same for loading a swf or jpg: use the loader class.

          you don't load into container objects in as3. you load using a loader and you add your loader to the display list so your loaded swf will be visible.

          if you need to communicate with assets inside your swf, you'll probably need to use localconnection which may be problematic if a non-flash application created your swf.

          in any case, read about the loader class, check the example(s) in the flash help files and if you have trouble adapting their code to your specifics, copy and paste your code using the attach code option.
          • 2. Re: super novice questions
            You should have no problems communicating with properly referenced assets and code inside your loaded SWF, if the main SWF is in AS3 and the loaded SWF is also in AS3. What kglad is referring to with localconnection is, if your main SWf is AS3 and the loaded SWF is AS2, then you've got to use some fancy hacks to get around compatibility issues between AS3 and AS2 SWFs. My rule of thumb regarding AS3/AS2 communication (sometimes referred to as VM1/VM2 communication): don't do it. It's a pain, and the workarounds are complex, nasty kludges.

            So my recommendation would be to upgrade the code for your slideshow to AS3, and then reuse that with your new site. Or just author the whole thing in AS2. Just because there's a new version of the language, you don't have to use it becuase it's 'the latest thing', unless you need some very specific AS3-only functionality. Unless you have the luxury of using this project to advance your personal learning curve, then by all means, AS3 is the way to go.
            • 3. Re: super novice questions
              Alec_Johnson Level 1
              Thanks to both for the excellent advice.
              • 4. Re: super novice questions
                kglad Adobe Community Professional & MVP
                you're welcome.
                • 5. Re: super novice questions
                  joeflashTO Level 1
                  no problem.