Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Flash General Questions > Flash 9 General Questions

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-01-2007, 10:36 PM   #1
tsj4
Senior Member
 
Join Date: May 2005
Location: San Francisco
Posts: 730
Default code broke auto formatting

you will notice if you place this code into your flash as panel and click the auto format button it outputs an error I have went ahead and formatted it as close as I believe but also leaving the end unformatted for testing purposes. Why is it doing this?

ActionScript Code:
video.theVideo._width = video.theVideo.width; // ------- [  ] ------ // onEnterFrame = function () {     if (video.theVideo.width>0) {         scaleVideo();     }     if (Stage["displayState"] == "normal") {         if (setOnce) {;             movieControls.buttons.gotoAndStop(1);             movieControls.buttons.fullscreen.gotoAndStop(1);             Corners.setTint(255, 255, 255, 100);             movieControls.buttons.fullscreen.pressed = false;             setOnce = false;         }     }     if (playStatus) {         movieControls.toggleButton.pauseButton._visible = true;         movieControls.toggleButton.pauseTicks._visible = true;         movieControls.toggleButton.playButton._visible = false;         if ((preview._visible) && (scrubPressed == false)) {;             preview.play();         }         largePlay._visible = true;         largePlay._alpha = 0;         if (_global.badStream){;             playStatus=false;             badStream._visible=true;             preview._visible=true;             preview.gotoAndStop(15);             movieControls.elapsed._visible=false;         }     } else {         movieControls.toggleButton.pauseButton._visible = false;         movieControls.toggleButton.pauseTicks._visible = false;         movieControls.toggleButton.playButton._visible = true;     }     if (volDown) {     perc = (movieControls.vol.volumeMC.slider._y-22)/3.8;     setVol = Math.floor(perc*(-10));     so.setVolume(setVol);     }     movieControls.vol.volumeMC.gotoAndStop(setVol);     if (preload){;     scaleVideo();     } };

Last edited by tsj4; 08-01-2007 at 10:50 PM..
tsj4 is offline   Reply With Quote
Old 08-02-2007, 12:13 AM   #2
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 24,878
Default

Flash MX 2004 auto formats just fine... and Flash 8 auto formats just fine as well...

You have an extra ';' at the last if block that says 'if (preload) {;' which you might want to delete...
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Old 08-02-2007, 12:17 AM   #3
tsj4
Senior Member
 
Join Date: May 2005
Location: San Francisco
Posts: 730
Default

I am using cs3 and selected an AS2.0 File and it is placing those semi-colons after open and closed curly brackets. I noticed that also and tried removing them in case that was causing the error but still breaks on auto format. When I test a movie is does not output errors though.
tsj4 is offline   Reply With Quote
Old 08-02-2007, 12:29 AM   #4
tsj4
Senior Member
 
Join Date: May 2005
Location: San Francisco
Posts: 730
Default

this is the error I am getting.
tsj4 is offline   Reply With Quote
Old 08-02-2007, 12:30 AM   #5
CyanBlue
Super Moderator
 
CyanBlue's Avatar
 
Join Date: Jan 2002
Location: Centreville, VA
Posts: 24,878
Default

Well... I don't use CS3, so I cannot verify, but senocular says you should not use Auto Format in CS3, period... So, don't use it...
http://www.senocular.com/?id=1.398

I have moved your question to Flash 9 forum...
__________________
CyanBlue / Jason Je / Macromedia Certified Flash Developer & Designer
http://CyanBlue.FlashVacuum.com
http://www.FlashVacuum.com
http://tutorials.FlashVacuum.com

Do NOT PM, Email or Call me... Your question belongs right in this forum...
CyanBlue is offline   Reply With Quote
Old 08-02-2007, 12:42 AM   #6
tsj4
Senior Member
 
Join Date: May 2005
Location: San Francisco
Posts: 730
Default

well that definitely clears it up then. To bad the code I inherited from another developer was not properly formatted.
tsj4 is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
one template, many looks? subquark ActionScript 1.0 (and below) 1161 09-03-2009 04:45 PM
Auto formatting script... rach236 Other Flash General Questions 7 07-26-2006 10:11 PM
[Flash 8] AS code for several frames in frame 1. tjonmage ActionScript 2.0 3 12-01-2005 03:45 AM
Code File Size: Huge! cabbage ActionScript 2.0 1 09-01-2004 05:43 AM
Code formatting instructions pixelwit General Chat 27 03-06-2004 08:02 PM


All times are GMT. The time now is 11:10 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.