30 Replies Latest reply on Jan 20, 2009 8:05 AM by kglad

    2.0 help

    Novasc Level 1
      Hi Everyone;

      I hope you can help. I have a website built in flash and on the main page that you first land on there are 4 squares ( movie symbols) right now, you have to roll over them for the external swf to play. I have been trying to get them to automatically start playing when you first land on the page. I am pretty sure this is an action script function but I can't seem to find the correct one. I am getting rather frustrated with it.

      FYI: This is a template site I purchased and basically have been teaching myself flash by modifying the template.

      Can someone please enlighten me on the correct action script to use?

      Cheers
        • 1. Re: 2.0 help
          kglad Adobe Community Professional & MVP
          there must be code somewhere that executes when the squares are rolled-over and that code must load your external swf.

          that code should be attached to the main timline but that's assuming some minimal skill on the part of the template's creator and that assumption is not always justified.

          if you can find that code and attach it to the main timeline's frame, it will load your external swf when the main swf loads.

          you can use the actions panel search function to check for "load".
          • 2. Re: 2.0 help
            Novasc Level 1
            Hi Kglad;

            Actually the rollover code was put in by me in the behaviours option. What I want to do is have a code that will auto load the external swf so you don't have to rollover or press it ,etc....

            But I will take your advice and search for load, its greatly appreciated. I have posted on many forums and your the first person to actually help with this issue. Am I using the wrong wording? or is this type a problem something that should be known by default?

            Thanks very much. I will let you know how it works out.

            Cheers
            • 3. Re: 2.0 help
              kglad Adobe Community Professional & MVP
              your last post is confusing. in your first post you stated "...you have to roll over them for the external swf to play." and in your 2nd post you said, "...the rollover code was put in by me..".

              if both are true, you must know what code to use to load the external swf. ie, you entered the loadMovie() (or loadMovieNum() or loadClip() ) code so you should know where to find it and you should be able to attach it to the first main timeline frame without problem.
              • 4. Re: 2.0 help
                Novasc Level 1
                Hi Again;

                I know it sounds confusing but both statements are true. I managed to get the roll over code in by using the drop down menu for behaviours ( it worked because it wrote the code for me ) As far as getting it to auto load I can't figure it out and I don't know the code. Behaviours does not have that as an option, I wish it did.

                History:

                Started working with flash a couple of months ago ( absolutely zero experience) bought a template because it was suppose to be "EASY" to manipulate for a person with no experience like me ( big time lie on the company promoting the templates) I did learn a fair bit about flash beating my head against it trying to figure it out.

                But I am completely lost when it comes to action scripts, I have been reading various forums, websites etc on the topic. I find actions scripts like calculus... I was lost on that until I found that specific function and then it all fell in place. I am having the same issues with actions scripts... completely lost on them right now until I find that specific function that makes it all fall in place.

                Sorry for the long post, but I wanted to explain why I am asking a question that should probably be relatively easy to accomplish but I am in the dark on the topic at the moment.

                Also another issue I have been trying to figure out is the size of the swf file once it's published, it's around three megs which is causing it load slow on the net.

                Not sure if I am asking to much here but basically I am stuck on two things:

                1: Action script to load the external swf files automatically
                2: Cutting down on the swf size

                Any advice you can offer would be greatly appreciated. I am not asking you to do it for me, I really want to learn how to do this because I thoroughly enjoy working with the program, I need someone to help me turn on the "light" so to speak so I can figure out the all important function.

                Thanks and once again I appologize for the babbling.

                Cheers
                • 5. Re: 2.0 help
                  kglad Adobe Community Professional & MVP
                  what's the rollover do?
                  • 6. Re: 2.0 help
                    Novasc Level 1
                    The rollover is setup to load an external swf file ( the swf is just pics that loop - nothing special really). The external swf file loads into a movie clip that I created.

                    I hope I am making sense...

                    Cheers
                    • 7. Re: 2.0 help
                      kglad Adobe Community Professional & MVP
                      copy and paste your rollover code using the attach code option in this forum.
                      • 8. Re: 2.0 help
                        Novasc Level 1

                        • 9. Re: 2.0 help
                          kglad Adobe Community Professional & MVP
                          then pick on of the movieclips that you want to use as a target of the load and, click on it and in the properties panel give it an instance name (say mc1) and attach to frame 1 of the timeline that contains your movieclip:

                          mc1.loadMovie("samplelogo.swf");
                          • 10. Re: 2.0 help
                            Novasc Level 1
                            Ok I understand that :-)... will that cause it to autoload? that way no rollover is required? Because I am trying to get it so it doesn't require a rollover. I just want it to start playing the external swf by it self.

                            Sorry if I am sounding completely stunned here.

                            Cheers
                            • 11. Re: 2.0 help
                              kglad Adobe Community Professional & MVP
                              yes, it will autoload and no rollover is required. the playhead entering the frame that contains that code will cause the code to execute.
                              • 12. Re: 2.0 help
                                Novasc Level 1
                                Thank you so much. I will give it a try this weekend.

                                • 13. Re: 2.0 help
                                  kglad Adobe Community Professional & MVP
                                  you're welcome.
                                  • 14. Re: 2.0 help
                                    Novasc Level 1
                                    Hi Again;

                                    I typed in the following for action script:
                                    r1c1.loadMovie("samplelogo.swf");

                                    Then I got compiler errors saying you need onClipEvent so I tried adding that
                                    onClipEvent (r1c1.loadMovie("samplelogo.swf);) {
                                    }


                                    and get:
                                    Clip events are permitted only for movie clip instancesonClipEvent (load) { ( even though r1c1 is a movie clip instance)
                                    Invalid movie clip event specified.onClipEvent (r1c1.loadMovie("samplelogo.swf);) {

                                    I just don't understand the language I guess... hopefully comes with experience...

                                    Is there a glaring error here that I just dont see?
                                    • 15. Re: 2.0 help
                                      kglad Adobe Community Professional & MVP
                                      again, "...attach to frame 1 of the timeline that contains your movieclip":

                                      mc1.loadMovie("samplelogo.swf");

                                      do not attach to an object.
                                      • 16. Re: 2.0 help
                                        Novasc Level 1
                                        Ok.. I gave the movie clip an instance name in the properties: r1c1

                                        I basically find the movie clip in: scene1 / symbol 28. In symbol 28 there 6 layers ( Layer 1 / Item 1,,2 etc to 5) I tried putting it on the item 1 layer frame 1 ( no errors but nothing happened either) (this is the layer and timeline that contains the movieclip)


                                        I then tried putting it in: scene 1 / menu layer / frame 1 ( no errors but nothing happened.



                                        I assume no errors is good right? just it's in the wrong spot? I am only putting in: r1c1.loadMovie("samplelogo.swf");

                                        no what??? I have to be missing something
                                        • 17. Re: 2.0 help
                                          kglad Adobe Community Professional & MVP
                                          don't go to symbol 28's timeline.

                                          on the main timeline, click on symbol 28 and in the properties panel there will be a input box where you can enter an instance name. that's where you enter r1c1.

                                          and while still looking at the main timeline click on an empty part of the stage and paste your code in the actions panel.
                                          • 18. Re: 2.0 help
                                            Novasc Level 1
                                            That worked like a charm, thank you.

                                            This issue that is happening now when I do that is everything else doesn't show itself> ie: 4 menu button, etc. Can I have more actions on that frame to play everything else? or are you restricted to just one action?

                                            Cheers
                                            • 19. Re: 2.0 help
                                              kglad Adobe Community Professional & MVP
                                              you can have as many as you want. but r1c1 won't be visible once that loadMovie() code executes.
                                              • 20. Re: 2.0 help
                                                Novasc Level 1
                                                Not quite sure what you mean...but i will try and add all my stuff either tonight or tomorrow. Thanks again for your help and I will let you know either way if I break it or I manage to get it to work.

                                                Cheers
                                                • 21. Re: 2.0 help
                                                  kglad Adobe Community Professional & MVP
                                                  you're welcome. and good luck.
                                                  • 22. Re: 2.0 help
                                                    Novasc Level 1
                                                    Morning;

                                                    I can't seem to get more than just that one to load... really not sure what to do now. If I get that one to load automatically nothing else shows and I tried to add other action scripts for the other parts but nothing happens and the whole website actually shrinks in size...

                                                    Is there any other way to get the autoload to work other than putting it on the one area your talking about?

                                                    I am getting to the point where I think I am going to have to completely rebuild from scratch. The other issue I have been having with this template is that it has been loading slower and slower as I modify it.

                                                    Thanks for your help.

                                                    Cheers
                                                    • 23. Re: 2.0 help
                                                      kglad Adobe Community Professional & MVP
                                                      is there any difference between what occurs when you rolled over a button and that external swf loaded and now when the external swf loads after opening your app?
                                                      • 24. Re: 2.0 help
                                                        Novasc Level 1
                                                        Basically what is happening when I put in this: r1c1.loadMovie("samplelogo.swf"); on the main timeline, it plays but the whole menu layer disappears. I will pm you a link to it online so you can see what I have now. I haven't saved it yet with the new code because I don't save until I get to work the way I need it.

                                                        Cheers
                                                        • 25. Re: 2.0 help
                                                          Novasc Level 1
                                                          Here is a link to the html file if you want to see what I am talking about. Essentially the 4 black squares need the autoload of the external swf. But when i add that code... the all the menu stuff disappears.

                                                          http://www.spotcheckservices.com/~~~newspotcheckweb/steel/Index_Engworking09titlesandlogos pots.html

                                                          Any ideas?

                                                          Thanks again.
                                                          • 26. Re: 2.0 help
                                                            kglad Adobe Community Professional & MVP
                                                            i see 4 black squares that have no rollover code (that's apparant). they have onPress code that causes a sequence of images to appear.
                                                            • 27. Re: 2.0 help
                                                              Novasc Level 1
                                                              thats strange... I just double checked and it's a rollover code...hmmm.
                                                              • 28. Re: 2.0 help
                                                                kglad Adobe Community Professional & MVP
                                                                clear your cache and retest.
                                                                • 29. Re: 2.0 help
                                                                  Novasc Level 1
                                                                  Hi Again;

                                                                  Just wanted to thank Kglad for all of your help. I managed to figure it out and took a different approach at the issue. I created a movie clip on the menu layer for each black square and then just added the rotating pics in the layers of each clip.

                                                                  Thanks again for your help and patience with this newbie.

                                                                  Cheers
                                                                  • 30. Re: 2.0 help
                                                                    kglad Adobe Community Professional & MVP
                                                                    you're welcome.