How to use 'snippets' of the code that I found on jsfiddle

Hi people,

I found some code on jsfiddle I would use in my paper EDGE.

The violin in question is here

http://jsfiddle.NET/NJwER/26/

I created an object on the stage and called it "draggable" (according to the name < div > in the example jsfiddle)

I then copied this following piece of code in the "JavaScript" jsfiddle pane in the "CompositionReady" of my EDGE document code Panel

{$(function()}

$("#draggable").draggable ({}

Helper: function() {}

Create an invisible div as the assistance programme. It moves and

follow the cursor as usual.

Return $('<div></div>').css('opacity',0);

},

Drag: function (event, ui) {}

During flirting, animate the original object

Follow invisible help with custom acceleration.

var p = ui.helper.position ();

$(this) .stop ().animate({)

top: p.top,.

left: p.left

(}, 1000, "easeOutCirc");

}

});

});

But nothing happens at all. Can someone let me know why it does not work please?

Thank you

Tom

Hi Tom, here ya go.

Example (for some strange reason, sometimes I have to refresh to flirting at work... hmmm):

www.timjaramillo.com/code/Edge/drag_ease

Source:

www.timjaramillo.com/code/Edge/_source/drag_ease.zip

The main question is how you were addressing the "draggable" div Since we're inside the dashboard API, you must precede the symbols with "sym", so it should be:

SYM. $('draggable') .draggable...

Previously, you had like:

$("#draggable").draggable...

Here's the code revised on Stage.compositionReady:

() yepnope

{

Nope:]

"js/jquery-ui-1.9.2.custom.min.js,"

"js/jquery.ui.touch-punch.min.js,"

'css/jquery-ui-1.9.2.custom.min.css '.

],

full: init

}

);

function init() {}

SYM. $('draggable»).draggable({)

Helper: function() {}

Create an invisible div as the assistance programme. It moves and

follow the cursor as usual.

Return $(')

.css('opacity',0) ');

},

Drag: function (event, ui) {}

During flirting, animate the original object

Follow invisible help with custom acceleration.

var p = ui.helper.position ();

$(this) .stop ().animate({)

top: p.top,.

left: p.left

(}, 1000, "easeOutCirc");

}

});

}

Tags: Edge Animate

