3d canvas & jQuery

Simple site works well in the browser, but app does not work!

This explains the problem. It is a white inscription error.  WebWorks need applications to explicitly declare elements of for any remote content areas he wishes to access within the config.xml file.

More:

http://developer.BlackBerry.com/HTML5/documentation/working_with_config_xml_file_1866970_11.html

http://developer.BlackBerry.com/HTML5/documentation/access_element_834677_11.html

Tags: BlackBerry Developers

Similar Questions

  • Resize the image with HTML5 Canvas - distortion

    Hi all

    I'm working on a Webworks app where I need to resize an image to upload it to a server. I use JQuery Mobile, the application should run on OS6 and upward. The user can use the camera or select a picture, the power off. The corresponding code is the following:

    function handleOpenedFile(fullPath, blobData) {
                    var image = new Image();
                    image.src=fullPath; //path to image
                    image.onload = function () {
                        var resized = resizeMe(image); // send it to canvas
                        //Do stuff with the DataURL returned from resizeMe()
                    };
            }
    
    function resizeMe(img) {
    
                var canvas = document.createElement('canvas');
                var width = Math.round(img.width / 2);
                var height = Math.round(img.height / 2);
                canvas.width = width;
                canvas.height = height;
                var ctx = canvas.getContext("2d");
                ctx.drawImage(img, 0, 0, width, height);
                return canvas.toDataURL("image/jpeg", 0.8);
            }
    

    I then use the Base64 in the DataURL for download on the server. The images are reduced, but they are truncated. Parts of the image are shifted autour and colors come out strange. It is not scaling in itself than the mess to the top of the picture it comes out garbled if you draw on the canvas without any scaling.

    Does anyone have an idea how to solve this problem or have another suggestion to resize an image for download?

    I managed to solve the problem of resizing for anyone who takes place also in this. Replacement of

    return canvas.toDataURL("image/jpeg", 0.8);
    

    with

    return canvas.toDataURL();
    

    solved the problem with the strange visual artifacts. Returns a picture of resized without any strangeness.

  • Using PHP with Html5 Canvas in anime CC

    Someone at - it all the resources they can point me on the use of PHP in Html5 Canvas to animate CC?

    I don't seem to see a lot of options for this.

    We used to be able to with edge animate.

    Do you know how cool it would be to be able to build web applications Html5 using backend script just as you can on the side SWF (Flash) of things?

    In addition, anyone know what anime-road map will look like?

    Thanks in advance

    using animate than Pro, you can create an ajax function that allows you to send and load data from and to your php file.

    I use jquery because it longer resolves the differences between browsers in the processing of javascript.

  • Do a draggable canvas HTML object

    I have problems Animate to make a movable object.

    I insert the following text in the < head > html document:

    < script type = "text/javascript" charset = "utf-8"src="js/jquery-2.2.3.min.js" > < / script > "."

    < script type = "text/javascript" charset = "utf-8"src="js/jquery-ui.min.js" > < / script > "."

    I have this insert ( pourla being a symbol created within Animate) just before the closing tag < / head >:

    < script >

    $(dragobject);

    function dragobject() {}

    $('theobject').draggable ();

    }

    < /script >

    pourla remains undraggable. I suspect it has to do with path names animate its symbols.

    Any ideas would be appreciated.

    Some people, when confronted with a problem, think that "I know, I'll use jQuery! They have now two problems.

    But seriously, don't worry because, among other things, the objects of fashion Canvas are not HTML entities. They only exist within the data structures of CreateJS, jQuery know nothing about.

    Create a drag-and - drop is quite feasible without obtaining any other responsible for libraries. Start here:

    EaselJS tutorial: Mouse Interaction

    Also, don't make a habit of manually change the code in the .html files. 99 + % of the time there is no reason to do so. Just type on the timeline in the IDE.

  • Flash CC: use jQuery functions

    I want to use the jquery functions in flash for html5 game that I build. What I tried to do is add the following lines, and then use the simple jquery function, but it seems not responsible, because I get the error: $ is not defined

    This is my code, which is located in the first frame of the main timeline:

    var head = document.getElementsByTagName('head')[0];
    var file = "http://code.jquery.com/jquery-1.11.0.min.js";
    var ref = document.getElementsByTagName('script')[0];
    var js = document.createElement('script');
    js.src = file;
    ref.parentNode.insertBefore(js, ref);
    
    console.log(head.outerHTML);
    console.log($(document).height());
    
    
    console.log($(document).height());
    

    I see in the console log, the result is the following:

    < head >
    < meta charset = "UTF-8" >
    GGG < title > < /title >
    "< script src ="http://code.jquery.com/jquery-1.11.0.min.js"> < / script > < 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 = "ggg.js" > < / script >
    < script > canvas var, Stadium, exportRoot;
    function init()
    {
    canvas = document.getElementById ("canvas");
    ! important; ' > exportRoot = new lib.ggg ();
    Stadium is new createjs. Internship (Canvas);
    stage.addChild (exportRoot); internship. Update();
    createjs. Ticker.setfps(25) (lib.properties.fps);
    createjs. Ticker.addEventListener ("tick", stage);
    }
    < /script > < / head > ggg.js:163

    1. > Eception ReferenceError: $ is not defined

    What is the problem with that? and what I should do if I use jquery?

    TIA

    Hi Rotem,

    The correct way would be to publish your Web project once, then open the html published outside and include the jquery lib or any other lib, that you can use.

    Now go to the fla file in Flash Pro, open publication settings and uncheck - "replace the HTML code".

    In this way, your HTML file does not get overwritten every time that you publish and the assets of drawing and animation is refreshed.

    PS: This setting is made available in the latest version: Flash Pro CC 2014 (14.0.0.110). So make sure you update your Flash Pro, if it is not up-to-date.

    -Mabrouk

  • How to load several HTML5 canvas on the same page (the right way)

    Hello

    I struggled to load several animations of canvas on the same page. At the beginning, I thought that export movies with different namespaces and reload the libraries in a sequential workflow might work, but it doesn't. It still load just the last loaded movie. More info here: coding challenge: what am I doing wrong?

    Here's a sample of what I'm doing:

    1: publish two flash animations with namespaces customized to "lib" defined in the "publication settings": "libFirst" and "libSecond".

    2nd: Edit the canvas tags in the HTML page. One called "firstCanvas" and another one called "secondCanvas".

    3rd: change the javascript like this:

            <script>
                // change the default namespace for the CreateJS libraries:
                var createjsFirst = createjsFirst||{};
                var createjs = createjsFirst;
            </script>
            <script src="//code.createjs.com/easeljs-0.7.1.min.js"></script>
            <script src="//code.createjs.com/tweenjs-0.5.1.min.js"></script>
            <script src="//code.createjs.com/movieclip-0.7.1.min.js"></script>
            <script src="{{assets}}/js/first.js"></script>
            <script>
                function initFirstAnimation() {
                    var canvas, stage, exportRoot;
    
                    canvas = document.getElementById("firstCanvas");
                    exportRoot = new libFirst.first();
    
                    stage = new createjsFirst.Stage(canvas);
                    stage.addChild(exportRoot);
                    stage.update();
    
                    createjsFirst.Ticker.setFPS(libFirst.properties.fps);
                    createjsFirst.Ticker.addEventListener("tick", stage);
                }
            </script>
            <script>
                // change the default namespace for the CreateJS libraries:
                var createjsSecond = createjsSecond||{};
                var createjs = createjsSecond;
            </script>
            <script src="//code.createjs.com/easeljs-0.7.1.min.js"></script>
            <script src="//code.createjs.com/tweenjs-0.5.1.min.js"></script>
            <script src="//code.createjs.com/movieclip-0.7.1.min.js"></script>
            <script src="{{assets}}/js/second.js"></script>
            <script>
                function initSecondAnimation() {
                    var canvas, stage, exportRoot;
    
                    canvas = document.getElementById("secondCanvas");
                    exportRoot = new libSecond.second();
    
                    stage = new createjsSecond.Stage(canvas);
                    stage.addChild(exportRoot);
                    stage.update();
    
                    createjsSecond.Ticker.setFPS(libSecond.properties.fps);
                    createjsSecond.Ticker.addEventListener("tick", stage);
                }
            </script>
    
    <body onload="initFirstAnimation(); initSecondAnimation();">
    
    
    
    

    Could someone please answer with best practices on how to do it? If possible, without the need to reload all libraries...

    If I only need to show a flash animation at the same time, it would be more efficient to cut/paste the canvas using jQuery tag in the DOM and reload a different lib on this subject?

    Thank you very much!

    #flash #reborn

    I was able to remedy. In the end, it was easier than I thought. Just publish using namespace different 'lib' for each film, load all the scripts at the end of theand add the following in the onload or ready events:

    $(document).ready(function () {
    
            var canvas, stage, exportRoot;
    
            // First movie
            canvas = document.getElementById("firstCanvas");
            exportRoot = new libFirst.first();
    
            stage = new createjs.Stage(canvas);
            stage.addChild(exportRoot);
            stage.update();
    
            createjs.Ticker.setFPS(libFirst.properties.fps);
            createjs.Ticker.addEventListener("tick", stage);
    
            // Second movie
            canvas = document.getElementById("secondCanvas");
            exportRoot = new libSecond.second();
    
            stage = new createjs.Stage(canvas);
            stage.addChild(exportRoot);
            stage.update();
    
            createjs.Ticker.setFPS(libSecond.properties.fps);
            createjs.Ticker.addEventListener("tick", stage);
    
            // Third movie
            canvas = dument.getElementById("thirdCanvas");
            exportRoot = new libThird.third();
    
            stage = new createjs.Stage(canvas);
            stage.addChild(exportRoot);
            stage.update();
    
            createjs.Ticker.setFPS(libThird.properties.fps);
            createjs.Ticker.addEventListener("tick", stage);
    });
    
  • Effect of Parallax JQuery suddenly stop working on some website.

    Nice day!
    Another day, I noticed the Parallax background effect jquery stops working on the site https://nplus1.ru (background photos in the middle of the pages like https://nplus1.ru/material/2015/11/06/twin-numbers ).
    I tried to clean new Firefox profile (result positive, everything works as expected); Restart in SafeMode on current profile has no effect. I don't want to reset my current profile, so please help me understand what is bad about: config or smth else.

    There was a parameter in Subject: config who broke the functionality of the site: dom.w3c_touch_events.enabled is set to 1 (instead of default 0value). At the time when I have to reset everything starts work as expected.

    UPD: it is more intelligent set the preference to 2 ('auto-detect', as we taught by DND ).
    Head tilting button "simulate the events of button" mode "Responsive design view" toggles. Pref value between 0 and 1, but never 2.

  • calendar for the week of jQuery does not work in the new version of firefox v42.0

    Hello
    Thanks for your reply.
    IAM develop on the issue that iam facing knowledge, events on the calendar for the week of jquery does not work in firefox version iam 42.0 faced to the problem that iam unable to change back or delete nominations that are displayed.
    For example if try clicking on one of the appointment generally a popup comes to change or to restore or remove the appointment but iam not getting that. But this feature does not work in lower versions of firefox (version 32.0 for example). Please check the jquery week calendar demo following URL looks like this:
    http://robmonie.github.IO/jQuery-week-calendar/full_demo/weekcalendar_full_demo.html

    I've just rescheduled lunch 12:00-12:15, so it seems to work on 42 Firefox on Windows.

    What is the latest version, where it has worked for you?

    Have you tested Mode Firefox safe to rule out the possibility of an extension conflict? See: Firefox in Safe Mode troubleshooting questions.

  • 35 &amp; 36 on Mac Firefox selects listboxes (html select) created by javascript / jquery, unless I put the focus programmatically or I right click on it.

    I'm creating a single page app and newly created < select > < / select > does not work. It seems that the problem is that these select do not update when I click it. If I have (1) set focus programmatically; or, (2) rigth click once, it works normally. Firefox 35 / 36 on Mac OSX 10.10.2.

    I have it!

    I used the . deprecated function of jquery-ui disableSelection() . It should prohibit users to select text, but seems to give this collateral effect on FF.

    I'll try a suggested alternative CSS here .

    Thank you!

  • Logo version 33.0 is as painted Firefox piece of canvas in the background by hand. Is what to be expected or spam?

    Last week, I've upgraded to Firefox v.30.0. After it has been installed, the standard logo appeared and was overlaid by another top resembling Firefox painted by hand with pink canvas Board in the background. Is this normal or a spam? What should I do?

    Hello bipinbaxi, this is just an excerpt interactive integrated favouring the gaming capabilities of the browser, which airs for 1-2 weeks.

    https://blog.Mozilla.org/blog/2014/10/14/play-awesome-indie-games-directly-in-Firefox-including-the-award-winning-FTL/

  • Drawing s combined arc introduced into canvas?

    Hello

    I'm working on an HTML5 canvas game, where some areas need to be stretched connceted in sort of a "blob" of circles.

    The code to draw using im looks like this, and an example can be found on github:
    https://github.com/JRIE/connect

    The error is visible when a fleet is surfed outside the main circle, check that:
    Click the icon of the fleet, click on the planet, by pressing T to take a tour and see the fleet moves
    At one point, a graphic strange, similar to a triangle or an extension error.

    Please try different distances, destionations as possible, its always this strange effect.

    The result is the code in question:

    Line 2340 until 2348

    gameScreen.beginPath();
           for (area in env.scanAreas) {
               scanArea = env.scanAreas[area];
               scanX = scanArea[1] + env.offsetX;
               scanY = scanArea[2] + env.offsetY;
               gameScreen.arc(scanX, scanY, scanArea[0], 0, 6.28);
           }
    
           gameScreen.closePath();
           gameScreen.fill();
    

    If the beginPath and closePath and filling are all crammed into the loop for, he draws well, but it's a different and not a "blob" effect, as requested in this case.

    Hello Patrick,.

    Thank you for coming back to me. For some reason any, that I found my problem, it was not really related to the order of the code, but which drew a circle, and then plotting another circle further, without using a "canvasObject.moveTo" - there is another draw of line as the 'pencil' moves to the location of the new circle, creating a kind of intersection.

    I initially thought it was a kind of record, but this time there it a certain sense - think of a turtle drawing engine.

    In any case, thanks for responding!

  • Why FireFox allows "Canvas prints" to follow me?

    As "Canvas prints" seems to be the new mode of monitoring one. How does a TURN IT OFF!
    ---

    A New Form of Online Tracking: Canvas Fingerprinting
    

    http://YRO.Slashdot.org/story/14/07/22/0140256/a-new-form-of-online-tracking-canvas-fingerprinting
    ---
    Posted on Tuesday, July 22, 2014 @ 08:06 by Unknown Lamer
    from the subverting-features-for-evil-and-profit Department.
    New author bnortman (922608) was the first to write with the word of globaljustin "a new research paper discussing a new form of taking fingerprints and follow-up for the web using the HTML 5 < canvas > the user." adds more than one item to Pro Publica: works footprints canvas by loading the browser of the visitor to draw a masked image. Because each computer draws the image slightly differently, the images can be used to assign the device to the user a number that uniquely identifies. ... The researchers found the footprints canvas computer code... on 5% of the top 100,000 Web sites. Most of the code has been on Web sites that use AddThis social media sharing tools. Other fingerprinters include commercialization of digital German Ligatus and the Canadian dating site Plentyoffish. ... Rich Harris, Executive Director of AddThis, said that the company began testing the canvas prints earlier this year as a way to replace the biscuits...

    Pro Publica article, to date, this technology is not particularly accurate in itself. Nevertheless, perhaps it could be combined with other information to uniquely identify your browser.

    The JavaScript canvas feature is useful for animations and is now used by Google to draw spreadsheets. Turn it off - if there were a convenient way to do - should allow specific exceptions to the site, so you can use canvas where it is useful. I'm not aware of any peculiarity or add-on for that.

    Perhaps someone could create an add-on that would cause the canvas to a certain degree of hazard, so that every time you visit a site that is just a bit different, and this is why the site doesn't know that it is the same browser each time. Obviously you wouldn't want to ruin, not that useful to the canvas, so it would need to be subtle.

    In the short term, have you considered using the NoScript extension? Followed most bothers people (follow-up of your sitenavigation) is performed by scripts served 'third-party' servers. If you keep scripts from these servers disabled as far as possible, you can limit the ability of the ad networks or others to follow you everywhere.

  • Can't hide from the elements without/with jQuery

    I created new Addon for my Firefox I use myself, but can't get it hide items with or without jQuery. It does not matter at all to use jQuery together.

    XUL file creates the toolbar with a button that have "oncommand ='Unlock ()" "" and it also includes the .js file that have function Unlock()

    Well. in any case, I think that my default files has been implemented correctly, because I have "alert ('Starting...');" before the line item to hide and he says 'go '. "with alert, but after that it is not made effects for the element in the example 'idofelement '.

    js file contains "document.getElementById('idofelement').style.visibility ="hidden"
    I tested different types of methods that hide the element in the example style.display = 'none', but none of them works.

    He always says 'go '. "so he runs the function properly, but nothing happens after that.

    Found the solution. I googled this for several days, but did not find a solution. Just used keywords "firefox addon getelementbyid" and selected "disorders" with it and found the solution. I had to use:

    content.document.getElementById ("id") so in other words I had to add the word 'content' in the front of the document.

    Thank you!

  • So congratulations. Your last update (19) beat Jquery selectors of dates on Web sites all over the world

    Millions of Web sites that do not call Jquery datepickers in fields of seizure with an attribute date no solitary work today for users who are viewing these sites with 19 FF. First jumps of Chrome date from the municipality and now Firefox. I guess that the rest of the browser will not want to be left for some great idea on the horizon which is the root cause of all this, but it's serious. MILLIONS of Web sites no longer work, and webmasters are scrambling to find solutions. All that was expected by all that you people of browser for entry with a date attribute fields, won't happen because you have forced people to call the dates by any other method selectors. This means that entry with a date attribute fields will disappear.

    Thanks a lot guys!

    For me at least, the question is now irrelevant. Apparently the built-in popup date picker that any serious web developers will not want, is here to stay.

    The only option now is to remove the type = "date" attribute of input fields where you want to call a date picker custom. Instead, you must define the field type = "text" and call the datePicker custom for fields with a specific class name.

  • Update the drop-down menus and jQuery sortable collide with the 16.0.2

    The drop-down menus that are contained in a table sortable jquery act as if they are disabled. By clicking on them, doesn't matter. I can tab in the menu drop down and control it with the arrow keys, but the mouse does nothing. The menus outside of the table still work very well. This problem only occurs in Firefox 16.0.2 on several computers, all equipped with Windows 7. The problem does not occur in IE9, Chrome or Safari. In addition, the problem does not occur in Firefox 15, but it occurs in Firefox 17 Beta. I did not see anything addressing this specific issue, so I guess this isn't a known issue.

    The problem has been resolved.

