Skip navigation
uniwildcat38
Currently Being Moderated

Can I prevent the rapid flashing which occurs when testing a Flash movie which has a syntax error?

May 1, 2013 7:25 PM

Tags: #epilepsy #epileptic

I teach games development using Flash Professional CS6, and one of my students has photosensitive epilepsy. He is finding that the 'strobing' effect which occurs when he executes Test Movie on a movie with errors in its script is triggering headaches which can be a precursor to a fit. Obviously this is making it very difficult for him to complete his lab and assignment work. Is there any way of preventing a Flash movie from running if it contains a syntax error?

 

I have created a workaround by adding a bunch of extra frames to the start of the movie which will display a "SYNTAX ERROR" message if the script doesn't run - this gives my student a few seconds margin to quite the movie before the strobing begins. I have a single frame at the start with a goto statement which jumps over those error frames if the code doesn't have any syntax errors.

 

This seems to be working ok, but it's an ugly solution - does anyone know of a better way to deal with this?

 

Thanks.

 
Replies
  • kglad
    72,235 posts
    Jul 21, 2002
    Currently Being Moderated
    May 1, 2013 11:12 PM   in reply to uniwildcat38

    unfortunately, there's no better way to do that.  this is an excerpt from a book i wrote:

     

    Compile-time errors prevent all code, no matter where it is located, from executing. You will see your main timeline play (along with any MovieClips) from start to finish and then loop. It usually looks like a headache-inducing mess. If you are prone to seizures, click the close button on your test movie panel as soon as possible.

      You do not need to read the error message(s) before closing the test movie panel. The error message(s) will remain in the Compiler Error panel where you can read at your leisure long before you suffer a migraine or grand mal seizure

     
    |
    Mark as:
  • Currently Being Moderated
    May 2, 2013 5:43 AM   in reply to uniwildcat38

    1.In Preferences you can check "open test-movie in tabs".

     

    2. Having done that you could write a jsfl-script which switches the focus (immeadiately after you test the movie) to another tab in the same register card, thus, forcing the possible "corrupt" testmovie in the background. If are no compiler errors , the testmovie can be made available by simply switching to the test-movie tab, if there are compiler errors, you can close it without having to look at it.

     

     

    Another option would be to setup FlashDevelop as compiler trigger of Flash.

    You have to change these basic properties in your project:

    FlashDevelopProjectProperties.JPG

    FlashDevelop will only launch the test movie if it compiles flawless, inside Flash.

    FlashDevelop will act as a "bouncer" to Flash.

     
    |
    Mark as:
  • Currently Being Moderated
    May 2, 2013 5:14 AM   in reply to uniwildcat38

    A non-tech solution... do not have the student initiate testing himself.  Get someone else to trigger running the file and if the error-driven behavior persists, try again.

     
    |
    Mark as:
  • Currently Being Moderated
    May 2, 2013 10:44 AM   in reply to moccamaximum

    Another solution is to use Flash Builder (IMO you should already be teaching this workflow, as it is the one most suited to nontrivial projects), and then you have several options:

     

    1. After an AS code change, Build Automatically
    2. If you haven't changed the code,  Project>Clean
    3. If you've set up your project in such a way that you get the Flash Project Buttons, you can click the first one (compile in Flash)

     

    All of these options will simply build the Flash movie without playing it, and you can see the warnings/errors in the appropriate panel before clicking the Play or Debug button.

     

    If all of this is just too much for a beginner student, you can always Publish the movie, which creates the swf without playing it, look at the Warnings/errors panel, and then launch the swf some other way (such as double-clicking it or the generated HTML page).

     
    |
    Mark as:
  • Currently Being Moderated
    May 2, 2013 7:29 PM   in reply to uniwildcat38

    You're welcome. I have a friend who had epilepsy as a child, so I'm glad I could help.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points