HTML 5 Canvas interoperability

SVG has been replaced by the canvas in HTML 5. With all vector art tranistioning to HTML 5, Illustrator really needs to be able to save directly to a canvas html string without the need for third party plug-ins.

Hello,
it looks to me like you are trying to retrieve images from a web page and save them on your own computer?
If so, this may be against the web site's terms of use, and could be a copyright infringement.
I'd explain in more detail what you are trying to accomplish, as we won't help you write malicious code.
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book:
Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

Similar Messages

  • Play a sound on mouseover in an html canvas document in Flash CC

    Hi,
    I've been looking for quite some time to do something that I'm sure is simple, but I can't find the answer. I'm sorry if I missed it, but I appreciate any help anyone can provide.
    I have a simple button in flash that I am converting to an html canvas document so I can place it as html in my website with animation and sound on mouseover. I got the animation working the way I want it when I publish to html, but using Actionscript 3, I had a sound that played when the user moused over the button. I want to have it still play a sound when the user mouses over it in my html canvas file too, but I have not had success yet with converting my Actionscript to Javascript and am not a javascript expert by any means. I would also like to have multiple formats of the audio file linked in the code for any browsers that don't work with mp3 files. I can convert the audio file no problem but don't know how to code this…. I have found a few general tutorials on this, but have not been able to get it to work with anything I've tried so far.
    Here is the Actionscript code I had which works fine in my original document when I export as a .swf file.
    stop();
    import flash.media.Sound;
    import flash.net.URLRequest;
    import flash.events.Event;
    sprayGunbtn.addEventListener(MouseEvent.MOUSE_OVER, playSound);
    var myExternalSound:Sound = new Sound();
    var req:URLRequest = new URLRequest("ShortSpray.mp3");
    myExternalSound.load(req);
    function playSound(event:Event){
      myExternalSound.play();
    If someone could help me convert this to Javascript so that it will work when I publish my .fla file to html, I would greatly appreciate it. Thanks very much in advance for your time….

    You can follow the below steps to easily play a sound at runtime - like on mouseover.
    1. Make sure your audio is imported in library and has a linkage name specified.
    2. Open Windows Menu -> Code Snippets panel and expand HTML5 Canvas -> Event Handlers section.
    3. Select your button on Stage and apply the MouseOver Event from Code Snippets to it.
    4. In the MouseOverHandler function add the below line and test movie:
              playSound('audio_linkage_name');
    If you still face problems let me know.
    Also, you might want to go through the SoundJS documentation for more control with Audio in HTML5.

  • Is there a way that I can display video in a Flash HTML Canvas file?

    I have created a new HTML 5 canvas file in Flash. When I try to import video it is greyed out in the menu. Is there a way I can import video into this file, or link to a video?
    Thanks

    Displaying Video Element using Bitmap - width/height issue / EaselJS / Discussion Area - CreateJS Support

  • How to include text as HTML elements (see DOMElement)

    I am working with Flash PRO CC v. 14.0.  to convert my Flash website to HTML5 / javascript
    I have converted a file to the HTML5 Canvas
    I am very happy that the new Flash Pro has the feature to convert to HTML5 canvas
    HOWEVER:
    In my original .FLA file project I use only one font: Copperplate Bold.  I use several sizes of that font within the project / scene
    In the original file for all text I use static text, Letter spacing, AntiAlias, AutoKern and single line (Linetype)
    - none of which the HTML5 canvas seem to allow / support?
    How do I maintain the FONT look that I have chosen in my original FLASH project, after I convert to HTML5 canvas?
    Is there a way in the HTML canvas to maintain the FONT look that I want?
    HTML5 canvas will not allow Font embedding
    The device font destroys the LOOK of my Copperplate Bold font.
    How do I include text as HTML elements (see DOMElements)?
    WARNINGS generated when I convert the original file into an HTML Canvas:
    Warnings generated while copying/importing in 140827a HTML test.fla:
    * AntiAlias is not supported in HTML5 Canvas document, and has been converted to DeviceFonts in an instance of Text.
    * AutoKern is not supported in HTML5 Canvas document, and has been removed in an instance of Text.
    * Frame Scripts have been commented
    * LetterSpacing is not supported in HTML5 Canvas document, and has been converted to 0.0 in an instance of Text.
    * LineType is not supported in HTML5 Canvas document, and has been converted to MultiLineNoWrap in an instance of Text.
    * Some artwork contains Hairline stroke, which is not supported in HTML5 Canvas document, and has been converted to Solid.
    * StaticText is not supported in HTML5 Canvas document, and has been converted to DynamicText in an instance of Text.
    New HTML Canvas Document created.
    NOTE:  So far the only way I have been able to maintain the font look is to convert the fonts to .png files
    This is painstaking work that I would like to avoid.
    Even then I still get a WARNING when I test my scene - (no doubt because I left the original FONT text  in guide layers)
    After conversion ON TEST SCENE:
    WARNINGS:
    Frame numbers in EaselJS start at 0 instead of 1. For example, this affects gotoAndStop and gotoAndPlay calls. (18)
    Only circular (not oval) radial gradients are supported. (85)
    Text support is limited. It is generally recommended to include text as HTML elements (see DOMElement). (6)
    Color effects are published as a filter and subject to the same limitations. (4)
    Filters are very expensive and are not updated once applied. Cache as bitmap is automatically enabled when a filter is applied. This can prevent animations from updating. (2)
    Content with both Bitmaps and Buttons may generate local security errors in some browsers if run from the local file system.
    HOW CAN I MAINTAIN the FONT LOOK that I have chosen for my project?
    How do I include text as HTML elements (see DOMElements)?
    ANY HELP will be appreciated
    A good, in depth, tutorial on the subject (FONTS) would be a BIG help to many using the convert to HTML5 canvas features.

    GOOGLE HAS
    https://www.google.com/fonts
    choose a font from above site
    then:
    google generates instructions on how to embed that font
    Montserrat
    3. Add this code to your website:
    <link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
    4. Integrate the fonts into your CSS:
    The Google Fonts API will generate the necessary browser-specific CSS to use the fonts. All you need to do is add the font name to your CSS styles. For example:
    font-family: 'Source Sans Pro', sans-serif;
    font-family: 'Ubuntu', sans-serif;
    font-family: 'Montserrat Alternates', sans-serif;
    font-family: 'Montserrat', sans-serif;
    font-family: 'Open Sans', sans-serif;

  • Problem when publishing HTML5 canvas animation

    Hi,
    I have a problem when I publish my animation in flash cc into HTML canvas, although it works fine on my desktop, but it gets worse on tablet, the animation gets slower and the colors are darker.
    I did some fixes as: removed all filters - converted the artwork objects into bitmaps - I even deleted the big BGs that have the biggest sizes.
    Any help/suggestions would be very appreciated.

    Thanks kglad for you reply, but the animation I am publishing is too simple and short, I've deleted anything that may effect the performance, I am sending you the link to view it and tell me if there is something wrong I am doing.
    http://192.185.4.135/~alwasaet/amman-rlo/char/01_html_character.html
    Thanks,

  • Where do I place the different parts of the HTML 5 published files on a web page?

    I recently published an HTML 5 canvas document from Flash. Once the files are published where do they go on a web page? For example, lets say I had 3 animations published from Flash as HTML canvas objects. The files go on different parts of page, let's say in 3 different places in the body. Flash outputs the HTML file, JavaScript file, and whatever images in an 'images' folder. I'm not sure where I would place all these files on my web site. I know the JavaScript goes in the head of the index page. However, where do the other parts go? Further, if I have multiple HTML canvas objects how do I separate the code.
    All of the tutorials demonstrate how to publish the file, but give no assistance on how to place the file or files on a web page.
    Below is example code from a sample files:
    <html>
    <head>
    <meta charset="UTF-8">
    <title>HeadSpinning</title>
    <script src="http://code.createjs.com/easeljs-0.7.1.min.js"></script>
    <script src="http://code.createjs.com/tweenjs-0.5.1.min.js"></script>
    <script src="http://code.createjs.com/movieclip-0.7.1.min.js"></script>
    <script src="http://code.createjs.com/preloadjs-0.4.1.min.js"></script>
    <script src="HeadSpinning.js"></script>
    <script>
    var canvas, stage, exportRoot;
    function init() {
        canvas = document.getElementById("canvas");
        images = images||{};
        var loader = new createjs.LoadQueue(false);
        loader.addEventListener("fileload", handleFileLoad);
        loader.addEventListener("complete", handleComplete);
        loader.loadManifest(lib.properties.manifest);
    function handleFileLoad(evt) {
        if (evt.item.type == "image") { images[evt.item.id] = evt.result; }
    function handleComplete() {
        exportRoot = new lib.HeadSpinning();
        stage = new createjs.Stage(canvas);
        stage.addChild(exportRoot);
        stage.update();
        createjs.Ticker.setFPS(lib.properties.fps);
        createjs.Ticker.addEventListener("tick", stage);
    </script>
    </head>
    <body onload="init();" style="background-color:#D4D4D4">
        <canvas id="canvas" width="615" height="400" style="background-color:#FFFFFF"></canvas>
    </body>
    </html>

    All of the sections marked with the <script> tags should go in the head of the About page. From this line: <body onload="init();" style="background-color:#D4D4D4">, you want to take the onload="init();" part and add it to the <body> tag of the About page. You can also add the background color if you want.
    The part marked with the <canvas> tag is the part that need to be added to the body of the About page. I don't know what your About page contains, so I can't tell you where it should be placed.

  • Avoiding split images when printing html

    I am writing html pages in dreamweaver and when I print from safari, the images are split between pages. Is there a way around this either in my html coding or in the 'save to pdf' in the printing?

    Could be bad for your situation, but the only way I have successfully gotten around some of the issues you're describing is by outputtings static html files and opening in the user's local browser.
    In your case that could be a large amount of code and you also have issues with whatever local browser they're using.  (God forbid they have IE then you'll be outputting your html / canvas and it still won't print.)
    Unfortunately I don't really have an answer for you and I don't think Adobe does yet.  (You can see my basic workaround for printing to the user's local browser here: http://vfoo.wordpress.com/2009/03/24/adobe-air-print-css-and-html-printing-hack/ Note:  I don't think my workaround will be the best for your because relying on the user's browser for canvas printing is a bit of Russian Roulette)
    To request better printing features as well as describe your issues to Adobe go here:
    http://www.adobe.com/cfusion/mmform/index.cfm?name=wishform

  • HTML5 Canvas mode audio quality issues

    Trying out the HTML5 Canvas mode of Flash CC 2014, and have banged right into a couple of show-stopping problems with exporting audio--
    Every audio file I've given it, Flash has converted it to MP3 with a loud click at the end that is not present in the original.
    In HTML Canvas mode, it seems there is no option to modify the Default compression setting for audio. So the only way to export MP3s as anything other than 16 kbps mono is to manually change the compression on every single file. Am I overlooking something?

    Yes, I already pointed out in the first post that you can change the compression at the individual asset level and that there doesn't seem to be any way to change it in the publish dialog.
    Seems a bit absurd that the ability to change the default compression got left out of HTML5 mode. This has been core Flash functionality since pretty much forever.

  • Flash CC Trial HTML Project

    Hi All,
    Hoping this is something simple I've done wrong!
    I downloaded the trial version of Flash CC and was looking to create a HTML project but I don't seem to have the option. I only have options for ActionScript or AIR projects.
    Can anyone help with what I'm missing?
    Thanks,
    Chris

    Can you check the version of Flash in the About dialog. You should have #13.1.0.217 or #13.1.0.226 in order to see HTML canvas document type.
    Please update from Cretaive cloud application or from Help->Updates menu. Alternatively you can download the stanadlone update from : http://www.adobe.com/support/flash/downloads.html#flashCC
    -Sujai

  • Flash animation to html conversion hairline problem

    Hi. I am Suzi. I am currently working in Flash CC and working with some animations. I am needing to turn the Flash animations in to HTML and Java Script which are being viewed on iPads, iPhone and on the net.  My issue is that when they are eventually view they loose all quality and also have a warning sign stating that
    "Warnings generated while copying/importing in (name of the file)
    *some artwork contains hairline stroke, which is not supported in HTML5 Canvas document, and has been converted to solid.
    The animations come out with a lot of white section obviously the hairlines. I do not have the ability to change the 120 animations nor the time. Is there a way we can fix this problem? Thanks

    This animation is a  frog. When he jumps or moves we can see the white behind the frogs eyes its seems to move slower than the rest of his image. Also there seems to be  white hairlines across the animation, only flashes up quickly but I cant use him this way. . Put it this way the animation doesn't come out clean. I assume its because of the stroke change. Now maybe this is not the reason.
    as you can see there is a hairline across his arm. this is viewed in Fire Fox IE, etc. This is a Flash Doc changed into a HTML canvas from AS3 document format.
    These animations were produced years ago and are copyright for the company i work for.
    They are looking at making these flash files available on every media for their employees (coaches).
    There is a PC based program called COMPOSICA that is a learning program and has modules that the teachers need to use.
    This is the base of where the animations need to start. the program is then used through the web on ipad, iphones etc.
    So bottom line is we need the cleanest image we can get. 
    So i assume that makes sense...hee hee
    Thank you Suzi

  • HTML5 canvas app: flash for presentation layer

    Hi there,
    I'm a html frontend developer, so I'm quite new to this flash environment.
    For a project we're doing right now, however, we decided to go with flash for asset management and presentation layer development.
    So we have an MVC javascript project "finished" already, that uses assets exported from a HTML canvas project in flash pro cc. Right now all functionality is coded inside the javascript project, and only assets, animations, etc are loaded from the exported fla. This seems to work fine. However, there is still a strong connection between the javascript views and the exported assets. Right now we're in the position where we need to reskin the whole application, and to allow external developers to design skins as well. This strong connection between assets and views is becoming a problem.
    For example, at a certain point in our application we have to show a list options with a variable length. So we draw a container in flash that will contain the list, add a mask, create a scrollbar, etc. Then we have code in the javascript project that uses all these elements, adds displayobjects to the container, scroll the whole thing up and down, etc... That means that a skin designer, who only has access to the fla, is unable to make, for example, a theme where this list is shown horizontaly instead of vertically.
    I was wondering how other people handle these scenarios?

    you'd have to code and create the graphics for horizontal scrolling just like you did for vertical scrolling

  • Saving mathML rendered to canvas as PNG

    My ultimate goal is to save rendered presentation MathML to a .PNG file. Knowing just enough about programming to be dangerous :-) there may be a better way to do this...I am drawing the equation on a canvas element, then trying to save the canvas element as a .PNG. I started with code found here -- https://developer.mozilla.org/en/HTML/Canvas/Drawing_DOM_objects_into_a_canvas...
    I am getting "Security error" with no code. Running a local Apache server. Do we think the canvas is dirty, even though, according to the Mozilla doc above, its not supposed to be? Any other way to do this? Thanks in advance...

    This forum focuses on end-user support. You can find more web development help on the [http://forums.mozillazine.org/viewforum.php?f=25 mozillaZine Web Development board]. Separate forum, separate registration. Please note the tips in the Sticky Post at the top of the forum before posting.

  • Does ADF supports using HTML5 canvas tag?

    Hi
    My use case is to render the PDF using canvas tag introduced in HTML5 and java script. but I could not find any ADF faces component with Canvas behavior so I thought of using html canvas tag in a jsff page directly
    I am new to JDeveloper so please let me know is there a way to use HTML5 tags directly on .jsff page?
    Thanks,
    Suresh K

    I'm not aware of y component in adf that supports canvas. You can try to include yout html in f:verbatim tags and see what you get.
    Timo

  • Save mx:HTML full content to image

    After searching my pants off for the correct approach for this, I need some help regarding this. I want to save the contents of an html component to an image (png/jpg/whatever) in the filesystem. The added bonus, is that I want to render the entire HTML page, not just the visible part in the component.
    A few approaches I tried:
    - Trying to get some reference to the canvas that is drawn on in the html component, no luck (this seemed to me to be the easiest solution)
    - Trying out a way of splitting the entire html page in multiple squares and creating seperate bitmaps for each viewport's content, after that combining them into 1.
    Some problems I have:
    - No way to get an easy reference to the entire html-canvas in the html component (that I could find).
    - Lot's of other stuff that went wrong which made me think there has to be an easier way.
    - Pages can become 10000px or more high easy, how do we work with bitmaps this size taking the bitmap size limit in the player into account?
    I know this should be possible, since I've seen Air apps do it already (Webkut e.g.).
    Any help appreciated,
    Ben

    I was finally able to get a working solution.  I ended up using the scrolling method, in which I dispatch an event if there are more pages to process.  The handler for that event then simply called the function again.  This allowed the HTML component to scroll incrementally.  Sample below (this is bits and pieces of my PrintManager class, which does a lot more. I haven't tested the sample below) :
    private var _html:HTMLLoader;     
    private var page:int = 0;
    public function snapshot(html:HTMLLoader):void{
      var PAGE_HEIGHT:int = html.height;
         var pages:int = Math.ceil(html.contentHeight/PAGE_HEIGHT);
         var b:BitmapData;
         // make global reference to html object
         _html = html;
         //global counter of pages;
         page++;
         // Register Listners     
         FlexGlobals.topLevelApplication.addEventListener('NEXT_PAGE_PLEASE',nextPageHandler);
         FlexGlobals.topLevelApplication.addEventListener('PRINT_JOB_COMPLETE',pringJobCompleteHandler);
         // Without the timeout the window doesn't refresh in time to take a snapshot
         setTimeout(function():void{
              b = new BitmapData(PAGE_WIDTH+50,PAGE_HEIGHT);                         
              b.draw(html);
              /* Code here to write the image to disk or whatever */
              // Ok, here's the magic.  If there are more pages to process we need to dispatch an event
              // telling our printer to execute this method agian.  If it is the last page we need to
              // create the pdf and present it to the user.  Then reset the global vars used.
              if(page < pages){                                   
                   FlexGlobals.topLevelApplication.dispatchEvent(new Event('NEXT_PAGE_PLEASE'));
              }else{          
                   FlexGlobals.topLevelApplication.dispatchEvent(new Event('PRINT_JOB_COMPLETE'));                                   
         },100);
    public function nextPageHandler(e:Event):void{     
         FlexGlobals.topLevelApplication.removeEventListener('NEXT_PAGE_PLEASE',nextPageHandler);     
         _html.scrollV = _html.scrollV+_html.height;
         // This will snapshot the next screen.
         snapshot(_html);
    public function pringJobCompleteHandler(e:Event):void{
         FlexGlobals.topLevelApplication.removeEventListener('PRINT_JOB_COMPLETE',pringJobCompleteHandler);     
         trace('print job complete');          
         page = 0;
    Like I said, I copy/pasted bits and pieces from my class to post here.  You probably need to tweak it to get it to work.  One of the things I left out here was logic to calculate and clip the last page, since the last page likely contains the previous page you need to determine the height of the last page and use something to clip it.  I actually used BitmapData.copyPixels and copied a rect in the correct position and size from a temporary snapshot of the page.
    --Abram

  • Is it possible to export as HTML5?

    Firstly, my apologies, i'm in no way a flash expert and this will probably make the majority of you cringe. I am fine at the design side of things, however when it comes to the coding etc I haven't the foggiest.
    Basically I have created flash banners for my website to be displayed on various ad networks. These are designed in flash and exported as .swf which is fine. Obviously the majority of mobiles however don't display this but would display html5 or gif? Want to try and really stay away from gifs if possible. I have noticed on Flash CC there is a canvas at the start called html canvas?! Is this something that basically makes your banner in html5 or am i really jumping the gun on this one?
    If no to all of the above, where or what would you suggest I used to create HTML5 banners?
    Thanks so much in advance, Tom

    Yes, if you create a new HTML5 Canvas document or convert an ActionScript document to one, it will publish for HTML and Canvas. You will need to use JavaScript in place of ActionScript for Canvas but all the workflow and tooling is identical across document types.

Maybe you are looking for

  • Nested XML with XSU

    I have data in an Oracle8i-database and will use Java to export it to XML. I’m trying to use XML Developer’s Kit’s (XDK’s) XML SQL Utility’s (XSU’s) OracleXMLQuery class. But I’ve problems to get the nested XML-structure I need! Oracle says there’s t

  • Acrobat X form editing view and normal view

    This might seem like a silly question, but I went into form editing mode to create some form fields. I can toggle back and forth between form editing and form preview views, but can't figure out how to get back to normal view. In Acrobat 9, when in f

  • HP deskjet 1000 J110a printer assistent not working

    After having worked perfectly for 2 years my printer assistent suddenly stopped working. I reinstalled driver twice, but with no result. I cannot see ink levels nor align the printer

  • Renaming View

    Hi, I have created a view in r/3 . Now i want to rename the same view without creating a new one. Can any one suggest how to rename a view? regards, Harish.

  • InsertRowsAtIndexPaths doesnt work

    i have two arrays with 20 elements and 10 elements i want to make "Load More" cell in UitableView..i did that but i cant load the 10 elements when the Load More cell tapped..here is my codes are if (newCount) { [dizi1 addObjectsFromArray:dizi2]; [diz