Simple animation triggered by flex event

I need to have a simple animation, which I suppose I can created in Flash and bring in as a swf -- or can I do it in Flex alone?
What I need is  a container which, when it receives an event, creates a rect and "drops" it in the container.  Each time it receives an event it  drops another rect in the container. Ideally, the rects try to keep distance from each other so they dont overlap until there are way too many items.
Possible?  How would you approach this?

I tell you what this app of yours would wanna be one kick-arse piece of work when its finished
Anyway to the problem in hand, this is what I would do, from the fired event
1. create a rectangle object
2. add the element to the display canvas but off screen -x -y
3. use animate with a generated random co-ordinate to move  the object to, while the object is animating track its position using a hittest to stop it when it collides with an existing object.(plus a little testing to make sure its fully displayed), repeat if you want to get a more random spread(so it bounces of an object it hits so to speak.
4. if the object takes to long to find free space call it quits and remove the object.
The best way is to actually create a layout template, this way you have a nice spread of 'placeholders' you simply fill the 'placeholders' randomly until there are none left, you can even empty them as an option. This way you randomly select off screen co-ordinates and then animate the object into the randomly selected template co-ordinates.
David

Similar Messages

  • Exit CL_HRASR00_POBJ_WF_EXIT triggered exeception for event STATE_CHG and (target) status READY- ERROR EVENT_RAISED - Error updating the process object

    Hi All
    I have set up a simple custom HCM process and Form regarding Infotype TO CREATE AND CHANGE POSITION. I have checked the process and form consistency and it seems fine. Now when I run the process from HRASR_DT it generates a process number but it also gives an error workflow could not start.I get following error (SWIA log - Step history)
    Executing flow work item - Transaction brackets of the workflow has been damaged
    Exception occurred - Error when starting work item 000000007031
    PROCESS_NODE - Error when processing node '0000000014' (ParForEach index 000000)
    CREATE - Error when creating a component of type 'Step'
    CREATE_WIM_HANDLE - Error when creating a work item
    CREATE_VIA_WFM - Exit CL_HRASR00_POBJ_WF_EXIT triggered exeception for event CREATED and (target) status
    EVENT_RAISED - Error updating the process object
    Executing flow work item - Exit CL_HRASR00_POBJ_WF_EXIT triggered exeception for event STATE_CHG and (target) status READY->ERROR
    EVENT_RAISED - Error updating the process object
    Executing flow work item - Transaction brackets of the workflow has been damaged
    Executing flow work item - Work item 000000007031: Object FLOWITEM method EXECUTE cannot be executed
    Executing flow work item - Error when processing node '0000000014' (ParForEach index 000000)
    Points to be noted:
    1) I have searched few SAP notes such as 1384961(Notes for 6.0.4) but our system is in higher level patch 6.0.5
    2) WF-BATCH have SAP_NEW and SAP_ALL authorization.
    Appreciate your valuable suggestions.
    Thanks
    Ragav

    Hi Ragav
    did you try to debug this? maybe something is missing in config of P&F?
    Since you are on 605, the following note would be there in your system....use it to debug:
    1422496 - Debugging background workflow tasks in HCM P&F
    This will help you find the root cause.
    regards,
    modak

  • Convert simple animation code from as2 to as3

    Hi everyone,
    I have a simple animation that is controlled by the y movement of the mouse. The code for the animation is put in frame 1 and is as follows:
    var animationDirection:Boolean = false;
    var prevMousePosition:Boolean = false;
    var mouseListener = new Object();
    mouseListener.onMouseMove = function () {
    var curMousePosition = _ymouse;
    if(curMousePosition > prevMousePosition) {
    animationDirection = false;
    }else if(curMousePosition < prevMousePosition) {
    animationDirection = true;
    prevMousePosition = curMousePosition;
    Mouse.addListener(mouseListener);
    function onEnterFrame() {
    if(animationDirection && _currentframe < _totalframes) {
    nextFrame();
    }else if(!animationDirection && _currentframe > 1) {
    prevFrame();
    Is it possible to use this code in as3 or do I need to convert it? I am grateful for any help. Best wishes

    Yes, you need to convert the code. Here is what looks like a similar logic in AS3:
    import flash.events.Event;
    import flash.events.MouseEvent;
    var animationDirection:Boolean = false;
    var prevMousePosition:Boolean = false;
    addEventListener(Event.ENTER_FRAME, onEnterFrame);
    addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
    function onMouseMove(e:MouseEvent):void {
        var curMousePosition = mouseX;
        if (curMousePosition > prevMousePosition)
            animationDirection = false;
        else if (curMousePosition < prevMousePosition)
            animationDirection = true;
        prevMousePosition = curMousePosition;
    function onEnterFrame(e:Event):void
        if (animationDirection && _currentframe < _totalframes)
            nextFrame();
        else if (!animationDirection && _currentframe > 1)
            prevFrame();

  • Event triggered by multiple events

    Hello!
    I am working on interactive code in Adobe Edge. I created several function triggered by specific events. Now I need to write the final function. The symbol should play when several draggable elements are inserted into several drop boxes at the same time. Please, give me an example of how to write this function.
    Here is the code:
    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'
        complete: init
    function init() {
              var stage = sym.$("Stage");
              // draggable
              var Rectangle1 = sym.$("Rectangle1");
              Rectangle1.css("position", "absolute");
              Rectangle1.css("left", 50);
              Rectangle1.css("top", 35);
              Rectangle1.draggable({ disabled: false });
              Rectangle1.draggable({ containment: stage });
              Rectangle1.draggable({
       snap: '.target1',
       snapMode: 'corner'
              // drop in box
              var dropCase1 = sym.$("dropCase1");
              dropCase1.css("position", "absolute");
              dropCase1.css("left", 375);
              dropCase1.css("top", 25);
              dropCase1.on( "dropout", function( event, ui ) {
                        Rectangle1.css("background-color", "grey");
              dropCase1.droppable({
                        accept: ".case1",
                        drop: function(event, ui) {
                                  // change the color of the draggable item
                                  Rectangle1.css("background-color", "blue");
                                  //play the symbol box timeline
                                  var box = sym.getSymbol("box");
                                  box.play();
              // adds visual when correct drops here
              var Rectangle2 = sym.$("Rectangle2");
              Rectangle2.css("position", "absolute");
              Rectangle2.css("left", 50);
              Rectangle2.css("top", 150);
              Rectangle2.draggable({ disabled: false });
              Rectangle2.draggable({ containment: stage });
              Rectangle2.draggable({
       snap: '.target2',
       snapMode: 'corner'
                        // drop in box
              var dropCase2 = sym.$("dropCase2");
              dropCase2.css("left", 375);
              dropCase2.css("top", 150);
              dropCase2.droppable({
                        // accept only case 2
                        accept: ".case2",
                        drop: function() {
                                  var box = sym.getSymbol("box");
                                  box.play();
    Thank you very much!
                                                                               Anastasiya

    There are many possibilities. Attached is one simple example (LabVIEW 7.0) that does not use control references.
    (If only one of the buttons can be active at any time. you could also use a single radio button as a control)
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    ComboEvent.vi ‏35 KB

  • I am trying to create a simple animated gif in Photoshop. I've set up my frames and want to use the tween to make the transitions less jerky. When I tween between frame 1 and frame 2 the object in frame two goes out of position, appearing in a different p

    I am trying to create a simple animated gif in Photoshop. I've set up my frames and want to use the tween to make the transitions less jerky. When I tween between frame 1 and frame 2 the object in frame two goes out of position, appearing in a different place than where it is on frame 2. Confused!

    Hi Melissa - thanks for your interest. Here's the first frame, the second frame and the tween frame. I don't understand why the tween is changing the position of the object in frame 2, was expecting it to just fade from one frame to the next.

  • Animated GIF with Flex

    Hi all,
         I designed a animated GIF image by Photoshop. And now, I want to add it into my web application. I referenced from
    http://www.bytearray.org/?p=95
    http://iamjosh.wordpress.com/2009/02/03/animated-gifs-in-flex/
         Have I must to download the AS3 GIF Player Class to use my animated gif with flex ?? Has Flex 3.0 support animated gif that I not need download that libriary ?
    Thanks !

    Anybody help !!

  • Help need in a simple animation

      Hello !
    I hope somebody can help me, i want to make a simple animation to my logo in macromedia flash 8.
    The resource picture is in jpg (but i think i have in png also if that is better) and there is a text next to the logo.The background is black. I want to animate the text line,like its appering from the black.It is as if a cover was drawn before it along.The rest of the picture is fixed.
    How can i do that ?
    Thank You !

    sorry im absolutely new to flash so i dont know how to do that.
    here is the picture http://sherto.deviantart.com/art/Iris-Soft-193301609
    so its like this : at the first frame, there are no text and with 3-4 frames the " I " comes in and etc... the rest.
    as you can see there is a picture close to the texts so i cant cover them with a rectangle tool as big as the text,because it would go into the picture  when moves.
    once again im sorry im new so i cant even move the rectangle above the pic.
    do you have any simple idea for this ?
    anyway thank you for the anwser !

  • How to make simple animation of 2D object ?

    I am a beginner of LABVIEW, and here is my problem...
    For each time loop, I can get a the x,y,theta information of a rigid body in the 2D plane.
    I want to use those data to make a simple animation to represent how the object is moving like in a 2D plane, which includes the 2DOF translation movement and 1DOF rotation movement. 
    How should I do?
    Thanks a lot for helping me!

    You can use XY graph to plot the trajectory of the object.
    Regarding the introduction of the XY graph, you can refer to the tutorial on LabVIEW pro.
    http://www.labviewpro.net/teach_content.php?fid=6&post=308&fpt=5
    This can only represent the XY movement, not include the rotation part.
    I don't think there's any graph control in LabVIEW that can represent the rotation aspect.

  • Simple animation software for Arch?

    Can anyone suggest a simple animation program for Linux; something similar to AnimationShop for windows.  I know there's gimp-GAP, but that seems to be fairly advanced for my purposes.  I just want to be able to string together images into .gif or video, perhaps with an 'onion layer' feature so you can see the previous frame transparently; that sort of thing.
    I use gnome, so preferably something for GTK, or at least if it's KDE, that depends only on QT and not KDE packages.
    Any ideas?
    Thanks.
    Fishonadish

    skottish wrote:You don't actually need GAP to do animated Gifs in Gimp. All you need to do is add all the frames that you want as layers in one image, then save as Gif. Gimp will ask you if you want to flatten the image or make an animation out of it. If you choose animation, it will ask you for a frame rate.
    Thanks.  I realised this eventually and got it done that way.
    Still, out of curiosity are there any 'film-strip' type animation programs out there?
    Fishonadish

  • What are the selections when defining a job triggered by an event?

    I use SM36 by defining a job triggered by an event. I click "Start conditions" button, then click "After event" button and place the event name.  I wonder if I would have to continue to click the button "Immediate" button and save it?  or just save it without clicking the "Immediate" button?
    Thanks and this question is urgent!

    Hi!
    No you only save and after define the step!
    If you click Immediate, your job start immediatelly and not after event.
    Max

  • Fee calculation triggered by an event.

    Hi again to all,
    We have a new request from our client, they want that the system calculates automatically a fee for any student which SC is changed. This means for example that if a student´s registration was to Architecture, in the minute you change that registration for Medicine, the systems launches a fee recalculation.
    I have explored the SPRO and found:
    Campus Management -> Student accounting -> Fees -> Event-triggered fee calculation
    My problem is that there are no examples in how to configure the 4 items in there.
    In redefine event types for SAP Business Objects, I tried this:
    Object type      CS
    Infotype           1771
    Subtype           0001
    Update op.       UPD
    Object tyoe      PDOTYPE_ST
    I tried to use the the function module CMAC_FEE_CALCULATE, but i get the next error
    "Interface for function module does not follow convention"
    Could someone send me an example of how can this be done.
    Thanks
    Sergio

    Hi Michael,
    Do you know which is the sub-type for SC related to the student?
    I have been doing some tests with this configuration of the Infotype opertation
    - Object type: ST
    - Infotype: 1001
    - Sub-type: A513 (pursues)
    - Update op:  
    - Activity:
    - Sequence no.: 0
    Event Data  OBJECT TYPE: PDOTYPE_ST (THIS IS MANDATORY) (student)
    Probably I´m expecting something which is not correct. What I´m expecting to see is the following:
    If I have a student which has registration to a certain SC and has already a fee calculation, and then I cancel the registration for the SC, I would like to see the financial info and watch that what owed is now canceled, (without doing it manually), afterwards If I register this same student to different SC I´m expecting that the system has already calculated the fee automatically.
    Is this possible? Am I expecting too much from the fee calculation triggered by an event process?
    How does it works??? Do it cancel fees if student unregister from SC or SMs?
    Thank you
    Sergio

  • Workflows triggered by an event

    Hi,
    A BOR object-event is linked to wait steps in more than one workflows.
    I have the BOR name and its event name with me.
    How can I find the list of all the workflows whose wait steps are triggered by this event ?
    Thanks in advance.
    Regards
    Ananya

    Hi ,
    For that you would have to set Metadata Only check-in which does not need a primary file . What it does is use the check-in form details and creates a file by itself (without having used any primary file) and creates the assets .
    So , from the WF point of view there need not have any changes . Only thing is from WCC check-in side .
    For details please check the following links:
    https://blogs.oracle.com/kyle/entry/check-ins_without_files_ucm
    Uploading Documents - Release 11g (11.1.1)- section 18.4.1.7 - Tip
    Hope this helps .
    Thanks,
    Srinath

  • Simple animation jiggles but does not move

    Im very new to adobe edge, But ive done my reasearch! I have a png on top of a background image and I want the background image to move to the left when the website loads. The simple animation sometimes works after time but it sometimes doesn't when i preview it in my brower. But it works in my timeline. I dont know what im doing wrong and am pressed for time! please help !!!

    so it doesn't do it as bad anymore now that I made the image behind it smaller. But it still takes a while to load and the animations aren't that smooth. any advice on what I can do to make it load faster/animate smoother?

  • Duke Pt avail. 2nd time askin, (Flicker-free background) Simple Animation

    2nd time askin, since didn't get sufficient help. Duke Pts available! I am trying to create simple animation on a solid constant background. I used double buffering for moving the object and it works fine. But the problem is with the background image. The image seems to flicker while the object is moving. Here's my code:
    import java.awt.*;
    import java.applet.Applet;
    public class changed extends Applet implements Runnable{
    Image buffer;
    Graphics bufferg;
    Thread main;
    int x=0;
    boolean flag=false;
    public void init(){
    setSize(500,500);
    main=new Thread(this);
    main.start();
    buffer=createImage(getSize().width,getSize().height);
    bufferg=buffer.getGraphics();
    public void run(){
    while(main!=null){
    try     {
    main.sleep(50);
    catch(Exception e){}
    repaint();
    public void stop(){
    if(main!=null){main.stop();}
    public void paint(Graphics g){
    update(g);
    public void update(Graphics g){
    Dimension d=getSize();
    bufferg.setColor(getBackground());
    bufferg.fillRect(0,0,d.width,d.height);
    bufferg.setColor(Color.red);
    Image img = getImage(getCodeBase(),"bliss.jpg");
    if((x<500)&(!flag))
    bufferg.fillRect(x+=5,10,25,25);
    else
    flag=true;
    bufferg.fillRect(x-=5,10,25,25);
    if(x==0)
    flag=false;
    g.drawImage(img,50,50,this);
    g.drawImage(buffer,0,0,this);
    Please help me with this minor problem. I think what's happening is that the background is been drawn over and over again. I don't know how to make it constant and flicker-free.

    Possible 2 things:
    1. You're reloading the image on each repaint:
    Image img = getImage(getCodeBase(),"bliss.jpg");You shouldn't do that, you should just load it in init.
    2. You're drawing the image with the non-buffer Graphics "g" instead of "bufferg." You should use bufferg and draw it before anything else.
    I've modified the code for you, it should work but I can't test it because I don't have bliss.jpg. Let me know if it doesn't work.
    Here's the modified code:
    import java.awt.*;
    import java.applet.Applet;
    public class changed extends Applet implements Runnable {
         Image buffer,img;
         Graphics bufferg;
         Thread main;
         int x = 0;
         boolean flag = false;
         public void init() {
              setSize(500, 500);
              img = getImage(getCodeBase(), "bliss.jpg");
              main = new Thread(this);
              main.start();
              buffer = createImage(getSize().width, getSize().height);
              bufferg = buffer.getGraphics();
         public void run() {
              while (main != null) {
                   try {
                        main.sleep(50);
                   } catch (Exception e) {}
                   repaint();
         public void stop() {
              if (main != null) {
                   main.stop();
         public void paint(Graphics g) {
              update(g);
         public void update(Graphics g) {
              Dimension d = getSize();
              bufferg.drawImage(img, 50, 50, this);
              bufferg.setColor(getBackground());
              bufferg.fillRect(0, 0, d.width, d.height);
              bufferg.setColor(Color.red);
              if ((x < 500) & (!flag)) {
                   bufferg.fillRect(x += 5, 10, 25, 25);
              } else {
                   flag = true;
                   bufferg.fillRect(x -= 5, 10, 25, 25);
                   if (x == 0)
                        flag = false;
              g.drawImage(buffer, 0, 0, this);
    }

  • Hello, i'm creating a very simple animation in ps cs5, but when I try to transform a smart object in a frame, all the frames are affected by it. What can I do ? Thanks, Ep

    Hello, i'm creating a very simple animation in ps cs5, but when I try to transform a smart object in a frame, all the frames are affected by it. What can I do ? Thanks, Ep

    Ok, you are in frame animation mode. I thought cs5 had a timeline mode, but now I think I was wrong.
    In frame animation mode what you do is in one frame you have the object rotated in one position, then select an other frame and rotate it. If it rotates the first frame, which I think it will. Create duplicate of the object in a new layer. Then rotate the second layer.
    At this point in my example you would have two layers, one of which has a rotated object.
    Clear the frames
    Convert the two layers to frames.
    You now have two frames, one for each layer.
    Select both frames then click the tween button.
    This will create the in between frames.
    In the tween dialog box the higher the number of frames set here, will create a smoother animation but will result in a longer time frame for the animation to play.
    Because Photoshop has no way of knowing which way the object should rotate, it is feasible for it to rotate the opposite direction or could look wonky. Just undo and add an in between layer showing how it should look in the middle, then continue on.
    So your layers should be the following, a frame that shows all objects in their rest state.
    All objects that remain in a rest state must be copied to the next layer (ctrl-j on Windows or cmd-j on Mac)
    All subsequent layers are then used for rotating a duplicate of the object. (Ctrl j or cmd j)
    You will find the commands to clear the frames, convert layers to frames and tweeting in the hidden menu found when you click the small icon in the upper right hand corner of the animation panel.

Maybe you are looking for

  • How to Import 3.0 application in APEX 3.2?

    How to Import 3.0 application in APEX 3.2? These two are on two different machines. It is not upgrade. Pls help.

  • UEFI Bios MSI N660 TF 2GD5/OC

    Is there a EUFI Bios available for MSI N660 TF 2GD5/OC Current bios: h ttps://docs.google.com/file/d/0BxPkfCyP9G6eenVlU2sxbUhGMUk/edit?usp=sharing S/N: 602-V287-050B1304097809 Thnx

  • Where are flash player parameters stored?

    Hello, when we modifiy our parameters for flash player here: http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager05.htm l where are these parameters stored in the computer? because i want to delpoy my parameters on all

  • How to set default file type for Open dialog

    Dear my friends, I am using "At selection-screen ON VALUE-REQUEST FOR filepath" to display open dialog and i want to set default file type for open dialog = *.txt. Thank your times !

  • X-Fi2 - no Tags are updated on resync? Is it really true?

    Hi, I already posted a thread considering the star rating - but another even more shocking Issue appeared: The X-Fi2 doesn't update Tags if you re-sync? I tried under XP/Win7 with Creative Central, WMP, Media Monkey... no matter what kind of synchron