Similar Questions

  • questions about the uses of flash cs6 and the code that it exports VS. switch to other tools

    I looked at the overviews on the new version of flash and I did experiment a bit with muse and edge of adobe. I have also heard the announcement Friday 4.1 android devices will run is no longer the flash player. my questions are:

    1 does flash cs6 fuction basically the same design-wise, but when it comes to export the file, the code a combination of html and javascript rather than in a solid swf file as it was currently publishing my work as?

    2 East edge meant to supplement flash? or he will take some of the uses of the flash so edge can publish for flash and mobile devices will remain in the area of desktop applications?

    3. If I created full-flash sites in older versions of flash, can I import in cs6 and make them exported as functional across all devices?

    I guess that, overall, just trying to get an overview here so that I can decide how to move forward and what to focus on.

    Thank you!

    1. Yes. The Toolbox for CreateJS is an additional downloadable extension for Flash CS6. He's going to post html and js files that will provide the animation rather than the swf file that you would normally publish. The success or failure of the version of javascript from your animation is the result of the work within the Toolbox. You are a bit constrained in the use of the timeline in Flash for your animations. If you are only working in Actionscript, then the output will be very disappointing.

    2 edge outputs javascript, css and html for you give an animation. The user interface allows you to design within the limits of what can make the border. You can preview and adjust and adjust your animation work you. Edge is a tool of html5. It can create some animation html5. It is not a replacement for Flash. It's something that you can use to integrate the animation in html instead of Flash.

    The problems and the benefits of each are unique. It is a good substitute to learn javascript, css and HTML 5. If you don't understand the code that is created from each of these tools, you can easily end up with huge, inflated, files which improved. I'm very biased towards really knowing what is happening. If I need to change something, I want to be able to enter the code and make a change, do not add an extra piece of code to work around what was there. I don't use any of the timeline, and so nothing of what I publish using CreateJS. Well, he's going to publish, but nothing happens because there is nothing on the timeline to translate.

    You can download a trial version of Flash CS6 and try to box at tools for yourself. Edge is still in free preview, you can get a copy to http://labs.adobe.com and try to see how it works.

    Also, if you do not use the Greensock Animation with Flash platform, take a look at this. It has recently been extended to ensure similar Javascript for most libraries. http://www.greensock.com/

  • I am updating of content in an old site and uses an old extension to close a page of the child.  It worked fine until I started using CS6.  The code for this is in a model that I use and the code has not changed.

    So the site is www.fulcrumcwi.com and the URL of the page is: FulcrumCWI Rebecca Morgan operations strategy Consulting newsletters.

    If you choose the first HTML link for the news bulletin when you try to use the close buttons, none of them work.  Yet if you go down in the January issue and switch to the HTML version, it works very well.  This is the code that the extension highlights:

    < form >

    < input name = "Close" onclick = "self.close (); return false"type ="button"value ="Close"/ >

    < / make >

    I have not changed somehow.  The only change is I use Dreamweaver CS6 to make these changes.  Does anyone have a solution for me?

    As always, thanks in advance.  (and Yes, I know that this site needs a major update)

    GraphicEdge

    Looks like you're missing target = "_blank" in the link "HTML" to open in a new window that works properly...

  • How to use setFireActionForSubmit with the settings and capture the parameter

    Hello

    Can someone explain how to use setFireActionForSubmit.

    I extend the ShoppingCartPG controller. In the extended controller processRequest method I am adding a button to the table and implementation of the setFireActionForSubmit, so when the button is pressed it triggers the setFireActionForSubmit event.
    I need to pass the RequisitionLineId as a parameter which is present in the t associated with the ShoppingCartPG.

    I used the following code in the processRequest
    =================================
    ' public void processRequest (OAPageContext paramOAPageContext, OAWebBean paramOAWebBean)
    {
    super.processRequest (paramOAPageContext, paramOAWebBean);
    OATableBean otbRN = (OATableBean) paramOAWebBean.findIndexedChildRecursive ("ItemTableRN");
    OASB OASubmitButtonBean = (OASubmitButtonBean) paramOAPageContext.getWebBeanFactory () .createWebBean (paramOAPageContext, "BUTTON_SUBMIT");

    oasb.setID ("addnInfo");
    oasb.setUINodeName ("addnInfo");
    oasb.setText ("additional information");

    String pageName = paramOAPageContext.getRootRegionCode ();
    Hashtable params = new Hashtable (1);
    params.put ("param1", pageName);

    Hashtable paramsWithBinds = new Hashtable (1);
    paramsWithBinds.put ("param2", new OADataBoundValueFireActionURL (OASB, "${oa.encrypt.current.RequisitionLineId}"));
    oasb.setFireActionForSubmit ("addnInfoEvent", params, paramsWithBinds, false, false);

    otbRN.addIndexedChild (oasb);
    }
    =================================

    And I capture the event "addnInfoEvent" in processFormRequest method and trying to capture the RequisitionLineId I the past as a parameter.
    This is the code that I used in processFormRequest.
    =================================
    ' Public Sub processFormRequest (OAPageContext paramOAPageContext, OAWebBean paramOAWebBean)
    {
    super.processFormRequest (paramOAPageContext, paramOAWebBean);
    OAApplicationModule localOAApplicationModule = (paramOAWebBean) paramOAPageContext.getApplicationModule;

    String strEvent = paramOAPageContext.getParameter (EVENT_PARAM);

    If ("addnInfoEvent".equals (strEvent))
    {
    Number format = 0;
    try {}
    Format = new Integer (ClientUtil.getDecryptedParameter (paramOAPageContext, "param2"));
    }
    catch (System.Exception e) {e.printStackTrace () ;}

    String outmsg = "line ID:" + size + ":" + strEvent;
    throw new OAException (outmsg, OAException.INFORMATION);
    }
    }
    =================================

    But I'm not able to capture the RequisitionLineId I sent as a parameter.
    Can someone let me know what I am doing wrong.

    Hello

    Because your table is not a tip so table using a submit button approach will not work because it won't give you rank of reference and you will not be able to enter the id of the corresponding command line, instead you use an icon of the image, which can be created through customization. Let me know if you need help in the code.

    Thank you
    Pratap

  • How can I print just the screen that I'm looking?

    • How can I print just the screen that I'm looking? CTRL + P doesn't (I have WIndows Vista)

    auntjilly wrote:

    * How can I print just the screen watching you? CTRL + P doesn't (I have WIndows Vista)

    Two ways:

    (1) by design, as it has always been with all versions of Windows, press copy the entire screen, including the wallpaper desktop, in the Clipboard (iow, in RAM).  By pressing + of only copies the active window to the Clipboard.  To view the screenshot, open a graphics program, such as MS Paint and press + V.  This will paste the contents of the Clipboard (your screenshot) in the file open and allows you to view or save it as a file for later use.

    How to capture screenshots in Windows by using the print screen key
    http://support.Microsoft.com/default.aspx?scid=kb; us; 173884

    (2) as long as you have a newer version of Vista as the Home Basic edition, you can use the Snipping Tool.  (Start > all programs > Accessories).

    Bruce Chambers

    Help us help you:
    http://www.CatB.org/~ESR/FAQs/smart-questions.html

    http://support.Microsoft.com/default.aspx/KB/555375

    They who can give up liberty to obtain a little temporary safety deserve neither liberty nor safety. ~ Benjamin Franklin

    A lot of people could die rather that thinking; in fact, most do. ~ Bertrand Russell

    The philosopher never killed the priests, while the priest killed a large number of philosophers.
    ~ Denis Diderot

  • How to use paper in the latest version of Windows Live Mail?

    How to use paper in the latest version of Windows Live Mail?

    Version 2011

    Short answer: the stationery support has been removed from Windows Live Mail with the upgrade of v.2009 v.2011 back in 2010.

    Long answer: there are two solutions of workaround that you can try.

    • If you have a stationery .htm file, open it in Internet Explorer, and then select file > Send > Page by email (Alt - F E P). Save the message as a result as a .eml file and use it as a model for messages.
    • You can get in shape, for example a background color, to a HTML signature, then apply this signature to an e-mail message. Here's the one I use when sending pictures:


      Hello!

      Love
      Noel


      Here is the result:

  • How can I back up the files that that are on a mapped network drive?

    How can I back up the files that that are on a mapped network drive?  I can see the disks and the files that I want to backup in windows Explorer, but when I use the tool integrated with seven windows backup it does not list the mapped network drives backup options, it shows that local readers.  Thanks for your help.

    You probably have Windows 7 Home Premium - Microsoft has removed the ability to backup Windows 7 Home Premium network. You must have Pro/Ultimate to do a network backup or install a 3rd party backup program that can backup network.

  • JavaFX how to use WebView load the local HTML page?

    JavaFX how to use WebView load the local HTML page?

    If the HTML code of the files in the class path, which is in the package, the load using one of the following ways:

    String url = Main.class.getResource("/html/index.html").toExternalForm();
    engine.load(url);
    

    The above methods can only load files outside the class path!

  • Dreamweaver CS6 how can I automatically indent the code? I've already put the presets and the codeview options, but it does not work.

    Dreamweaver CS6 how can I automatically indent the code? I've already put the presets and the codeview options, but it does not work. Thanks for advice

    Commands > apply Source format.

    I use it so often, I created a shortcut to it.

    Nancy O.

  • How a person to decipher the code of BSOD 0x0000008e 0xc0000005

    Original title: BSOD

    How a person to decipher the code from a blue screen of death?

    I tried Googling my specific code, but can not get any hits on it.

    0x0000008E 0xc0000005 0xae2c9b43 0xadf1fb9c 0x00000000

    GDRV. SYS to AE2C9B43

    Base of support to AE2C9000

    Date Stamp 49B9D04C

    Thanks for any info.

    The problematic driver seems to be the GDRV. SYS:

    0x0000008E 0xc0000005 0xae2c9b43 0xadf1fb9c 0x00000000

    GDRV. SYS to AE2C9B43

    Base of support to AE2C9000

    Date Stamp 49B9D04C

    The gdrv.sys is a driver for a Gigabyte utility like Gigabyte Dynamic Energy Saver program.

    I suggest to uninstall all the utility from Gigabyte and see if the error resolves.

    Subsequently, you can, if you wish, reinstall the utility from Gigabyte and see if the error is resolved.

  • How to use PS to judge the existence of a file in the directory specified and how to use PS to the directory specified for create to create the file? (javascript)

    1, how to use PS to judge of the existence of a file in the specified directory? (using javascript)

    2, how to use PS to the directory specified for create to create the folder? (using javascript)


    Thank you!

    If (Folder(/*_insert_the_path_here_*/).exists == false) {Folder(/*_insert_the_path_here_*/).create()}

  • How to use photoshop with the same account on more than one laptop?

    How to use photoshop with the same account on more than one laptop?

    a single user license entitles you to two facilities simultaneous/activations.  so, what's the problem?

  • &amp; quot; This change would require an amendment to the code that is locked by a model or a translator. &amp; quot;

    I'm creating a template. As I go along, I test by creating, editing and saving pages made of him.

    All of a sudden, I started getting this error when I try to apply a CSS style for the editable region of content.

    "This change would require changing the code that is locked by a translator or a model."

    This will not occur when you change the other editable regions.

    I did a search of this forum and tried the suggestion to remove the founder of page which has not made a difference. I don't want to remove the CSS because I'm precisely apply a style to text in this region.

    This started happening a few hours ago and it does not in itself unfortunately.
    Thanks in advance for any ideas.

    For what it's worth, the culprit was the inclusion of the editable area
    IN a tag, i.e.,.


    ALT ="" width = "435" height = "1" / > "



    Since is an inline tag, and the editable region is * INSIDE * the
    tag Inline, you cannot paste block tags in there. This is what has been launched
    the error and why it has happened when you tried to change this
    region.

    The same thing would have happened if this interval had been a

    tag , or
    also, since you cannot paste block tags in their midst, no more.

    --
    Murray - ICQ 71997575
    Adobe Community Expert
    (If you * MUST * write me, don't don't LAUGH when you do!)
    ==================
    http://www.dreamweavermx-templates.com - template Triage!
    http://www.projectseven.com/go - DW FAQs, tutorials & resources
    http://www.dwfaq.com - DW FAQs, tutorials & resources
    http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
    ==================

    "buttercupnli" wrote in message
    News:eqdp84$D3K$1@forums. Macromedia.com...
    > Well, this is now fixed! I have rebuilt everything again from scratch. There now
    > work
    > fine.
    >
    > That devil knows what was going on...
    >
    > Thanks for your help ACE. I hope that I never see this bug again. But anyway,.
    > I am
    > scared I'll...
    >

  • Cannot open attachments in Microsoft Outlook, to get the message that Windows found that this file is potentially harmful and has blocked access to this file

    Original title: prevention of security Windows opening attachments

    I can't open attachments on emails sent to my email for Microsoft Outlook - it has recently started to happen. I tried to change the security settings in Outlook but they seem to be on the normal and the option to block potentially harmful messages is not checked. When attempting to open the attachments, I get the message that Windows found that this file is potentially harmful and has blocked access to this file. Any can you please suggest how to change it, it occurs on all email attachments, even those I know are safe of them have opened on another computer.

    Thank you, Alistair.

    Hello

    Sorry to hear that.

    You use a browser to open emails or a customer e-mail like Outlook Express?

    Respond with more information so that we can better help you.

  • my printer hp pro 8600 guard saying: I have a paper jam and I have no, I have turned on and outside - I cannot print, I tried the fix that I found on this site, it does not detect, this is something I do now?

    It's frustrating that I cannot print and there is no paper jam, the difficulty that I found on this site did not find a problem - what do I do now?

    If the printer says there is a paper jam, it's a hardware problem and you need to look for the answer in the Web page of troubleshooting for your HP printer...

Maybe you are looking for