Maybe you are looking for

  • Storage issues

    I have a Mac Book Pro. recently, he said that I ran out of storage. When I investigated further my lap top told me that I have almost 80 GB of movies. I went threw all the files on my mac and deleted everything related to film and it made no differen

  • Satellite U200-148: how to restore Laurent hotkey?

    I have a Satallite U200 - 148. Had some spyware Vndo problems after what some shortcut keys do not work. Please suggest a way, how to restore?Will be really greatfull.

  • Random BSOD, all drivers, firmware and bios updates. Need help!

    Hello, before Thursday and the release of Windows 7 x 64 I was running XP pro x 64, I did a clean install of Win 7 Home premium x 64 and was faced with random BSOD every hour. I've updated all my drivers, bios, hardware, everything that I could think

  • Microsoft mouse 3000 - cursor wont move it please help

    original title: I have a mouse microsoft 3000 green light is on ive fact battery but the cursor doesn't move it please help I have a microsoft mouse 3000 it simply stopped working Ive changed the battery, the green light is on the Red usb port is on

  • Lights diagnostic OptiPlex 3010 Mini-Tower 3 &amp; 4

    Hi all, I'm new to this forum. 2 years ago, I bought a dell optiplex 3010 mini tour, suddenly, it stopped working, I have no screen, no video or any kind of sound, the only thing it does is to turn on the lights of number 3 & 4 on the front panel. Wh