13 Replies Latest reply on Sep 7, 2006 6:20 AM by Newsgroup_User

    Flash verson 6 versus version 7

    Level 7
      HI! My previous post implied that it was the action script that was causing
      the problems but after some other test it seems its the flash player
      versions that is giving the problems.

      The file was set to version 6 and if I change it to version 7 then I get the
      errors that I wrote about in the previous post.
      does anyone have any clues to what it could be or what to look for in
      version 6 that will not work in version 7 or 8 flash player?

      Paul


        • 1. Re: Flash verson 6 versus version 7
          kglad Adobe Community Professional & MVP
          look for a variable that's incremented or decremented but never initialized and look for case issues like myVar and myvar which were identified in older flash versions.
          • 2. Re: Flash verson 6 versus version 7
            Level 7
            kglad wrote:
            > look for a variable that's incremented or decremented but never
            > initialized and look for case issues like myVar and myvar which were
            > identified in older flash versions.

            HI Thanks for the reply, sorry about not getting back to you sooner. :) I
            will try the suggestion as I do see increments in the cordinates.

            Question: What do you mean about issues of myVar and myvar? do you mean that
            older players did not see the difference between the too? and that now
            players treat the two above var as different?

            Paul


            • 3. Re: Flash verson 6 versus version 7
              kglad Adobe Community Professional & MVP
              yes exactly, myVar and myvar used to be treated as the same variable in flash 6 and earlier flash player versions.
              • 4. Re: Flash verson 6 versus version 7
                Level 7
                kglad wrote:
                > yes exactly, myVar and myvar used to be treated as the same variable in
                > flash 6 and earlier flash player versions.

                HI! Thanks for the reply, Is there any else that might ( other than the
                variable) not work in version 8 of flash player.?

                Paul


                • 5. Re: Flash verson 6 versus version 7
                  kglad Adobe Community Professional & MVP
                  those are the only two issues that i remember seeing cause problems for users posting here.
                  • 6. Re: Flash verson 6 versus version 7
                    Level 7
                    kglad wrote:
                    > those are the only two issues that i remember seeing cause problems for
                    > users posting here.

                    what do you mean when you talk about "variable that's incremented or
                    decremented but never initialized"?

                    Paul


                    • 7. Re: Flash verson 6 versus version 7
                      Level 7
                      Paul wrote:
                      > kglad wrote:
                      >> those are the only two issues that i remember seeing cause problems for
                      >> users posting here.
                      >
                      > what do you mean when you talk about "variable that's incremented or
                      > decremented but never initialized"?
                      >
                      > Paul

                      HI! Do mean like

                      x=2
                      x+1

                      Versus

                      var x
                      x=2
                      x+1

                      Paul


                      • 8. Re: Flash verson 6 versus version 7
                        Level 7
                        kglad wrote:
                        > those are the only two issues that i remember seeing cause problems for
                        > users posting here.

                        Proposal.

                        How much would you charge for correcting and making a templage compatible to
                        flash version 8? I can pay with paypal or credit card.

                        If you wish to see the template first give me your email address. ( you put
                        ? where a letter or dot should be to keep it from bots/extractors )

                        NOTE: replace x with a dot in the email address below.

                        paulxdallaire@sympaticoxca


                        Paul


                        • 9. Re: Flash verson 6 versus version 7
                          abeall Level 3
                          > HI! Do mean like
                          >
                          > x=2
                          > x+1
                          >
                          > Versus
                          >
                          > var x
                          > x=2
                          > x+1

                          x+1 wouldn't do anything. What he mean is:
                          t++;
                          t = t+1;
                          ++t;
                          In AS1.0, if t was undefined, it would act like a 0 in arithmatic, so the above would result in defining t as 0+1, or 1
                          In AS2.0, if t was undefined, it would cause the arithmatic to evaluate to NaN - Not a Number. This means that if used in a loop, like this:
                          onEnterFrame = function(){
                          trace(++t);
                          }
                          In AS1.0 would output:
                          1
                          2
                          3
                          4
                          5
                          ...
                          In AS2.0 would output:
                          NaN
                          NaN
                          NaN
                          NaN
                          NaN
                          ...

                          As you can see, this can cause problems.

                          Also keep in mind that this has nothing to do with Flash Player version, but SWF version and AS setting. You can publish to SWF7 and use AS1.0, if you want. It's in the Publish Settings. If you had working AS1.0, there's no reason to use 2.0 unless you want to add 2.0 code.
                          • 10. Re: Flash verson 6 versus version 7
                            abeall Level 3
                            Actually, there are some remote situations where an SWF6 AS1 file will perform differently than an SWF7 AS1 file. On that comes to the top of me head that I encountered recently is this:
                            var str = "blah";
                            if(str){
                            trace('str has evaluated to True');
                            }

                            In SWF6 AS1, the above outputs nothing, because a str does no evaluate to true, even though it is not empty.
                            in SWF7+ AS1, the above outputs "str has evaluated to True" because a string that is not empty returns true.

                            But I wonder why you want to publish as SWF7 in the first place? What SWF7 features do you want to use or are using that prevent you from using SWF6?
                            • 11. Re: Flash verson 6 versus version 7
                              Level 7
                              abeall wrote:
                              > Actually, there are some remote situations where an SWF6 AS1 file will
                              > perform differently than an SWF7 AS1 file. On that comes to the top of me
                              > head that I encountered recently is this:
                              > var str = "blah";
                              > if(str){
                              > trace('str has evaluated to True');
                              > }
                              >
                              > In SWF6 AS1, the above outputs nothing, because a str does no evaluate to
                              > true, even though it is not empty.
                              > in SWF7+ AS1, the above outputs "str has evaluated to True" because a
                              > string that is not empty returns true.
                              >
                              > But I wonder why you want to publish as SWF7 in the first place? What SWF7
                              > features do you want to use or are using that prevent you from using SWF6?

                              HI! Actually I want to publish as swf8. I want to use the new flv playback
                              component. I already have it working but its only available in version 8 of
                              swf player.

                              The original person who made the template used action script with
                              increamenting cordinates to make certain animations in the flash site. It
                              would take a bit of time for me to understand it and learn how to desifer
                              it.

                              Would you like to take a look at the fla and see if you can fix it? perhapes
                              we can make out payment arangements. email at paulxdallaire@sympaticoxca

                              NOTE: replace x with a dot in above email address.


                              • 12. Re: Flash verson 6 versus version 7
                                abeall Level 3
                                > NOTE: replace x with a dot in above email address.

                                Ironically, x is the problem. No, not in your email, in the .fla. :-) I just took a look, and it was indeed a problem of an undefined variable. Do a search (Ctrl+F, it will anything in your .fla, very handy), for the ActionScript text "trace(_x)" - if you added that trace then you were right on top of the solution - and click Find All. It will reveal the 3 problem areas. Single click them to inspect them. Here's an example:

                                onClipEvent (load) {
                                accel1 =0.7;
                                rate1 = 0.07;
                                trace(_x)
                                _root.xkoord2=105;
                                }

                                onClipEvent(enterFrame) {
                                x=x*accel1+(_root.xkoord2-_x) * rate1; //NaN
                                _x+=x;
                                if(Math.abs(_root.xkoord2-_x)<1) { _x=_root.xkoord2; }

                                }

                                The problem is this line:
                                x=x*accel1+(_root.xkoord2-_x) * rate1;

                                'x' is not defined, so that line always returns NaN. The interesting thing is, it returns NaN even in AS1 if published to SWF7 or higher, but works in SWF6 AS1. I guess this is one of those instances I mentioned.

                                So solution is to define 'x' as something in the on(load)

                                You could actually find and replace "trace(_x)" with "x = _x" and it should work. Seems to work with AS2 as well.

                                HTH
                                • 13. Re: Flash verson 6 versus version 7
                                  Level 7
                                  abeall wrote:
                                  >> NOTE: replace x with a dot in above email address.
                                  >
                                  > Ironically, x is the problem. No, not in your email, in the .fla. :-) I
                                  > just took a look, and it was indeed a problem of an undefined variable.
                                  > Do a search (Ctrl+F, it will anything in your .fla, very handy), for the
                                  > ActionScript text "trace(_x)" - if you added that trace then you were
                                  > right on top of the solution - and click Find All. It will reveal the 3
                                  > problem areas. Single click them to inspect them. Here's an example:
                                  >
                                  > onClipEvent (load) {
                                  > accel1 =0.7;
                                  > rate1 = 0.07;
                                  > trace(_x)
                                  > _root.xkoord2=105;
                                  > }
                                  >
                                  > onClipEvent(enterFrame) {
                                  > x=x*accel1+(_root.xkoord2-_x) * rate1; //NaN
                                  > _x+=x;
                                  > if(Math.abs(_root.xkoord2-_x)<1) { _x=_root.xkoord2; }
                                  >
                                  > }
                                  >
                                  > The problem is this line:
                                  > x=x*accel1+(_root.xkoord2-_x) * rate1;
                                  >
                                  > 'x' is not defined, so that line always returns NaN. The interesting
                                  > thing is, it returns NaN even in AS1 if published to SWF7 or higher, but
                                  > works in SWF6 AS1. I guess this is one of those instances I mentioned.
                                  >
                                  > So solution is to define 'x' as something in the on(load)
                                  >
                                  > You could actually find and replace "trace(_x)" with "x = _x" and it
                                  > should work. Seems to work with AS2 as well.
                                  >
                                  > HTH

                                  HI! It worked for part of the animation, the top image that scroll from left
                                  to right now works, However the popup window with scrollable text still does
                                  not appear correctly. There must be something else with that part that needs
                                  tweeking. It must inside the Movie Clip "TM_scroller_more_mc". I took a
                                  look at it but did not any things like "trace(_x) or similar.

                                  Paul