FOTD 12: Flash 8 – Enhanced Strokes

Flash has made some significant strides to become more expressive with version 8, and both today and Friday’s FOTD will look at two specific features in this category- todays focus on updates to Strokes that should make Flash 8 much more flexible in the design department.
(Note- these enhanced stroke features are only available when publishing to Flash Player 8.)


The first little enhancement is called ‘stroke hinting’ which means, in a nutshell, you won’t see blurry vertical or horizontal lines anymore, as Flash now does a much better job of seeing when an anchor point is positioned at a subpixel level and adjusting for it accordingly. Just check this feature ‘on’ in the Property Inspector for your selected stroke (if you’re publishing to Flash Player 8), and it’ll take care of the rest.You can also now control how your strokes scale via a popup menu in the Property Inspector- there are certainly cases when you wouldn’t want a stroke to scale relatively when the container movie clip is scaled (for example, a user interface that, when expanded, needs to grow horizontally but keep a consistent height vertically). Flash 8 supports 4 different modes to control how and when your strokes are resized:

  • Normal
    Scales vertically/horizontally with your movie clip.
  • Horizontal
    Scales horizontally as your movie clip is resized, but not vertically.
  • Vertical
    Scales vertically as your movie clip is resized, but not horizontally.
  • None
    Stroke does not resize with the container movie clip.

JoinsAlong with the default round join available in Flash MX 2004 and earlier, you can now specify bevelled and mitered joins in your Flash 8 strokes. Also, you can specify the miter size to further customize stroke corners. Sharp corners – something you couldn’t really achieve without trickery in previous versions of Flash – are now available. Here’s a visual example of the differences between the join styles:

joins_diagram.jpg

CapsRound caps, Square caps (as well as No caps) are available for your stroke ends in Flash 8- which will make stroke (and more importantly, dashed stroke) endpoints look a whole lot better. Here’s how these styles differ visually:

caps_diagram.jpg

You can access these features within the Properties Inspector, for any selected stroke- the settings are located over on the right:

property_inspector_strokes.jpg
The new Stroke property controls (highlighted)

The combined result of these updates is significant, affording you far more control over strokes in your Flash movies and applications than ever before. And they represent just one of many ‘expressive’ features in Flash 8 that will help you get a lot more work done directly in the Flash authoring environment, without needing to downshift to external illustration applications. Enjoy!

