Setting variable "Frame Delay" for animation.

I am trying to set frame delay in an animation I am working on. There are a lot of frames and they all have different delays. I am not sure if scripting is the best way but here is what I have so far (using VBA because that is what I am familiar with): I am erroring out at line 23 saying it is a "type mismatch"
Sub Set_Frame_Delay()
    Dim appPS As Photoshop.Application
    Dim docPS As Photoshop.Document
    Dim NewLay  As Photoshop.ArtLayer
    Dim LaySet As Photoshop.LayerSet
    Dim ref1 As Photoshop.ActionReference
    Dim actPS
    Set appPS = CreateObject("Photoshop.Application")
    appPS.Visible = True
    Set docPS = appPS.ActiveDocument
    Set LaySet = docPS.LayerSets("Text")
    Set ref1 = CreateObject("Photoshop.ActionReference")
    For Each NewLay In LaySet.ArtLayers
            Select Case NewLay.Name
            Case "Test1"
                actPS = ref1.PutName("Frame Delay", 0.540769)
                NewLay.Application.ExecuteAction (actPS)
            Case "Test2"
                actPS = ref1.PutName("Frame Delay", 1.013942)
               NewLay.Application.ExecuteAction (actPS)
          End Select
      Next NewLay
    MsgBox "frame set"
End Sub

Yeah Ive used the script listener before, but was hoping to avoid it because I didn't understand everything that it spits out. But I think I broke it down and I came up with below. I tweeked my original solution to use a text file.
Sub Set_Frame_Delay3()
    Dim appPS As Photoshop.Application
    Dim ActDescPS1 As Photoshop.ActionDescriptor, ActDescPS2 As Photoshop.ActionDescriptor, ActDescPS3 As Photoshop.ActionDescriptor
    Dim ActRefPS1 As Photoshop.ActionReference, ActRefPS2 As Photoshop.ActionReference
    Dim dialogMode
    Dim idsetd, idnull, idOrdn, idTrgt, idT, idslct
    Dim idAniFrClass, idAniFrDelay
    Dim sFileName As String
    Application.ScreenUpdating = False
    Set appPS = New Photoshop.Application
    appPS.Visible = True
    dialogMode = 3
    With appPS
        idsetd = .CharIDToTypeID("setd")
        idnull = .CharIDToTypeID("null")
        idOrdn = .CharIDToTypeID("Ordn")
        idTrgt = .CharIDToTypeID("Trgt")
        idT = .CharIDToTypeID("T   ")
        idslct = .CharIDToTypeID("slct")
        idAniFrClass = .StringIDToTypeID("animationFrameClass")
        idAniFrDelay = .StringIDToTypeID("animationFrameDelay")
    End With
    sFileName = Application.GetOpenFilename("Textfiles (*.txt),*.txt", , "Open a textfile...")
    oIndex = 0
    iFileNum = FreeFile()
    Open sFileName For Input As iFileNum
    Do While Not EOF(iFileNum)
        oIndex = oIndex + 1
        Line Input #iFileNum, oDelay
        Set ActDescPS1 = New Photoshop.ActionDescriptor
        Set ActRefPS1 = New Photoshop.ActionReference
        ActRefPS1.PutIndex idAniFrClass, oIndex
        ActDescPS1.PutReference idnull, ActRefPS1
        appPS.ExecuteAction idslct, ActDescPS1, dialogMode
        Set ActDescPS2 = New Photoshop.ActionDescriptor
        Set ActRefPS2 = New Photoshop.ActionReference
        ActRefPS2.PutEnumerated idAniFrClass, idOrdn, idTrgt
        ActDescPS2.PutReference idnull, ActRefPS2
        Set ActDescPS3 = New Photoshop.ActionDescriptor
        ActDescPS3.PutDouble idAniFrDelay, oDelay
        ActDescPS2.PutObject idT, idAniFrClass, ActDescPS3
        appPS.ExecuteAction idsetd, ActDescPS2, dialogMode
        Set ActDescPS1 = Nothing
        Set ActRefPS1 = Nothing
        Set ActDescPS2 = Nothing
        Set ActRefPS2 = Nothing
        Set ActDescPS3 = Nothing
    Loop
    Application.ScreenUpdating = True
    Set appPS = Nothing
    MsgBox "Frames Delays have been set!"
