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 ();

Tags: Edge Animate

Similar Questions

  • Adding Adobe Edge animation animate CC 2015 to a Facebook post?

    Where can I find information on how to add an Adobe Edge animation animate CC 2015 to a Facebook post? I tried searching but continue to pour in white. Thanks for any help.

    If you have any interactivity so you can make a recording of the screen and display the video.

  • Cannot use edge animation animate in Magento

    Hello

    I am trying to integrate an animation animate Edge to a site Magento 1.7.0.2 based, but it does not work.

    After you declare the myscript_edgePreload.js and loading the page, I see the following errors in firefox:

    TypeError: A is not a function

    [Cap on a mistake]

    ... Symbol.bindTriggerAction (compId, NomSymbole, "Timeline", 0, function(sym,e)}...

    cardboard... ions.js (line 4)

    TypeError: Symbol is not defined

    [Cap on a mistake]

    ... Symbol.bindTriggerAction (compId, NomSymbole, "Timeline", 0, function(sym,e)}...

    I saw messages from the user having problems similar to the help of Magento, but none of them seem to be resolved.

    Could someone point me in the right direction to solve this please?

    Mathias

    I found the cause of the problem: the images in my myscript_edge.js file is not found. This is because the directory of the image is calculated by the script using base URL of the site that ends with index.php.

    One solution is to replace the image directory in the script with the full path to the images directory.

    You will find the variable directory loaded image of the search for "im var =" in the script.

    If anyone knows how to remove the index.php at the end of the base URL adobe edge is used to calculate the path to the images directory, I'd be interested to hear that.

  • Loading JSON in Edge issues animate

    Why when I load a JSON file I get this problem.

    In the JSON file, there is an object that must be over a string of text more long which will be loaded in the anime.  The loading is very well, everything connects correctly, the problem is the json file.

    Here are two identical json code blocks.  I ran like tests.  The first test loads very well.  The second doesn't.  Note the last line "biography", which is responsible for transporting a large amount of text and does not load.  Any ideas? Is it like in xml, where you need to add a syntax of longer paragraphs?

    FIRST TEST LOADS

    [

    {

    'image': 'images/staff/cindy.jpg ',.

    "thename": "Cindy,"

    "title':"nurse. "

    "certifications": "CDA niv.2, HARP certified RN."

    "Biography": "Short information here.

    }

    ]

    SECOND TEST if I add ALL THE BIO DATA is not load

    [

    {

    'image': 'images/staff/cindy.jpg ',.

    "thename": "Cindy,"

    "title':"nurse. "

    "certifications": "CDA niv.2, HARP certified RN."

    "Biography": "Long Bio here.  Behind the scenes, and supported by a great team of professionals, Pat is responsible for the day-to-day operations of the practice.

    Pat received his certification in 1968.  She joined the practice in 1992 after a long career in the dental industry, notably in helping, office management and training company and consultant for dental offices across the Canada.  A former president of the Ontario Dental Assistants Association (ODAA) Pat received the honor of a life time membership for his contributions to the growth and development of the ODAA and its members.  Pat is a travel enthusiast and enjoys music, reading, and plays. »

    }

    ]

    What I mean, after you add your html tags for

    or
    remove all breaks between line until you have just a long line of DW for example. then copy this text into the json file.

  • Bug. Can not put two edge animations animate on the same page

    Alrighty. Just thanked Adobe for fixation sensitive question scaling. Now, it seems to be a new. When I put two animations dashboard run on the same page, they both disappear completely from the view! Both in mode live view (or which saw fluid grid) and trying to get a glimpse into any browser. The responsive design works fine but if I put two animations on the same page that the two just disappear! GONE!

    Perhaps there is a code that I can use to prevent this. I did a number of tests during the last hour. My smile (from the reactive solution) is now again a frown. I can't keep working like that. Please let me know if there is something I am doing wrong. I have two animations on a page without worries prior to this version, but the delicate design did not work properly. The responsive design work NOW, but I can't have MORE than ONE ANIMATION on the same page. Thanks for your time. Best regards, Julian.

    The use, I did the modification required:

    
    
    
      
    
    
    
    
      
  • 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.

  • Variable text search and replace it with another variable of text

    Hi, I want to do the following with VB script.

    Can someone help me?

    I have a document with A text element and variable text B are defined.

    And A variable text is used in the document.

    1. search all the variable text from the document

    2. replace A text elements for variable text B

    3 Remove A variable text

    Thank you.

    erieru103

    Hello

    Ok. You have your point, sorry...

    As I wrote - VBA do not know, but as JS, it could be like this:

    var
         doc = app.activeDocument, destCell, currFile, currRec, currImage, i,
         mVarA = doc.textVariables.item("variableA"),
         mVarB = doc.textVariables.item("variableB"),
         mVarAinst = mVarA.associatedInstances,
         len = mVarAinst.length;
    
    while (len-->0) mVarAinst[len].associatedTextVariable = mVarB;
    

    mVarAinst is an array of instances of varA ==> no need to search through all doc

    Jarek

  • Formatting and variable text-

    Hi people,

    Just wonder if you pouvez/how you store text in variables with a certain degree of fit.

    The problem - my user selects, for example, I own a "dog" and gets the text of the variable:

    We see that you are a dog owner. We want to sell you a bunch of crap for the purpose of making a bunch of money out of your affinity with your pet. ' This example is several lines long deliberately in order to get my point and included the arbitrary arbitrary text text text arbitrary text arbitrary text arbitrary text arbitrary text arbitrary text arbitrary arbitrary arbitrary text of arbitrary text.

    i.e. If the variables are useful for storing "canned text" somehow, the provision on the integration is not large;

    So we can

    Store text in variables with jumps jumps/new line sentence included, so that our text above would be readL

    We see that you are a dog owner.

    We want to sell you a bunch of crap for the purpose of making a bunch of money out of your affinity with your pet.

    This example is deliberately more...

    to make it more useful for rehabilitation.

    FYI - in our form, once the list selection is the values of variables (text canned) are assigned to the text box.

    Pointers appreciated. Especially if we could get breaks own sentence that would be a good start

    What is the effect you are after?

    Here is one approach.

    Form1.Page1.Subform1.bodytext::calculate - (JavaScript, client)

    If {(form1.page1.subform1.pet.isNull)

    this.rawValue = null;

    }

    else {}

    this.rawValue = "we see you own one" + form1.page1.subform1.pet.rawValue + "." + "\n\n" "»

    + "We would like to sell you a bunch of crap for the purpose of making a bunch of money out of your affinity with your animal." + "\n\n".

    + «This example is deliberately more...» » ;

    }

    Steve

  • Variable text and graphics

    I just started using InDesign for the formatting of books. I created a text variable to use as a head of the race with each chapter at the top of the page name. The problem is: I want to incorporate a small graphic symbol in the head of the race, next to the name of the chapter. I put all the elements on a master page, but since the length of the variable text changes with each chapter name, the distance between the graphics and the current title changes. Is there anyway to integrate a graphic in the variable text itself, so it remains constant with changing text?

    Thanks for any help.

    You can not put the image in the variable, but it looks like you want it next to the variable. What you can do.

    Place the graphic symbol in current title after the variable text, or, if you already have put as a static picture, cut the frame and paste it into the text after the variable. If he has pasted or placed in the text, it will be an anchored frame and it will be able to move in the text moves (as the variable takes up more or less text).

    Ken

  • 6500 HP Officejet wireless on the 2nd side [rear] of the document, the text to the top edge of the paper is partially cut.

    On two-sided printing, the text is correctly aligned each time on the 1 side of the paper. However, on the 2nd side of the paper [back], the text to the top edge of the paper is partially cut. Would appreciate help or suggestions you may have in this regard.

     

    Hello

    As OEM HP is responsible for the good operation of the printer and their
    drivers provided. Check with HP support, their documentation online and
    drivers and ask in their forums.

    You may need to update or reinstall the latest driver.

    HP support/troubleshooting & drivers
    http://welcome.HP.com/country/us/en/support.html

    Contact HP
    http://welcome.HP.com/country/us/en/contact_us.html

    HP forums
    http://h30434.www3.HP.com/PSG/

    =============================================

    The main issue is probably the drivers, but these can help:

    Add or remove a printer
    http://Windows.Microsoft.com/en-us/Windows-Vista/add-or-remove-a-printer

    Solve printer problems
    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-printer-problems

    Open the printer Troubleshooter
    http://Windows.Microsoft.com/en-us/Windows7/open-the-printer-Troubleshooter

    Find the manufacturer's Web site
    http://Windows.Microsoft.com/en-us/Windows-Vista/find-a-printer-manufacturers-website

    Find and install printer drivers in Windows 7
    http://Windows.Microsoft.com/en-us/Windows7/find-and-install-printer-drivers

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • HTML convert a project with edge animation in a video format

    Hello everyone should be noted that I'm not a specialist of great graphics. I wanted to ask you if you can convert an html project done with edge animation in a video format, type mpg4.  concerning

    Not directly from edge host. You will need to use a screen recorder.

  • Scroll effects for adobe edge animated and responsive design

    Hello

    How can I stop "Animation" with piece on parchment for the animate and make sensitive edge elements.

    Thank you

    Please visit these links:

    https://helpx.Adobe.com/Muse/how-to/scroll-effects-edge-animation.html

    http://www.raymondcamden.com/2014/09/29/syncing-edge-animate-with-window-scroll/

    https://www.YouTube.com/watch?v=75tPMsI0d8k

    Thank you

    Sanjit

  • Adobe edge animations are fully functional on iphone in adobe dps? I guess not?

    Hello!!! is adobe edge animations are functional with the iphone? because my animations of edge in the iphone are completely out of size and all bad operation! OK the feature in the ipad, do not buy into the iphone! Anyone please?

    Make sure that the HTML content that you animate is sensitive and give him another chance.

  • Make sensitive edge animating in Dreamweaver? (was: Dreamweaver and edge animate)

    Is there a way to animate a sensitive edge animation in Dreamweaver instead of Edge?

    Animate edge uses JavaScript to control the animation and screen size. Well that not strictly impossible to make the necessary changes in Dreamweaver, it would be a very great skill to adapt the code generated by Edge JavaScript animate. Make changes on board animate is by far the best option.

  • Get the value of the Variable text

    Hi all

    How to get the value of the Variable text. I want to check the value of variable text title in each page.

    Thank you and best regards,

    Robert S

    myText.textVariableInstances.everyItem (.resultText) would do it.

    The representation of a TextVariable on the page is a TextVariableInstance. They are objects of 'text' (parent may be: cell phone, change, note, Note, history, TextFrame, XmlStory). The "resultText" property is the string that the variable instance currently shows. See Adobe InDesign CS5 (7,0) object model JS: TextVariableInstance

Maybe you are looking for

  • After you select on a webpage, on my printer selection is grayed out

    After you select an area on a web page, when I try to print on my printer selection is grayed out? Help

  • Pictures are cropped, is there a setting screen adjustment?

    My photos are cropped when I look on my all new Air 2, is there a setting to make it seen like a "fit to window"?  Thanks in advance.

  • HP 8620: HP desperation

    People, thank God Costco has an excellent return policy, I gave up my ysterday HP 8610 old of one year after another problem and was refunded, upgrading to a new HP8620. Even made a little money on the transaction. But I'm not kidding. I spent more t

  • Connection to the input NI9403

    Hello I use a NI 9403 DIO module in my project.  I want to connect to one of the DIO pins as output, at the end of the collector of the optical switch PC845.  The output level would be defined of salvation or + 5v.  Then take the transmitter of the o

  • Failure to restore file with Vista Home Premium

    I used the Vista "backup and Restore Center" to create the external USB drive onmy backup files. Wsing windows Explorer, I can see the files and extract a single file for the data really exist on disk I have re-installed windows Vista Home Premium an