Using JSON in border animated

Hello together,

I'm trying to use JSON in edge animate.

My goal is to put all the texts and images of edge animate in a JSON file.

The text file looks like:

var = JSONObject

{

Text of the page

"text':"Hello. "

'image': {}

'src': ' images/test.png '.

}

};

There is no problem with the reading of the text of the file:

sym.setVariable ("text", JSONObject.text);

SYM.$("text").html (sym.getVariable ("Text"));

But it doesn´t work with the loading of the image. I tried like

sym.setVariable ("image", JSONObject.image.src);

SYM. $("test_image") .css ({' background', sym.getVariable ('image')});

but no luck. Can someone help me?

Hello

(1) your error: you do not use the property CSS background as required.

SYM. $("test_image") .css ("background-image", "url (" + sym.getVariable ('image') + ")");


(2) another solution: previous post.

Tags: Edge Animate

Similar Questions

  • ATTENTION: nsIJSON.decode is obsolete. Use JSON.parse instead.

    ATTENTION: nsIJSON.decode is obsolete. Use JSON.parse instead. Symptom. WHN I open a new tab, the creen goes on with my screens recorded, but none of them will load.

    Try Firefox Safe mode to see how it works there.

    A way of solving problems, which disables most of the modules.

    (If you use it, switch to the default theme).

    • You can open the mode without failure of Firefox 4.0 + by pressing the SHIFT key when you use the desktop Firefox or shortcut in the start menu.
    • Or use the Help menu option, click restart with the disabled... modules while Firefox is running.

    Do not choose anything at the moment, just use 'continue in safe mode.

    To exit safe mode of Firefox, simply close Firefox and wait a few seconds before using the shortcut of Firefox (without the Shift key) to open it again.

    If it's good in Firefox Safe mode, your problem is probably caused by an extension, and you need to understand that one.

    http://support.Mozilla.com/en-us/KB/troubleshooting+extensions+and+themes

    When find you what is causing that, please let us know. It might help others who have this problem.

  • How to use json webservice in blackberry waterfalls

    1. how to use json WebService in the cascades of blackberry.

    2.i need to get data from url link in the qml page. give suggession with examples if possible.

    my link of web service contains the type of array

    for example: {'address': ['zone': 'RCS', 'city': 'ght']}

    Description:

    JSON link--> http://192.168.1.251:410/Mobile/Service1.svc/english/Category?CountryID=1

    using link above please ask how to recover data from json webservice cascading... I need answer to the method of waterfalls...

    Finally, I am me anser for service web json

    Response---> http://stackoverflow.com/questions/18598886/how-to-use-json-webservice-in-blackberry-cascades/186230...

  • JVM error 104: eception native error when you use json jar in the blackberry Simulator

    I'm developing an application where I have to use JSON to fill a listfield.

    I find my JSON response string and now being converted into a JSON object.

    I imported the

    org.json.me.JSONObject
    

    and have referenced the jar JSON as a dependency file after making it a library.

    I use the JDE 4.5... How can I solve this? Thank you.

    I solved this problem by including the file given by Peter Strange at this url:

    http://supportforums.blackberry.com/t5/Java-Development/JSON-library/m-p/573687
    

    Then, I changed the name of the package to reflect mine. This has resolved the original error.

  • Help to use JSON in 12.1 Oracle database

    Hello

    I would like to help to implement JSON in my 12.1 Oracle database:

    Here is my current data model:

    Table met_p6_point

    CREATE THE TABLE EIGJSON. MET_P6_POINT

    (

    INTEGER ID,

    DATE_VALID TIMESTAMP (6) NOT NULL,

    FLOAT VALUE (126)

    )

    some data:

    THE VALUE OF THE ID, DATE_VALID,

    867154,01/01/2015 03:00 000000, 6

    867155,01/01/2015 01:00, 000000, 4

    2015/01-867155,01 02:00, 000000, 3

    ...

    saves the County: 37 006 645

    Table met_p6_ref

    CREATE THE TABLE EIGJSON. MET_P6_REF

    (

    ID INTEGER NOT NULL,

    TYPE_PREV INTEGER NOT NULL,

    LOCATION INTEGER NOT NULL,

    DATE_PUBLI TIMESTAMP (6) NOT NULL

    )

    some data

    ID, TYPE_PREV, LOCALIZATION, DATE_PUBLI

    615,1,497,26/06/2013 18:00, 000000

    616,1,510,26/06/2013 18:00, 000000

    617,1,579,26/06/2013 18:00, 000000

    618,1,588,26/06/2013 18:00, 000000

    ...

    saves the County: 1217964

    Table met_panier32

    CREATE THE TABLE EIGJSON. MET_PANIER32

    (

    ID INTEGER NOT NULL,

    WMO INTEGER,

    NAME VARCHAR2 (45 BYTES) DEFAULT NULL,

    LAT FLOAT (126).

    LON FLOAT (126).

    WEIGHT FLOAT (126).

    CP INTEGER NOT NULL,

    INSEE INTEGER NOT NULL,

    VARCHAR2 (100 BYTE) DEPT NOT NULL,.

    VARCHAR2 (100 BYTE) REGION NOT NULL,.

    X_DEPT FLOAT (126).

    Y_DEPT FLOAT (126)

    )

    some data

    ID, WMO, NAME, LAT, LON, WEIGHT, CP, INSEE, DEPARTMENT, REGION, X_DEPT, Y_DEPT

    1,2, BOULOGNE ON SEA, 50, 727, 1, 6, 0, 01, 62200, 62160, 62, 31, 85, 115

    2.5, ABBEVILLE, 50, 111, 1, 838, 0, 01, 80100, 80001, 80, 22, 110, 70

    3.15, LILLE, 50, 635, 3, 064, 0, 03, 59000, 59350, 59, 31, 205, 120

    4.27, CAEN, 49, 18, - 0, 357, 0, 025, 14000, 14118, 14, 25, 195, 110

    5 110, BREST, 48, 391-4, 485, 0, 042, 29200, 29019, 29, 53, 120, 100

    ...

    record count: 32

    Table cal_hor

    CREATE THE TABLE EIGJSON. CAL_HOR

    (

    HL24 TIMESTAMP (6) NOT NULL,

    TIMESTAMP (6) UTC NOT NULL,.

    WHOLE TIME

    )

    HL24, UTC, HOUR
    26/01/2010-06:00, 000000, 26/01/2010 05:00, 000000, 6
    26/01/2010-07:00, 000000, 26/01/2010-06:00, 000000, 7
    26/01/2010-08:00, 000000, 26/01/2010-07:00, 000000, 8
    26/01/2010-09:00, 000000, 26/01/2010-08:00, 000000, 9

    ...

    saves the County: 96433

    I want to create a new table:

    CREATE THE TABLE EIGJSON. MET_P6_REF_POINTB
    (
    ID INTEGER NOT NULL,
    TYPE_PREV INTEGER NOT NULL,
    LOCATION INTEGER NOT NULL,
    DATE_PUBLI TIMESTAMP (6) NOT NULL,
    CLOB DATA
    )

    How to insert data into the new table?

    I am trying to find an INSERT SQL command like this:

    INSERT INTO met_p6_ref_pointb

    SELECT 'ID', location, type_prev, date_publi,

    row_to_json (met_p6_point): jsonb

    OF met_p6_ref

    Join met_p6_point using ('ID');

    But there is no row_to_json in oracle 12.1

    Suspicion and advice would be appreciated.

    Thanks adavance.

    I have the solution. This is the query.

    I think he can help other people who want to use JSON data:

    INSERT INTO met_p6_ref_pointb

    SELECT 'ID', type_prev, localization, date_publi, "{'ID':}" | ID | ","DATE_VALID":'''|| LTRIM (DATE_VALID) | " ', 'VALUE': ' | {VALUE |'} '

    OF met_p6_ref

    Join met_p6_point using ('ID');

    It works for me.

  • Use JSON with REST API vCO 5.1

    I'm developing a simple REST client to run a workflow in vCO.  I am using perl and the module REST::Client, which is pretty simple.  I can retrieve the items in the inventory and definition for my target workflow, but when I try to POST a run, I get an error report by stating:

    The request sent by the client is syntactically incorrect.

    I use JSON (as is the default output of the vCO if no Content-Type is specified, and my personal preference), and the JSON format documentation is pretty sparse compared to the XML documentation.  The documents describe the context of execution as follows:

    { "parameters" : [ { "name" : "...", "type" : "...", "description" : "...", "scope" : "local", "value" : { } }, ... ] }

    My workflow accepts two string for the input parameters and returns a string as output parameter.  I read that the scope and description fields are optional, and I am omitting the two.  Clearly, however, Miss something needed on the structure of the execution context.  Can anyone help to shed light on this?

    Complete debugging:

    Accept: application/json
    Accept-Encoding: gzip, x-gzip, deflate, bzip2-x
    Authorization: *.
    User-Agent: REST::Client/249
    Content-Length: 137
    Content-Type: application/json
    {"parameters":[{"value":"10.0.0.0/24","name":"network","type":"string"},{"value":"test-hostname.dom","name":"hostname","type":"string"}]}

    HTTP/1.1 400 Bad Request
    Connection: close
    Date: Wednesday, December 5, 2012 19:01:11 GMT
    Server: vCO Server
    Content-Length: 965
    Content-Type: text/html; charset = utf-8
    Client-Date: Wednesday, December 5, 2012 19:06:21 GMT
    Client-Peer: *: 8281
    Customer-response-Num: 1
    Client-SSL-Cert-Issuer: /C=US/O=VMware/OU=VMware/CN=localhost.localdom
    Client-SSL-Cert-subject: /C=US/O=VMware/OU=VMware/CN=localhost.localdom
    Client-SSL-Cipher: DHE-RSA-AES256-SHA
    Client SSL-Socket-class: IO::Socket
    Client alert-SSL: certificate of the peer unaudited
    Title: JBossWeb/2.0.1.GA - error report


    < html > < head > < title > JBossWeb/2.0.1.GA - error report < / title > < style > <!-H1 {do-family: Tahoma, Arial, without serif; color: white; background-color: # 525 76; do-size: 22px ;}} H2 {do-family: Tahoma, Arial, without serif; color: white; background-color: # 525 76; do-size: 16px ;}} H3 {do-family: Tahoma, Arial, without serif; color: white; background-color: # 525 76; do-size: 14px ;}} BODY {do-family: Tahoma, Arial, without serif; color: black; background-color: white ;}} B {do-family: Tahoma, Arial, without serif; color: white; background-color: # 525 76 ;}} P {do-family: Tahoma, Arial, without serif;: white background; color: black; do-size: 12px ;}} A {color: black ;}} B.SID {color: black ;}} HR {color: # 525 76 ;} - > < / style > < / head > < body > < h1 > State HTTP 400 - < / h1 > < HR size = "1" = "noshade" noshade > < p-type > < b > < /b > < /p > < p > < b > report message < /b > < u > < / u > < / p > < p > < b > description < /b > < u > the request sent by} the client was syntactically incorrect (). < /u > < /p > < HR size = "1" noshade "noshade" = > < h3 JBossWeb/2.0.1.GA > < / h3 > < body / > < / html >

    There was a problem with the value of the format JSON deserialization, it is fixed and will be available in version 5.1 of U1.

  • How to use a panel of animation working with DPS function

    I am a mobile magazine using DPS to the Adobe Indesign program.

    Is it possible to use any function the animation Panel?

    I want to apply fade in and fade out effects to the mobile magazine and I tested it several times with the smart phone and the content viewer Adobe but it does not work.

    (I used a function of animation in different mobile magazine before).

    and more.

    During the test, image and text on the scrolling frame are not due to the scrolling frame.

    Waiting for an answer of who are advanced in this program.

    MungukBae wrote:

    Is it possible to use any function the animation Panel?

    Not without a solution to third. Discover in5. http://InDesignSecrets.com/IN5-include-InDesign-generated-animation-DPS-articles.php

    During the test, image and text on the scrolling frame are not due to the scrolling frame.

    That makes no sense to me. Can you expand on that?

  • Busy using Modernizr in border

    Hi all
    I try to use modernizr in animated border to check the capabilities of touch, but I can't make it work.
    I get this error message > Javascript error in the event handler. Type of event = element.
    This is my code so far:

    in creationComplete


    yepnope({)

    load: ['libs/1.1.0/js/min/EdgeCommons.js', 'libs/1.1.0/css/style.css', 'libs/js/modernizr.js']

    });

    in compositionReady


    sym.inTouchMode = function() {}

    If {(Modernizr.touch)

    Console.log ("Touch Me!");

    }

    else {}

    Console.log ("can't touch this!");

    }

    }

    sym.inTouchMode ();

    Any help would be appreciated. Thank you!

    Hello

    When you call your function, the loading process is not finished. As a result, it returns an error.

    Please, give the code yepnope and use the library panel to load js files.

    (1) library panel > Scripts > + button > your file

    (2) compositionReady: if (Modernizr.touch) {console.log ("Touch Me!")  } else {console.log ("can't touch this!")}

  • Length Variable TEXT of JSON in edge Animation animate [v 2014.1.1]

    Hi all..

    I am currently conversion HTML & CSS & JAVASCRIPT code in Edge animate so I can have more fun with my little project, essentially the re-design it in Adobe Edge

    Part Composition edge information displays on the screen that is seized with a JSON encoded a PHP file, these recovered data is variable in length... It could be 10 characters in length or width of 30 characters. According to the total length of the characters I choose the time to animate the text from left to right (as a framing box)...

    It is important for me to explain here what to expect from this animation.

    Example:

    We have a wide rectangle of 100PX. If the json data is less than the width of the rectangle, then then the text should be left justified and stationary.

    If the json data is greater than the width of the rectangle then the animation should proceed as follows.

    START: justify text on the left and hide the text to the right which goes beyond the edge of the right side of the rectange.

    ANIMATE: move text to the left until the end of the text reaches the right side of the rectangle, then move to the position of starting with the loop.

    At the time I had the project in HTML & CSS & JAVASCRIPT format I lower the JSON data encoded in DIVs, then switch the DIV class according to the then the length of the data. If the width of parents ("outerDiv") has been less then data then the CSS .animate class would take over, otherwise, it would default to CSS .noAnimate


    This is how it was done.

    1: JavaScript


    It's my JavaScript that traverses the coded the data PHP JSON results. (I've omitted many of the results in the code below to make it easier to read)

    function playlistupdate (list)
    {
    for (var i = 0 ; i != list.dbdata.length ; i++)
        {
            var song = list.dbdata[i];
       
        }
    {
        $("#list0title").html(list.dbdata[0].title);
    
    
    
    
    

    This part should check the width of the PARENT ("outer div") and see if it is LESS than the width of the JSON data. If it was it would use the .animate instead of .noAnimate class

    $('.noAnimate').each(function() {
        $(this).toggleClass('animate', $(this).parent().width() < $(this).width());
    });
    
    
    
    
    


    2: the CSS


    No animation

    Here's the CSS if the data is less than the parent DIV width...

    .noAnimate {
        position:absolute;
        white-space:nowrap;
        overflow: hidden;
    }
    
    
    
    
    

    Animation

    Here's the CSS if the data is greater than the width of the parent DIV ... (I omitted the other browser compatibility to make it easier to read)

    .animate {
        position:absolute;
        white-space:nowrap;
        overflow: hidden;
        -moz-animation: slidein 3s infinite linear alternate 1s;
        -webkit-animation: slidein 3s infinite linear alternate 1s;
        -o-animation: slidein 3s infinite linear alternate 1s;
        animation: slidein 3s infinite linear alternate 1s;
    }
    
    @-moz-keyframes slidein {
        from {
            -moz-transform:translateX(0);
        }
        to {
            -moz-transform:translateX(-100%) translateX(254px);  /* -100% + parent width */
        }
    }
    
    
    
    
    

    Stuff pretty basic and useful if someone wants to use it...

    3: the problem


    Now I face on the issues to the JSON data alive in my Composition of edge.

    As I understand it, animate Dashboard will not allow animations out of JQuery so the foregoing CSS is basically usless.


    While I have no problem taking a simple fade in for my JSON like data below (stored in the symbol "nowPlay" where I put an opacity of the keyframe to 0% at zero seconds at 100% to 2 seconds im stumped as how to start to be converted to usable JQUERY )


    for (var i = 0 ; i != list.dbdata.length ; i++)
        {
            var song = list.dbdata[i];
        }
    {
        sym.getSymbol("nowPlay").$("list0TitleContainer").html(list.dbdata[0].title);
        sym.getSymbol("nowPlay").play();
    ...continued
    
    
    
    
    


    It is now well above my skill level and please im extremly clued coders out there can help me make the transition.


    The final result if not completely understood is that if the width of the text is less than outside container then animate not from left to right... Otherwise, if the text is larger, then the width of the outer div then animate from left to right.


    It is a personal project.


    I know its been a long read... If anyone can help shed some light please do... If not I hope that some of the above CSS could be useful to people.



    Thank you very much... Justin.

    Now, I apply the effect of text to symbols: Symbols.zip - Box effect

    That it would be easier to sym.createChildSymbol ();

  • Example of application using json or xml

    Hello

    I am new to blackberry. can any body have examples of connection authentication code, in which we pass user name and password, once we get respone in json or xml.

    If sombody have runing code please help me...

    Mr President, in fact, I know there are two type of request is GET and other POSITIONS. In both we get respose, but if I want to send encrypted url, so I have to use the POST request. So I want to just how we can use the POST request. ? get a respone.

    Example connection authentication. in which we sends the user name and password if username and password (ask the waiter) is right, then his answer is true otherwise false.

  • How to use JSON?

    Hello

    I am writing my first blackberry application.

    I can receive and analyze the JSON files without any problems, but it is not very tidy.

    Basically, app will have 3 screens. First 2 screens will receive JSON files and analyze, last screen will collect the form entries and send back to the server.

    Advice on how should I apply it?

    discussions are started using start(), do not run (all made that mistake at one time or another).

    I would also say to start the thread of the application constrcutor, not on screen one, just to keep things a little separate. While BB violates MVC on some parts, you should try to stick to it.

    You can find many examples on the recall, for example

    http://www.JavaWorld.com/JavaWorld/javatips/JW-javatip10.html

    After you have assigned your json object, you can use the callback method to publish it. See the link above, you can add it as an argument to the interface method.

    Now let your screen implement this interface. and give your thread of an instance of the form as a parameter (wrapped in the interface).

  • How to call REST JSON using JSON Datacontrol REST secure service?

    Hello

    I use 12.2 of the ADF.

    I created a datacontrol REST JSON to call a simple Web service.

    Which works very well.

    Then, we have added Basic for this webservice.


    In order to make this work, I used the steps in the guide of the developer (http://docs.oracle.com/middleware/1221/adf/develop-data-controls/)

    • 5.2.4 How to include a header to a Web Service data control parameter
    • 5.2.5 How to include a header setting customized for a RESTful Web Service

    I have the header parameter in the connection.xml

    <httpHeaders paramName="Authorization" value="#{backingBeanScope.securityBean.myAuthorization}"/>
    
    

    The question I have now is this:

    What should be the exact value of the property of myAuthorization?

    I tried the following, but it doesn't work.

    public class SecurityBean {
          private String myAuthorization;
          public SecurityBean() {
             
          String username ="theUser";
          String password ="hisPassword";
             
              String myAuthorizationString = "Basic " + username+":"+password;
             
              Base64.Encoder encoder = Base64.getEncoder();
              myAuthorization = encoder.encodeToString(
                      myAuthorizationString.getBytes(StandardCharsets.UTF_8) );       
          }
       public void setMyAuthorization(String myAuthorization) {
            this.myAuthorization = myAuthorization;
        }
        public String getMyAuthorization() {
            return myAuthorization;
        }
    }
    
    


    Any help is appreciated.


    Thank you


    Luke

    LKO

    I messed up. Twice. Three times in fact...

    (1) no need to add an entry in the connections.xml

    (2) look at this code:

    ' String myAuthorizationString = 'Basic' + username + ":"+ password;

    I've done encoding the entire string, including the ' base "..." That is why he is wrong.

    Only need to encode the name part...

    (3) other things wrong in interpreting the developer's guide.

    Here's the code to work. Make sure you check the "Include http head" box when you create the rest service and that you provide the value in the pagedef when you create the service call:

         
    

    Code of the bean, who reads the requestheader and transmits the authorization part to our call for service.

    public class ServiceCallerBean {
    
        private Map httpHeadersMap = new HashMap();
    
        public ServiceCallerBean() {
    
            String autorizationHeader =
                FacesContext.getCurrentInstance().getExternalContext().getRequestHeaderMap().get("Authorization");
    
           System.out.println("#################" + autorizationHeader);
    
            httpHeadersMap.put("Authorization", autorizationHeader);
    
        }
    
        public void setHttpHeadersMap(Map httpHeadersMap) {
            this.httpHeadersMap = httpHeadersMap;
        }
    
        public Map getHttpHeadersMap() {
            return httpHeadersMap;
        }
    
    }
    

    Works like a charm...

    Thanks to the auto ;-)

  • Try using an Autodesk Maya animation in Muse

    So I created animations I want to insert in muse for my site but I don't know what type of file extension to use right now I have them in AVI and it plays very well... but I can't seem to get into the Web site. Is it possible to do this?

    AVI files won't play in a web browser, which means that no matter what web IDE, (Muse, Dreamweaver, Visual Studio or other) you use, you cannot use the file for the web.

    A possible solution, (although the quality can suffer a little) is to use software screenshot to actually "record" of your animation and then what to insert in your web page, in the required format, MP4 and WebM being the longer supported.

    https://developer.Mozilla.org/en-us/docs/Web/HTML/Supported_media_formats

    video capture software-

    https://www.techsmith.com/SnagIt.html

  • Using Json to save illustrator script parameters.

    I'm new to illustrator. I wrote a code base on the scenario of the Illustrator and works very well. I want to save the values in txtbox in json file during the click on butten and extract the same file text box on another click of the button. might help me to write this program.such I use the code of easily.my json objects is given below.please help me by adding json.

    var l is new window ('dialogue');.

    var app.activeDocument = docRef;

    var txtbox = w.add (' edittext', undefined, "" ");

    var btnsave = w.add ("button", 0, 0, 50 (50) and 'save');

    var btnretrive is w.add ("button", 0, 0, 50 (50) and "retrieve");.

    w.Show ();

    is there a particular reason you need JSON? I find easier to read js objects as a json file

    Here's what I do:

    make an object with preferences:

    var prefs = {}

    prefs.txtBox = 'something'

    prefs.btnSave = 'something'

    prefs.btnretrive = 'something'

    Save the object to the file:

    var file = File (directory);

    leader. Open ('w')

    leader. Write (prefs.toSource ())

    leader. Close()

    Open the saved object:

    leader. Open ("r")

    prefs = eval (file.read ())

    leader. Close();

    BTW, you can use any extension you want for the file, it will read all the same. I made an extension customized for all my script preferences.

  • Is Adobe Flash a good program to use for the sprite animation?

    I know that many people use flash for cartoons and things like that but what about sprite animation? I'm looking for a software that will do this kind of animation very well and since I already have a subscription with After Effects and first, it wouldn't hurt to see if Flash would work too.

    Flash is very strong for character animation, or whatever it is animation really. Should normally be used sprite sheets, a Flash animation is a timeline of the individual poses. But other tools do sprite sheets, and Flash Pro is a good tool for creating those. In addition, when you make HTML5 Canvas, Flash Pro projects arguably to use sprite sheets.

Maybe you are looking for