36 Responses to FOTD 12: Flash 8 – Enhanced Strokes

  1. Jack says:

    Nice, but how is the xhtml suport in dreamweaver 8?

  2. Nice. I thought I read that gradients can be in strokes now, if that’s true then I’d think patterns/textures would be too, no? :)

  3. Jack- XHTML support is fine in DW8 (it isn’t really a new feature, though- it was supported in DWMX 2004 as well, but there are some great rendering/visualization improvements in DW8 I’ll cover later in this series).Chris- you’ll definitely want to stay posted for Friday’s Flash FOTD. Gradients will be covered in reasonable depth then… ;-)

  4. Jack says:

    Sorry you do not understand, I use MX 2004 (7.2 I think)? with XHTML and a lot of tags where missing, I am talking about XHTML 1.0 – Strict and XHTML 1.1 and It will be great when it will code hint tags that not are suported any more base on the DOCTYPE.Like a kind of web standard mode…But maybe I have to wait till Dreamweaver 9 for it :(Sure I read a little about the new CSS rendering/visualization improvements and sure will buy it just for that (I will buy all the studio pack anyway).

  5. Jack says:

    oops type error:And It will be great when it NOT will code hint tags that not are suported any more base on the DOCTYPE on top of the page.

  6. Interesting (and thanks, Jack- that’s a lot more info to go on besides just ‘XHTML support’)… ;)Make sure to submit that as a feature request here, too:http://www.macromedia.com/go/wish/

  7. Did these “stroking enhancements” make it into the Drawing API?(I’m going to be very surprised if this makes it through the comment spam filter!)

  8. Jason- alas, no- these are authoring updates only and not accessible thru AS. They are accessible through the extensibility (Javascript) API for extending, however.Jack- error noted, however I’d like to keep the comments here on topic (which is Flash/updated Strokes for this post)- consider your request passed along. ;-)

  9. Tinic Uro says:

    Jason,yes, you can use all the new stroke features using the Drawing API. You can find an quick example here:http://www.richapps.de/?p=19Cheers!

  10. Whoops- my bad! Didn’t see AS support noted in the spec, but if Tinic says it’s there- it’s definitely THERE. Thanks for the correction, Tinic!

  11. Kevin says:

    Speaking of JSFL, currently you cannot add a stroke to something that does not have a stroke. ‘setStroke’ will only change the existing stroke.Can you add a stroke now using JSFL?Thanks

  12. Awesome! Thanks, guys!

  13. Hi, Kevin-I don’t see any updates to the document.setCustomStroke() method for the Flash 8 JSAPI (which is, as you’ve noted, used to set the stroke style *before* drawing an object, as opposed to changing stroke settings of an existing/selected object), so at least from my POV, I’d assume that this functionality hasn’t changed since the implementation in Flash MX 2004.

  14. Marcos says:

    Hey there! I played around a little bit with the Scale options but only saw it working when using “None”. Didn’t see anything happening when I set it to Horizontal or Vertical, both using vertical and horizontal lines… Where’s the catch? :-)

  15. Hey, Marcos-Best way to see this is to put the stroke in a MC, set either vertical or horizontal, and then change the *aspect ratio* of the MC (either horizontally or vertically) with the appropriate H/V setting. If you simply zoom in/out you’re not changing the aspect ratio, you’re just increasing the overall size of the canvas/stage equally. Hence, you’re probably only seeing ‘None’ because it suppresses scaling entirely. the other two work like this-Horizontal- does not scale if the clip is scaled horizontally ONLY.Vertical- does not scale if the clip is scaled vertically ONLY.Hope that makes things a little more clear. Those two settings (horizontal/vertical) are probably most useful if you’re building… say, a component or library item that may be squashed/stretched later- and you don’t want to stroke outline to change it’s width as the aspect ratio changes.

  16. Phil says:

    Is there anyway of turning the “enhanced stroke” off? Any shape or line I have drawn in Flash8 gives an error (“Enhanced stroke is not supported in this player”) when I try to publish in anythign but Flash8. but I haven’t even touched the enhanced stroke /stroke hinting settings??

  17. Gretchen says:

    Same question as Scott… everytime I publish my movie (it’s in Flash 5) I get the “Enhanced stroke is not supported” warning, even though I didn’t touch it. Help!!!

  18. Guys- please read the first paragraph of the article above, this was called out specifically… you can only use the enhanced stroke settings when publishing to Flash Player 8. If your Publish Settings are configured to build to Player 7.x or lower, you’ll absolutely get these errors. Further, if you created the strokes when your FLA file Publish Settings were at Flash 8, then ‘downgraded’ the file to publish to Flash 5/6/7 (or others), then you’ll likely also get these errors.

  19. Jason Chandler says:

    “Enhanced stroke is not supported in this player” This error appears for me constantly since upgrading to Flash 8. As much as Macromedia would love for us to create our vector art without “downshifting” to Illustrator the truth is that Illustrator is the app of choice for creating vector art. The tools are superior, plugins are useful and plentiful etc etc etc.So what are we supposed to do?! I think this issue deserves an actual solution… regardless of “the first paragraph of the article above” we can’t all simply publish into Flash 8. I for one am constrained by version restrictions (Yahoo advertising, etc.) So I need to use Flash 6. So this is a significant production issue.This error message is maddening mainly because there is no documentation available in Flash Help or on Macromedia.com.I have a little work-around: save your fla file down to an older MX format and then re-open it. But I have no idea what the best workflow solution should be…(I love Flash 8, and I can’t wait for it to be the format of choice for vendors on the internet. But I can’t unilaterally start using it.)

  20. Given this chain of comments, I think there’s a fundamental misconception with how the Flash 8 IDE authors, and then subsequently writes out to a specific Player version. I just confirmed this on my Tiger Mac box (and it doesn’t differ from what I’ve said above)… let me lay it out in black and white:What sounds like the case here is that you’ve created a new Flash 8 document, started drawing in it (which will of course enable and include enhanced stroke features), and THEN both set your publish settings to Flash 6 and compiled the SWF. By setting your target player version in Publish Settings after you’ve built out your FLA you’ve essentially created a Flash 8 file that is trying to publish Flash 8 functionality to a player version that does not support them. Just as the error message suggestions.But if you tell Flash immediately that you intend to publish to the Player 6 version in Publish Settings, the IDE will then help you avoid using features you can’t eventually publish to as you author (the point I’ve tried to make several times now). You shouldn’t see the compile-time error anymore- you’ll get errors when trying to use the new features as you try to use them in the Flash IDE instead (which is FAR more helpful).Hope this helps… I’ll check with tech support and see if this could be documented in their technotes more comprehensively.

  21. mafro says:

    Im having the same issue here – so I change my publish settings _after_ building my movie.. ooops my mistake – but really if the IDE can filter out the options for strokes why can’t it let me disable them and remove the compile error?I even deleted all my strokes and re-drew them in ‘publish for Flash 6’ mode, but still get the error! Seems a bit crap to me.I see what youre saying Scott but what if (shock/horror) that we didnt “tell Flash immediately that you intend to publish to the Player 6 version” – what then indeed?

  22. Mafro- Flash treats the scenario as most author/compile/test development environments I’m familiar with do- if they don’t know the restrictions in your project up front, they’ll write to the most current spec/player/target. If you need to regress versions or change targets, debugging is required. That’s why I consider setting targets first *most definitely* a best practice in Flash authoring- fixing this after the fact can indeed be a PITA.>> I see what youre saying Scott but what if (shock/horror) that we didnt “tell Flash immediately that you intend to publish to the Player 6 version” – what then indeed?

  23. james says:

    i had the same issue. i had made a line drawing in illustrator copied it into flash and got the error described above. to solve it i went to Modify > Shape > convert lines to fills. no more error for me.

  24. stuart says:

    james – you are my hero. i had the same error when i published my flash movie. then i converted all the troublesome stokes with the ‘convert lines to fills’ and it fixed everything. thanks.

  25. Christian Rauh says:

    This is just ridiculous. So there is no way to create Flash 7 compatible documents with Flash 8? Any line that I draw is now enhanced?Having the same problem as the people above and not having an option to remove the enhanced features, even if just manually, it a bug.THIS IS A BUG.Converting lines to fills does not solve, that’s a messy workaround.

  26. Of course there’s a way to create Flash 7 compatible documents in Flash 8, Christian. I’ve explained it in rather excruciating detail within this comment thread (have you actually read it?), as well as in this VERY specific posting here:http://weblogs.macromedia.com/sfegette/archives/2006/01/targets_and_fla.cfmSet your publish settings to player v7 (or earlier) before starting to develop your movie/app/whatever, and you should have no problem creating v7-compatible strokes. If you create a new document in Flash 8 and don’t let Flash know you’re targeting earlier versions of the authoring tool or player before you start creating content, then *of course* it will target player v8 by default and will use newer features that may not be compatible with earlier versions.Setting your target up front is dead simple, and should ALWAYS be the first step when creating Flash files that target earlier versions of the authoring tool/player. If you disagree, then log a feature request/bug:http://www.macromedia.com/go/wish/

  27. sacco says:

    Hi everyone !We had the enhanced strokes output messages problem, and found one simple solution. Just save the source file as Flash MX 2004 document, then reopen it in Flash8 and keep working. The error mesages are gone, as data related to the enhanced strokes were removed in order to save as MX 2004 document.Best Regardssacco

  28. Chase says:

    Ok – I STARTED with a flashMX2004 document. Opened it in Flash 8. The publish setting remained Flash 6.Whenever I imported a swf from illustrator it immediatly made it ‘enhanced stroke” and I got a list of errors when i published it.this file never had a flash 8 player in the publish settings.So that pretty much nixes your chastisement of people ‘downgrading’ their player once they had already started creating their document.Also, I tried deleting those strokes then using the ink well to make them again and what do you know. Even though the player was never set to anything above 6, it still drew enhanced stroke lines around the objects.I had to do the work around of saving it as a flash2004 document to delete those enhanced strokes which is messy.I agree with all the other users who say this is a very frustrating BUG.

  29. Chase- read through the comments at the followup posting I made. You’re running into a specific bug with *Illustrator SWFs* we confirmed over in the other thread. Not everyone here is having that specific problem- but are trying to downgrade their player target ‘after the fact’ and getting bit. That’s not a bug.However, I’ve never denied your specific use case (opening an Illustrator SWF and having it ‘push the default’ stroke type to 8 due to the advanced properties AI outputs). That is a bug, and is being looked at by the product team. General chastisement for not setting a player target first when starting a Flash project will ALWAYS apply, however. Your case is just far more specific. ;-)

  30. Chase says:

    Ok – I STARTED with a flashMX2004 document. Opened it in Flash 8. The publish setting remained Flash 6.Whenever I imported a swf from illustrator it immediatly made it ‘enhanced stroke” and I got a list of errors when i published it.this file never had a flash 8 player in the publish settings.So that pretty much nixes your chastisement of people ‘downgrading’ their player once they had already started creating their document.Also, I tried deleting those strokes then using the ink well to make them again and what do you know. Even though the player was never set to anything above 6, it still drew enhanced stroke lines around the objects.I had to do the work around of saving it as a flash2004 document to delete those enhanced strokes which is messy.I agree with all the other users who say this is a very frustrating BUG.oh well. at least there is a work around.thanks!

  31. Chase says:

    sorry for the redundant posting.human errorperhaps with Adobe now running Marcomedia, such issues between illustrator and flash will be resolved.heres to hoping.as for the ink drawing enhanced lines… I’ll keep using the work around. (save doc as mx2004 then reopen)cheers

  32. kaytoo says:

    Hi there,I’m having a slightly different problem with enhanced strokes.I want to publish to the Flash 8 player – so no probs there – but when i import my line drawing (swf from Corel), enhanced strokes are automatically used, and frankly the line drawing looks cruddy when published. Previously when I published from Flash MX 2004 and Flash 5, line drawins looked clean and beautiful.The only way for me to get the line drawing looking nice again is to save back to Flash MX 2004, and publish as Flash 7, so what was the point of upgrading to 8?Please let me know if there is a way to turn enhanced strokes off, because it’s proving counter-productive.thanks in advance

  33. kaytoo- you’ve got the same scenario with Corel’s SWFs as with the Illustrator problem noted above. Right now it’s a known bug in external SWF import, and has been reported so it can be addressed in the next update/version (sorry, no timeline to share there from the product team as of now). HTH!

  34. Joe says:

    Im having the same problem, Im using Flash8 and exporting to player 6 with no fancy strokes -But ‘Enhanced stroke is not supported in this player’ is just an error ‘message’ right? I mean when people view it in Player 6 they’ll just see a normal stroke, so ultimatley the only problem is the annoying message?Thats right isnt it!? (hope so)

  35. Joe- depends on what you did to the stroke in authoring. As noted a gazillion times in my posts, you have to set the target Player version in Publish Settings BEFORE starting to draw strokes in Flash 8, or you’ll get these errors when changing it later (or at final publish time). You could indeed have mixed results. Best way to confirm what things look like in Flash 6, alas – is to test your final movie in a Flash 6 player. Hope this helps out.