AS3 Scripting for Animated GIF

Hi,
I am trying to create an animated GIF for a white noise animation (needed for those viewers who don't have access to a Flash player). The SWF version runs perfectly. Currently, all of the AS3 for the bitmapData.noise and bitmapData.palettemap script is in the first keyframe. So, when I export as an animated GIF, I get a white screen in playback.
I think the problem for the animated GIF is that there are no frames past the first frame. But, I am not sure how to add frames or re-write the AS3 to get a 30 second animated GIF? I tried duplicating the first keyframe into several new keyframes and get error messages. I would appreciate any help.
Here's the AS3 in the first keyframe that works well for a SWF (previous relevant thread: http://forums.adobe.com/thread/734335?tstart=0):
var array:Array=new Array();
for (var i:uint = 0; i < 255; i++) {
array[i] = 0xffffff * (i % 2);
var _bitmapData:BitmapData;
var bDHolder:Sprite = new Sprite();
_bitmapData = new BitmapData(stage.stageWidth/4, stage.stageHeight/4);
bDHolder.addChild(new Bitmap(_bitmapData));
bDHolder.scaleX = bDHolder.scaleY = 4;
addChild(bDHolder);
addEventListener(Event.ENTER_FRAME, onSpriteEnterFrame);
function makeNoise():void {
            _bitmapData.noise(getTimer(), 100, 255, 7, true);
            _bitmapData.paletteMap(_bitmapData, _bitmapData.rect, new Point(0,0), array, array,array);
function onSpriteEnterFrame(event:Event):void {
            makeNoise();
var itsNoisy:Boolean = true;
stage.addEventListener(MouseEvent.MOUSE_DOWN, manageNoise);
function manageNoise(evt:MouseEvent):void {
     if(itsNoisy){
         removeEventListener(Event.ENTER_FRAME, onSpriteEnterFrame)
     } else {
         addEventListener(Event.ENTER_FRAME, onSpriteEnterFrame)
     itsNoisy = !itsNoisy;
Kind Regards,

Jimmy,
You may (also) try to ask in the (most) relevant Photoshop forum.
http://forums.adobe.com/community/photoshop

Similar Messages

  • PSD source file for animated GIF's - Fireworks CS3

    hi
    i've upgraded to Web Premium Suite CS3.
    Q: i have several PSD source file for animated GIF's created
    with ImageReday.
    how can i open/iomport/convert it in/to Fireworks CS3 without
    looing the "animation"
    many thanks
    Ueli

    ugisiger wrote:
    > hi
    > no any extras. simply 5 layers "distributed" on the
    timeline.
    > if i open a "animated" psd, so i get a file with the
    layers and one frame, but
    > loosing animation stuff like "when show witch layer an
    for how long"
    > -> there is no conversion to FW frames.
    >
    > Ueli
    >
    I don't do animations in PS or IR, but if you like, send me
    the file
    and I'll see if I can figure something out.
    Jim Babbage - .:Community MX:. & .:Adobe Community
    Expert:.
    Extending Knowledge, Daily
    http://www.communityMX.com/
    CommunityMX - Free Resources:
    http://www.communitymx.com/free.cfm
    .:Adobe Community Expert for Fireworks:.
    news://forums.macromedia.com/macromedia.fireworks
    news://forums.macromedia.com/macromedia.dreamweaver

  • Is there support for animated .gif files?

    Is there support for animated gif files using
    form builder? I can't get it to work.
    Thanks
    Sean
    I am using forms 6.0

    She used the Link Tool, specfied 'Image URL' as the Source File Format and the url of the animated GIF in the Source Filename. Hope that helps.
    Makes sense but the form is not for the web.
    I have looked at doing it with timers and switching canvases, but that is just too much
    for sloppy animation. It's just not tight enough.
    Thanks,
    Sean
    null

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

  • Script for saving GIF with Animation Loop Endless

    Hi,
    I am searching for a way to use  "save for web" in a Photoshop CC Script.
    I already found how to use the "save for web" using Script, but now i am stuck, because i cannot find any information on how to set
    that the animation, i want to save as a Animated GIF File, can be set to loop endless.
    I already tried to search in all the docs i found about scripting, but there is not a single information about saving gif with animation loop endless...
    thanks,
    Philipp

    When you do use "save for web" and select GIF, on the bottom right, the loop mode can be selected. But i think i wouldn't matter to me if it's being set before saving the image.
    I already tried to run the script, but somehow
    "charIDToTID('Ordn')" for example won't run. Is this the same as charIDToTypeID? because i found charIDToTypeID is a function, but charIDToTID is not...
    also the third line from the end, one of the functions seem not to work, i think....
    But already you given me a real good answer to what i may try to search for, since i did not actually know that this is set within the timeline, i always used the option within the "save for web" dialog on the bottom-right.
    I Solved my own problem ...
    I just made Photoshop CC with a script log everything, then gotten to this:
    function setLoopForever() {
    var idsetd = charIDToTypeID( "setd" );
        var desc5 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref2 = new ActionReference();
            var idanimationClass = stringIDToTypeID( "animationClass" );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idTrgt = charIDToTypeID( "Trgt" );
            ref2.putEnumerated( idanimationClass, idOrdn, idTrgt );
        desc5.putReference( idnull, ref2 );
        var idT = charIDToTypeID( "T   " );
            var desc6 = new ActionDescriptor();
            var idanimationLoopEnum = stringIDToTypeID( "animationLoopEnum" );
            var idanimationLoopType = stringIDToTypeID( "animationLoopType" );
            var idanimationLoopForever = stringIDToTypeID( "animationLoopForever" );
            desc6.putEnumerated( idanimationLoopEnum, idanimationLoopType, idanimationLoopForever );
        var idanimationClass = stringIDToTypeID( "animationClass" );
        desc5.putObject( idT, idanimationClass, desc6 );
    executeAction( idsetd, desc5, DialogModes.NO );
    Works perfect!

  • App for animated .gif files?

    I've searched till I'm blue in the face and before it turns red, is there and APP that can upload moving .gif files/pics from your Mac to a folder in the iPhone 3G(S)? When you sync a moving pic or file form iTunes to your iPhone in one of its photo/picture folders, of course the .gif doesn't move but is still. Is there an APP that will view these moving .gif's which allows them to move as they were intended or created?

    She used the Link Tool, specfied 'Image URL' as the Source File Format and the url of the animated GIF in the Source Filename. Hope that helps.
    Makes sense but the form is not for the web.
    I have looked at doing it with timers and switching canvases, but that is just too much
    for sloppy animation. It's just not tight enough.
    Thanks,
    Sean
    null

  • Applet Parameters For Animated Gif Using AWT

    I need to have my applet except parameters to change from one type of animated gif (dog) to another animated gif (cat). There are two for each animal. If the animal parameter is "dog" the dog1.gif and the dog2.gif will be used for the animation. I'm not too sure on how to go about this.
    private String sDog;
    private String sCat;
    sDog = getParameter("");
    if (sDog.equalsIgnoreCase("dog"))
    How do I add both gifs in the control statement?
    Thanks so much,
    Jeff

    private String sDog;
    private String sCat;
    sDog = getParameter("dog");
    for(int i=1;i<3;i++){
    if (sDog.equalsIgnoreCase("dog" i".gif"))
    //code to display the gif
    remember your parameter should be <b>dog</b>

  • Cannot change delay time for animated GIFs

    I just got PSE 6.0 for Mac, and I've slowly been learning how to do what I'd like to with it. I've noticed that there have been some problems with the program, though, such as sudden lockups that make me force-quit. One of my more serious issues involves making adjustments to the delay time in some simple, animated GIF files that I have been working on, using the Save For Web command. For some reason, I can't change the delay time from its default of 0.2 seconds to anything else; the slider doesn't respond when I click on it, nor can I make any direct adjustments in the field itself. In the end, I'm stuck with just that 0.2-second delay. Is this a bug in the program, or am I just missing something?
    If this helps, I have created a set of animated GIFs with two layers/frames apiece, looping continuously. The second and topmost layer is asigned a Dissolve filter, and usually left at 100% opacity when I make the final adjustments. The workspace background for each is transparent when I begin.
    Oh, also, I am using PSE on an Intel iMac with OS 10.5.6, with 2GB RAM and enough hard drive space to fit everything.

    Unfortunately, this is a known bug in PSE 6 for mac:
    http://kb.adobe.com/selfservice/viewContent.do?externalId=333620&sliceId=1

  • Settings help needed for animated GIF

    I have a simple black and white JPEG of 4 umbrellas. My goal is to create a 5 frame animated GIF that shows no colors in the 1st frame, then frame 2 shows the left most umbrella tinted yellow, then frame 3 shows the next umbrella tinted green, etc.
    I used the smart brush tool to add color tint to each umbrella, one layer at a time. Each color addition created an adjustment layer which I merged down into a "real" layer. When I go to "Save for web", I can only get 2 layers to work in an animation regardless of how small a file I create. When I attempt putting the 3rd layer in, I get an error message saying it is too big and I need to either reduce the number of layers (I only have 5 at most) or reduce the image size (I've tried as low as 10 pixels width by 5 pixels height - extremely low and using only 8 colors). Can anyone tell me what "magic settings" I may need to apply in the image size section, etc, to make this thing work?

    Ok, I figured it out. Apparently you need to reduce the size of the image before you send it to "Save for Web". When I reduced it from 2828 pixels wide to 400 pixels wide by 120 height (a workable size for my project), and then sent it to Save for Web, it all worked fine. I guess you can't rely on the "New Size" in the Save for Web screen to do the job - bummer.

  • Will there ever be a fix for Animated Gifs  OS 10.5.8

    I realize this extremely stupid bug which has/had been around for many years was apparently fixed in 10.6, but that upgrade is simply not an option for me (as, 10.6 will not install on this machine.)
    the problem is very well known (and many years old): loading a simple animated gif, even very small files, causes Safari to beachball while the gif is downloading (this can take over a minute even for a file under 250k). it should be almost instant (like it is in Firefox)
    this was never a problem using older OS and older versions of Safari (even very large animated gifs loaded very quickly and did not affect system performance.)
    this problem does not exist (and never did exist) in Firefox. i can load animated gif as expected, and very quickly under firefox.
    why did apple refuse to fix this? why do they continue to refuse? it worked fine, and then apple broke it. and it seems like they are leaving it broken on purpose.

    HI,
    Empty the Safari Cache from the Safari Menu Bar more often.
    Go to the Safari Menu Bar, click Safari/Preferences. Make note of all the preferences under each tab. Quit Safari. Now go to ~/Library/Preferences and move this file com.apple.safari.plist to the Desktop.
    Relaunch Safari and see if that makes a difference. If not, move the .plist file back to the Preferences folder. If Safari functions as it should, move that .plist file to the Trash.
    Carolyn

  • Backgrounds for Animated Gifs

    First let me say I am new to Captivate. I think it is an
    awesome tool in creating CBT's. Here's my problem. I have an
    animated .gif file it is small (only 96.0KB) I created it in Adobe
    Image Ready... I want to import it into captivate and use it as a
    navigation icon. The problem is the animation appears fine but
    there is a black background? I can't get rid of the background. Any
    ideas? Suggestion to do it differantly? PLEASE HELP!!

    Keep in mind that when animated GIFs are brought into
    Captivate, they are converted to SWF format, so you are ultimately
    looking at a Flash animation, not a GIF animation.
    The black background is a common occurrence, and in my
    opinion is caused by timing issues with the original animated GIF.
    Try experimenting with changes to the original GIFs properties,
    specifically the frame rate, and overall time for display. Also be
    sure that the "background" of the GIF is a solid (transparent)
    color.
    Good luck - and
    welcome to the Captivate User Community!

  • Maximum Number of Layers for Animated GIFs

    Hi,  What's the maximum number of laters that can be used in animated GIFs made with PSE8 and PSE9?  Using Windows XP

    The smaller the document size the more layers you can animate.
    Have no idea what the limits are.
    MTSTUNER

  • Hotspots For Animated Gif

    I'm not sure if you're able to do this, but I'd like to
    create an animated gif with 7 different frames. I'd like to have a
    different URL hotspot on each frame to go to seven different web
    addresses (one web address per frame). Can I do this? If so, please
    explain how.
    Thanks in advance.

    MCInteractive wrote:
    > I'm not sure if you're able to do this, but I'd like to
    create an animated gif
    > with 7 different frames. I'd like to have a different
    URL hotspot on each frame
    > to go to seven different web addresses (one web address
    per frame). Can I do
    > this? If so, please explain how.
    It can be done in Flash but not in Fireworks.
    Linda Rathgeber [PVII] *Adobe Community Expert-Fireworks*
    http://www.projectseven.com
    Fireworks Newsgroup:
    news://forums.projectseven.com/fireworks/
    CSS Newsgroup: news://forums.projectseven.com/css/
    Design Aid Kits:
    http://www.webdevbiz.com/pwf/index.cfm

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

  • Black pixels in animated gif??

    Hi, I've got this game where I use gif's in a loop to make animations, what I don't understand though is when I use small animations they work fine but when I use bigger animations at the end of the animation a black stripe starts to form at the bottom of the image that grows bigger. Also it waves at little at the top of the black rectangle. I thought this was very strange, the images work normally when opened with any image viewing program. They even work in java but not when displayed in a long animation.
    Does anyone know why this happens and if there is a way around this?
    thnx
    Message was edited by:
    Jeebe

    Hunt,
    That's a very nice tutorial, not to mention an elegant way to handle slides with different aspect ratios. I've run into that problem myself, and always just cropped as needed using a plain black background. The "frames" around the photos were also a nice touch.
    I looked at the source code for your response and saw how you embedded that video using JavaScript. Looked around online, and found Adobes "official" script, along with an exhaustive explanation of all the parameter settings at: http://kb2.adobe.com/cps/127/tn_12701.html
    Adobe claims 98% penetration for Flash Player, so that's pretty good and makes it a fine choice for streaming videos, given all the clutter and extra baggage you get using YouTube. I will definitely give it a try. Thanks!
    By the way, I think I figured out where those ghosts in the animated GIF were coming from. I went back into Premiere, exported the entire project as an uncompressed avi, and it played just fine with no ghosting. So I imported it into Premiere as a new project, did the export as animated GIF, and the ghosting was back.
    I can only conclude that the GIF conversion process itself is flawed. Probably something with the way it parses the content, and shows up most when you have transitions with high contrast background and text. I guess it's time for the animated GIF to go the way of the floppy disc.
    Thanks again for your help. If any forum member searchs for "animated + GIF + ghosting" they'll find this thread, and we'll have hopefully saved them some time figuring out why it's happening.
    Dan Heim

Maybe you are looking for

  • Hulu and Verizon Authentication Is No Longer Working

    I want to say that this process has been working flawlessly until the beginning of the month with coincides with the new release of the Verizon website redesign.  The feature I am specifically talking about is the authentication that Hulu has to do w

  • Help needed in debugging callablestatement changing performance

    Looking for some help debugging a performance problem. We are in the process of converting an ASP web application running on IIS to a java web application running on OAS. We have java code using a CallableStatement that calls an Oracle PL/SQL Procedu

  • How to Use EEWB in adding custom fields in transactions

    I have seen some tutorials on the net on how to customized transactions using EEWB. But it seems that CRM related transactions were the only examples I have seen. Is it possible to use EEWB in ANY transaction we wish to customize? We are planning to

  • Job output in System 9.3 Workspace

    We're learning the ins and outs of the workspace on System 9.3, and have two issues with job output:<BR><BR>1. Can we configure the system to NOT display the job log file? We don't want end users to see this!<BR><BR>2. Can we confgure the system to N

  • WLC 7.6.100 and PI 2.0

    Today we are running software 7.5.102.0 on our 5508 controllers and software 1.3 on PI. We now considering upgrade to 7.6.100 on the controllers and 2.0 on PI. In the release notes for 7.6.100 it says: "Cisco Prime Infrastructure 1.4.1 is needed to m