End Sub
The text file only needs to list the times in seconds in order of frames. In case someone else wants to copy the code. Such as :
0.916303
0.826175
0.660941
1.374455

Similar Messages

  • Pushing Frame Scripts for Animation into Classes

    I would like to move some scripts that are on frames of an
    animation to a class. I'm wondering if there are some best
    practices for this. The animation that I have includes scripts on
    individual frames. These include the common stop, gotoAndPlay etc.
    These scripts execute as the animation runs. I'm not sure how I can
    do the same in a class. Maybe the best thing to do is to use
    onEnterFrame and check for frame numbers using a conditional. Seems
    sort of awkward. I don't know of any ready way to make a event
    listener for a frame event. That would seem ideal.

    Why impatient? I'd really like to find out what's going on.
    The nature of what I'm doing requires that I get control of how and
    why things play when they play. For examle, why should it play
    differently to daisyChain loadMovie as opposed to chaining
    gotoAndPlay("scene", 1)?
    I'd also then need a preloader to insure all movies were
    ready or the animation would pause. I'll keep playing at it.
    Thanks for trying.

  • Frame Delay Going from Fireworks to Flash

    Help,
    I am completely new at this and under deadline.
    I created a photoshop psd file with tweens, rendered to video, then uploaded as animation in fireworks.
    In fireworks I set the frame delays to be what I want.  I want to save as swf (don't know flash at all) and when I do the frame delays go out the windows.  I looked at older forum posts and see that this is what happens but how can I make it happen some other way?  I tried setting frame rates in the save as option window to 1 to 30 to whatever and no luck.
    My tweens in the png file at 7/100 and my main images I want to appear longer are 350/100.
    I am a novice at all this!  Thanks for whatever help you can provide.

    Don't waste your time tinkering with the Fireworks-Flash export; Flash doesn't recognize frame delay the same way Fireworks does. The swf has one single playback speed for the entire project (perhaps the biggest limitation of Flash-based animations), hence the flash exported from Fireworks will lose the frame delay values of Fw, no matter what.
    You might have better luck introducing fake frame delays into the swf using the Flash authoring environment. Below are two ways that show you how to do just that:
    1. the movieclip approach
    2. frame delay actionscript
    Good luck!
    SiamJai
    Innovative Fireworks Tutorials

  • Frame Delays Going From Fireworks to Flash

    Help!
    I am completely new at this and under deadline.
    I created a photoshop psd file with tweens, rendered to video, then uploaded as animation in fireworks.
    In fireworks I set the frame delays to be what I want.  I saved as swf (don't know flash at all) and when I do the frame delays go out the windows.  I looked at older forum posts and see that this is what happens but how can I make it happen some other way?  I tried setting frame rates in the save as option window to 1 to 30 to whatever and no luck.
    My tweens in the png file at 7/100 and my main images I want to appear longer are 350/100.
    I think Flash is probably my only answer but I know nothing about.  Is there an easier way???
    I am a novice at all this!  Thanks for whatever help you can provide.

    Don't waste your time tinkering with the Fireworks-Flash export; Flash doesn't recognize frame delay the same way Fireworks does. The swf has one single playback speed for the entire project (perhaps the biggest limitation of Flash-based animations), hence the flash exported from Fireworks will lose the frame delay values of Fw, no matter what.
    You might have better luck introducing fake frame delays into the swf using the Flash authoring environment. Below are two ways that show you how to do just that:
    1. the movieclip approach
    2. frame delay actionscript
    Good luck!
    SiamJai
    Innovative Fireworks Tutorials

  • How do you set the frame size?

    Trying to set a frame size for 1920px X 1080px but can't see where to set this in a new project?

    Frame dimensions are a property of the sequence, not the project. A project can contain multiple sequences with different properties.
    File>New>Sequence opens a dialog where you can choose a preset or configure custom settings. Several of the preset groups have 1920x1080 options.
    Asssuming you have footage of those dimensions that you'll be using in the sequence, then you can simply create a sequence from an asset. Either drag it to the New Item button in the Project panel's lower right corner, or right-click it and select New Sequence from Clip.

  • Best method for animated bitmap sprites with GPU?

    I've been looking at how GPU Hardware Acceleration is achieved with cacheAsBitmap and cacheAsBitmapMatrix which I understand for static bitmap sprites (+rotation/scale) but I don't quite understand how this would be used to animate a sprite that had different animation frames.. in terms of what is done by the GPU and what is done by the CPU
    eg potential scenarios:
    1) cache sprite sheets to GPU. use copyPixels to blit the various sprites to a single canvas. In this case presumably the canvas would not be GPU accelerated because it is constantly changing every frame. Is there in fact any benefit of having the sprite sheet cached here? is the GPU actually used for the blit onto the CPU-rendered canvas?
    2) cache individual sprite bitmap(data) frames on the GPU. use object pooling for game character sprites and add them to stage on startup. Change the bitmap every frame dynamically,  for animated sprites, to one of the cached bitmapdata textures. is the GPU actually being used in this case to change the bitmap of the sprite? or is it forced to CPU processing again?
    The only scenario I currently know should be GPU accelerated is if I use a cached sprite that doesn't animate (other than rotating and scaling with the bitmap matrix).
    thanks for any advice
    J

    J, I believe (2) is how it is currently done. A better method is required! - basically the same question I have that you are helping me with . That link to 'Yeah, but is it Flash' in my post shows an example of exactly that method (individual BitmapData for each frame).
    Just for completeness I will add the one from my post (though unsure if it is even possible):
    (3) Single BitmapData sprite sheet cached to GPU. Each Bitmap that uses this sprite sheet can somehow specify the x,y,width,height of the frame within this sprite sheet to use.

  • Accessibility: typing delay for ipad

    I am curently working with a physically paralysed person who has severe coordination problems. His only way to communicate with the rest of the world is with an iPad. Since volontary movements are almost impossible, a lot of unwanted keys are pressed when trying to write something...
    ** I was wondering if there's any way to set a typing delay for the keyboard or desensitize the touch screen keyboard?? ** 
    Please help!!

    Get this app https://itunes.apple.com/us/app/auto-cam-delayed-automatic/id357475077?mt=8
     Cheers, Tom

  • Set frame delay time for animated gif using ImageIO

    I'm trying to change the delay time of each frame for an animated gif by changing the metadata for each frame as following but it doesn't change anything.
    static private IIOMetadata setMetadata(IIOMetadata metadata, int delayMS) throws IOException
              Node root = metadata.getAsTree("javax_imageio_gif_image_1.0");
              for (Node c = root.getFirstChild(); c != null; c = c.getNextSibling())
                   String name = c.getNodeName();
                   if (c instanceof IIOMetadataNode)
                        IIOMetadataNode metaNode = (IIOMetadataNode) c;
                        if ("GraphicControlExtension".equals(name))
                             metaNode.setAttribute("delayTime", Integer.toString(delayMS));
         }Does anyone know how to set delay time for animated gif using ImageIO ?

    I'm trying to change the delay time of each frame for an animated gif by changing the metadata for each frame as following but it doesn't change anything.
    static private IIOMetadata setMetadata(IIOMetadata metadata, int delayMS) throws IOException
              Node root = metadata.getAsTree("javax_imageio_gif_image_1.0");
              for (Node c = root.getFirstChild(); c != null; c = c.getNextSibling())
                   String name = c.getNodeName();
                   if (c instanceof IIOMetadataNode)
                        IIOMetadataNode metaNode = (IIOMetadataNode) c;
                        if ("GraphicControlExtension".equals(name))
                             metaNode.setAttribute("delayTime", Integer.toString(delayMS));
         }Does anyone know how to set delay time for animated gif using ImageIO ?

  • Frame delay set in frame animation changes after conversion to video timeline?

    hi everyone, i'm running photoshop cc on windows 7.
    i was trying to make a gif today and went about it the way i usually do - import video frames to layers (1 layer/frame of video), cut out the frames i don't want, then convert from frame animation to video timeline in order to apply filters. in this particular project i had set all frames to a delay of .04s, but when i converted to video timeline the gif seemed to run faster than it had in frame animation. i converted back to frame animation, and for some reason the delay had been changed to .03s - which i'm assuming accounts for the increase in gif speed. i tried inputting different values for frame delay, but they seem to all round to either .03s, .07s, or one of the preset values that appear when you click the dropdown box.
    this has never happened to me before. in fact i opened a gif i made recently that had a delay of .05s and once opened the delay had been changed to .07s - noticeably slower than the original gif (which i had opened in IE to compare). i have restarted pscc multiple times to no avail. in fact i just noticed that the "make frames from layers" tool is malfunctioning as well, instead of making one frame per layer, the frames are either blank or they all show the top layer.
    is this something that has happened to anyone else? if so, how to fix it? it's very frustrating because i need to be able to convert to video timeline for filters and to add text, which i can't do in frame animation.

    Did you ever find a solution to this problem? I'm having this exact issue. I notice that the frame delay only stays the same if I set it to .1, but all other delays are changed to .03 or .07. It's a pain because I have to open every saved gif & change it to the correct time delay. It's so time consuming.

  • Question: Frame delay issue - gif animations on Mac

    I have been unable to change the frame delay rate using Photoshop Elements 9 on Mac when trying to create animated gifs. This seems to be a known problem but is there a fix? Does it work on later editions of Elements?

    Thanks for this.  However, it is rather disappointing that this option was released in PSE9 for Mac even though it didn’t work properly.  I spent rather too long trying to get it to work on my Macbook as I knew it worked perfectly well on the PC in the office!

  • Animated Gif - Problem with Frame Delay

    Mac OS X 10.5.8 
    PSE 6.0
    I just created an animated gif by following the steps in PSE Help.  It says that I should be able to adjust the rate at which the images rotate by changing the Frame Delay measurement but I am unable to change it.  In fact I am unable to change anything in the Animation section of the dialog box. 
    When I check Animation, the options appear to become active (they're no longer greyed out) but I can neither uncheck the Loop option nor change the Frame Delay option.  All other sections of the dialog box work fine.
    Your help would be most appreciated!
    Beth

    Unfortunately this is broken in PSE 6 and PSE 8. You can tab into the frame delay box if you start above it someplace on that side of the screen, and it appears to let you change the rate, but your choice doesn't really affect the actual frame rate. The only workaround is to duplicate frame layers that you want to stay onscreen longer (so it will be changing just as fast, but not visibly).

  • Is it possible to set frame size for a new project ?

    Hi all,
    i would like to create a video in which there will be 2 videos playing the same content from a different angle.
    Each video is 512 x 384 .
    So i would like to set the frame size of the project as 1024 x 768 in order both videos to exist.
    I searched around for tutorials regarding this but i didn't find anything similar.It seems as if i cannot set the frame size of the project from the start.
    So,is there a way to do this?
    Thank you for your time reading this.
    Regards,
    nikits72.

    Hi and thank you for your answers.
    @->shoternz
    It will be displayed in my monitor and probably on you tube.Btw your remark on size was very accurate.Didn't think of that.
    Although i could use a little bigger height to use it to display a logo or something....
    I am very premiere newbie as you can understand.
    Regards,
    nikits72

  • Can we set a default value for the container variable in BPM?

    Can we set a default value for the container variable.?
    Suppose if i have a loop step and i have given a container variable i=5 as end condition.What value will it take during its first execution?Can we set the value for container before a recieve step?

    Hi
    Define Container Variable of Type integer and Category Simple Type .Use Condtion in Loop.
    In Container Operation Step Assign value and Use Expression to
    Increase or Decrease Valus according to your operation.
    look Pattern 4 in this blog to understand Container Operation
    /people/sharathchandra.girmaji/blog/2008/09/11/bpm-with-patterns-explained-part-1

  • Set delay for process in process chain (BI7)

    Hi gurus.
    Can anybody advice me on how to set delay for a process in process chain in BI7
    Thanks in advance

    Hi,
    If you right-click on a process in the Process Chain, there should be an option called Debug Loop. Here you can enter the number of seconds to delay a process.
    The only difference between 3.5 and 7.0 is that Option Waiting Time in context menu of "any" process is replaced by Debug Loop.Here you can enter the # of seconds for which you want your process to be delayed.
    See below:
    Re: Start a Process Chain after every 15 mins
    Hope this helps.
    Regards
    CSM Reddy

  • Set a new expiry delay for entries added in the cache by a read through

    Hi,
    I have an application that uses an Oracle Coherence cache backed by a database. Each item that is added in the cache must have a custom expiry delay computed from its content.
    Is it possible to set a new expiry delay for the entries loaded in the cache from the database by a read through operation?
    I tried setting a new expiry delay in the load method of the BinaryEntryStore, but it is ignored and the default expiry of the corresponding cache is used instead. Also I tried using a MapTrigger, but the entries added in the cache by a read through operation are not intercepted by the MapTrigger.
    Thanks,
    Adrian

    What we do (not sure if it proper way, but it worked for us) is extend the LocalCache and override the put method.
    public Object put(
    Object oKey,
    Object oValue,
    long expiry)
    long newexpiry = xxxxx;
    return super.put(oKey, oValue, newexpiry);
    }

