HELP PLEASE!! I have been developing a flash MX app and when I bring it into flash MX 2004 some of the actionscript does not work as it did in flash MX. I needed to bring the flash file into MX 2004 in order to use some of the new UI components, however this has meant updating from actionscript 1(MX) to actionscript 2 (MX2004). an example of the error messages i am getting... the script: (added to a button "pubbtn" in a movie symbol "interface" which calls the movie "slider" to go to and play frame 2) on (release) { _root.interface.slider.gotoAndPlay(2); Now this works just fine under actionscript 1, however the error message sent to the output window in MX 2004 (actionscript 2) reads: **Error** Symbol=interface, layer=PUBBTN, frame=92:Line 2: Expected a field name after '.' operator. _root.interface.slider.gotoAndPlay(2); Total ActionScript Errors: 1 Reported Errors: 1 I need to know if there is a different way of of scripting this in actionscript 2, however I am a designer not a coder so simple answers only please!!!
add an onRelease statement to a frame and reference the instance name of the button ie: ButtonInstanceName.onRelease = function () { _root.interface.slider.gotoAndPlay(2); }; This is actionscript 1 but it works in 2 as well. hth Mike
'interface' is a reserved work in AS2 It is probably not a good idea to publish something written with ASA1 as AS2 unless you particularly need to. Similarly, don't publish something you did in Flash MX for Flash Player 7 unless you really need to. Don't just do it because you can :) ... things may not work if you do !!
Don't see what you're looking for? Try a search.
|