Maybe you are looking for

  • How to skip non-PDF files in Action on folder?

    Hello, I have an Action in Acrobat Pro XI that takes a default folder and (using JS) batch converts the PDFs to text.  However, it also tries to convert *.txt files.  I don't care that it imports the *.txt to *.pdf as temp file but it then stops the

  • Error in publish instance

    Hi All , I am getting an error in publish instance. "*ERROR*  GET /content/Myproject/en/home/inspiration/ /PageOne.html HTTP/1.1] org.apache.sling.servlets.get.impl.DefaultGetServlet No renderer for extension html, cannot render resource Paragraph, p

  • Reducing PDFs

    On this Apple Tip Movie it shows how to reduce the size of PDFs using colorsync in the print menu. However none of these options are available to me, in my print dialogue box even when I pick 'any printer' there is no colorsync option to choose. Any

  • QUICKTIME MEDIA PLAYER NOT LAUNCHING VIDEOS IN IPHONE?

    IT JUST GIVE ME A DOWNLOAD BUTTON AND A PLAY IN MEDIA PLAYER BUTTON. THE DOWNLOAD BUTTON WORKS. IT SAYS CLICK TO DOWNLOAD FILE TO YOUR /VAR/MOBILE/LIBRARY/DOWNLOADS FOLDER. BUT BEFORE IT JUST USED TO LAUNCH THE TRAILERS OR APPLE KEYNOTE IN THE MEDIA

  • Configure a data source to connect to RAC 10g

    Hi, I am trying to connect to a Oracle RAC 10g and had a question regarding the connection parameter. I do not want the connection to be pinned to a specific RAC instance rather have RAC listener do load balancing when I send the request to the RAC.