Image Fade In Actionscript

I was following the steps from this topic,
Topic
Example
, and I got to the fade in action script, and I kept getting
this error message:
Scene=graphics, Layer=stuff, Frame=58: Line 2: Statement must
appear within on/onClipEvent handler
var reset:Boolean = false;
Scene=graphics, Layer=stuff, Frame=58: Line 4: Statement must
appear within on/onClipEvent handler
function fadeIn(clip) {
Scene=graphics, Layer=stuff, Frame=58: Line 14: ';' expected
attach this script to the "holder" mc:
How can I fix this problem? I am using Flash MX to create a
photo gallery with thumbnails for my flash portfolio.

please post your entire code for Frame 58.

Similar Messages

  • Image-to-Image Fade Using External Files

    Hi all,
    I'm trying to create a fairly basic random image-to-image fader.  I've got a LOT of images that need to rotate through and they've all been optimized, however the swf file just becomes too big w/all of them.
    So what I was hoping I could do was use AS3 to load up a random jpg from an XML file, apply the fade effect, preload the next one it's planning on grabbing while the current one is being displayed, and repeat the process indefinitely.  By doing this I'm hoping to keep the footprint of the application extremely small.
    Is such a thing possible (I'm using a trial of CS5 at the moment) and if so, can someone point me in the right direction?  I'm pretty new to AS3 so any amount of help would be greatly appreciated!

    Yes, it is possible to do.  You can probably search Google using terms like "AS3 XML slideshow tutorial" to get the whole thing in one package.  Though what you might want to do is take it in steps so that you can come to understand how each aspect works.
    The basic elements would involve loading an XML formatted bit of data into an array and using the Loader class to load the images, using a COMPLETE event listener so that you know when an image is loaded and ready to be processed into an object within the show.
    Then you would want to look into using some actionscript tweening to get the alpha fading effect working for you.  Flash has its own Tween class, and there are thrid party tween classes as well. I'd say use the Flash version first just to eliminate one level of complication for now (installing and using an external class). Many people recommend the thrid party tweening classes over Flash's.
    You might also want to incorporate some form of Timer (the Timer class) to help manage when things change and/or when they load. If you have optimized your images already, then it would take less time for them to load, which means you probably do not want to use loading status to control the timing, but only as logic to enable timed actions.

  • Help with Image fades

    Hi,
    Haven't used Flash in a couple of years now, and it has
    changed a lot...so I am a bit behind with the times. I need to do a
    site with a each section of the website having a background, that
    fades in when the user goes there. I want the transition from
    section to another to be smooth, and the new background image fade
    in on top as the other fades out (at the same time!)
    Also how do i make some of the links on my website HTML pages
    and some flash? I need to be able to link back to the flash section
    of a site when clicking on the flash section. I found an example on
    the Louis Vuitton site, if you click on your account or newsletter
    and then click back to the Services it will go back to that
    specific section of the flash site.
    http://www.louisvuitton.com
    - check it out to see what I mean.
    Hope you can help, I want to start developing my flash skills
    again.
    Thanks

    Hi,
    Haven't used Flash in a couple of years now, and it has
    changed a lot...so I am a bit behind with the times. I need to do a
    site with a each section of the website having a background, that
    fades in when the user goes there. I want the transition from
    section to another to be smooth, and the new background image fade
    in on top as the other fades out (at the same time!)
    Also how do i make some of the links on my website HTML pages
    and some flash? I need to be able to link back to the flash section
    of a site when clicking on the flash section. I found an example on
    the Louis Vuitton site, if you click on your account or newsletter
    and then click back to the Services it will go back to that
    specific section of the flash site.
    http://www.louisvuitton.com
    - check it out to see what I mean.
    Hope you can help, I want to start developing my flash skills
    again.
    Thanks

  • Image fade in

    Hi there,
    Is there somebody who knows if it's possible to have an image fade in on load in muse?
    Thanks for the help!
    Peter

    If it's just an image that you'd like to fade in on load, you can use a Composition widget (Blank), load an image into it (and get rid of the extra triggers/targets), have Autoplay set to .5 second with Transition to Fading and with Hide all Initially option checked. That should give you the desired effect. To make the only remaining trigger invisible, take the trigger's Normal state and remove the default Fill/Stroke applied to it and at last move it over the target while making sure that the Triggers on Top option is disabled.
    Thanks,
    Vinayak

  • How do i make images fade into each other

    Hey guys,
    I'm looking to find out how I can make text and/or images fade and appear on my web page. This affect is used on the adobe home page where text fades and other text appears.
    If someone could point me in the right direction that would be great. I think  need to know flash. but any advice would be appreciated. Thanks

    jQuery
    http://www.geeksucks.com/toolbox/23-jquery-fade-in-fade-out-effect.htm
    jQuery Cycle Plug-in might do what you need
    http://malsup.com/jquery/cycle/
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • URGENT: button rollover animations and image fade ins?

    Hello, I have a site where an image appears which has 6 words
    on it. Each word will be a button where the following actions take
    place:
    on rollover a line draws through the button
    an image fades in on the left and another on the right
    when you click the button, a large window (not popup, prefer
    within flash) appears with information, I guess an swf or mc would
    work.
    once you roll out the images fade out and the line draws in
    other direction so it disappears
    How can I code the buttons to do all this? I am using flash
    8.
    THanks!

    Ok so far so good. IF you mouse over super saturday you will
    see what happens. Now, what is the code when I mouse out so those 2
    things that appeared will disappear? Also, when you click super
    saturday, you will see an swf that loads but it loads in between
    other layers and all other buttons are active outside the swf. How
    do I overlay it over everything then also have a close button on
    this swf? here is the code for a button:
    blu.onRollOver = function() {
    blu._parent.attachMovie("link8","blu_mc",1,this.getNextHighestDepth(10000));
    sat.onRelease = function() {
    loadMovie("popup_saturday.swf", "popup");
    and the site so far:
    http://interactiveboom.com/test/final.html
    THX

  • How to make images fade in and out

    how to make images fade in and out continuously

    HI,
    The Ken Burns effects can do this nicely. Available in the iLife suite of software.
    iLife 06 minimum requirements:
    http://support.apple.com/kb/HT2675
    iLife 06 - Amazon
    Carolyn

  • My MacBook Pro gets really hot when I open a video file of any kind and the video starts lagging and the image fades away, also with anything that starts the fan. Is extremely hot on the left upper corner. Is there something I can do about it?

    My MacBook Pro gets really hot when I open a video file of any kind and the video starts lagging and the image fades away, also with anything that starts the fan. Is extremely hot on the left upper corner. Is there something I can do about it?

    You are still under warranty.  Call Apple Care. Make sure you get a case number as all repairs have an additional 90 days of warranty. 
    #1 - You have 14 days from the date of purchase to return your computer with no questions asked.
    #2 - You have 90 days of FREE phone tech support.
    #3 - You have the standard one year Apple warranty.
    #4 - If you've purchased an AppleCare Protection Plan, your warranty last for 3 years.   You can obtain AppleCare anytime up to the first year of the purchase of your computer.
    Take FULL advantage of your warranty.  Posting on a message board should be done as a last resort and if you are out of warranty or Apple Care has expired.

  • Pause before image fade-ins?

    I'm very new to DW, so be gentle.  :-)
    on my opening web page, I have 2 jpgs that I want to fade into view on load--first one, then the other.
    I can make them both fade in using the fade command in the behaviors menu. BUT--what I really want is for the page to load blank, pause for 2 seconds before the first image fades in, pause again for about 3 seconds before the next image fades into view.  2 images, 2 pauses, 2 fade-ins.  Is there some easy code to create the pauses before the fade-ins for each image?  (I'm working in DW CS5 on a mac)  thx for whatever you can offer.

    Adjust the following values to suit
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    <style>
    body {
        width: 980px;
        margin: auto;
    #logo1, #logo2 {
        display: none;
    </style>
    </head>
    <body>
    <img src="http://shoguncarco.com.au/img/camaro.png" alt="description" name="logo1" id="logo1" />
    <img src="http://shoguncarco.com.au/img/challenger.png" alt="description" name="logo2" id="logo2" />
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
    <script type="text/javascript">
    $(function() {
        $('#logo1').fadeIn(3000, function() {
        $(this).delay(1000).fadeOut(2000, function() {});
        $('#logo2').fadeIn(6000, function() {
        $(this).delay(1000).fadeOut(2000, function() {});
    </script>
    </body>
    </html>
    Gramps

  • Rotating images fade-in

    i managed to create a rotating image banner with the help from this website
    http://www.communitymx.com/content/article.cfm?cid=651FF
    but without the fade-in fade-out effect it doesn't look very nice. how can i make the images fade-in like in the below website
    http://www.flipflopflo.co.uk/home
    i found some help here
    http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm
    but (as i am not professional user) i dont understand what to do with the scripts shown there. for example on "Step 2" it says
    "Step 2: Then, insert the following sample       HTML for 2 sample Fade In slideshows:"
    insert where?

    free flash tutorials sites list here
    http://www.links-mylinks.com/2007/10/flash-sites-free-tutorial-templates.html

  • Image Fade Out/Load new Image/Fade In

    I think I am having an event timing issue. My desire is to
    change the "header" image on each selection of a tabNavigator. I
    can swap the image without issue through a img.load process. I
    placed the image on a canvas and set the "showEffect" and
    "hideEffect" on the canvasto fadeIn and fadeOut. (I actually have 2
    images on the canvas) On the tabNavigator "change" event I call my
    getImage() function and set canvs.visible=false, I have the tab
    index for img.load=headerPic[idx] and then I set
    canvs.visible=true; The result is that I do not get the first
    visible change, I think. Tab 1 is initialized to visible in
    ionComplete, clicking on tab 1 has no effect since it is selected
    already. When tab 2 is selected the image changes to the new image
    immediately and then fadesOut. Tab 3 then will fadeIn. Also
    regardless of the tab selected, if I select another tab the ongoing
    fade effect will continue on the newly selected tab. It seems the
    load method doesn't care about effects - so I don't know how to
    sequence these effects.
    Thanks in advance.

    "EWN-CMI" <[email protected]> wrote in
    message
    news:gk46uv$blo$[email protected]..
    >I think I am having an event timing issue. My desire is
    to change the
    >"header"
    > image on each selection of a tabNavigator. I can swap
    the image without
    > issue
    > through a img.load process. I placed the image on a
    canvas and set the
    > "showEffect" and "hideEffect" on the canvasto fadeIn and
    fadeOut. (I
    > actually
    > have 2 images on the canvas) On the tabNavigator
    "change" event I call my
    > getImage() function and set canvs.visible=false, I have
    the tab index for
    > img.load=headerPic[idx] and then I set
    canvs.visible=true; The result is
    > that
    > I do not get the first visible change, I think. Tab 1 is
    initialized to
    > visible in ionComplete, clicking on tab 1 has no effect
    since it is
    > selected
    > already. When tab 2 is selected the image changes to the
    new image
    > immediately
    > and then fadesOut. Tab 3 then will fadeIn. Also
    regardless of the tab
    > selected, if I select another tab the ongoing fade
    effect will continue on
    > the
    > newly selected tab. It seems the load method doesn't
    care about effects -
    > so I
    > don't know how to sequence these effects.
    You can use the completeEffect on Image to have an effect
    every time an
    image loads, such as you can see used here
    http://examples.adobe.com/flex2/inproduct/sdk/photoviewer/PhotoViewer.html,
    but I don't think there's a corresponding effect that you can
    apply to the
    old image before the change.
    I think you're going to need to use ActionScript to get the
    control over the
    effects that you want, so you can call either the end() or
    the reverse()
    method on the effect when the graphic needs to change in
    mid-effect.
    HTH;
    Amy

  • Can AS attach image fade to Toggle button?

    I have completed my first Flash 8 movie which has an invisible button the size of the image which Stop/starts the movie with AS toggle script below.
    click_btn.onRelease=function(){
    if(!this.toggle){
    chameleon.stop();
    } else {
    chameleon.play();
    this.toggle=!this.toggle;
    Can this script be modified so that the movie fades to alpha zero a short time after the stop action, and the re-appears to play instantly when the play action is triggered? If so can anyone help with a script suggestion please.

    Thanks again Ned,
    A freind of my son worked on this question and following your comments came up with the following code but we cannot make it work.
    **Error** Scene=Scene 1, layer=Code, frame=1:Line 1: Syntax error.
         import mx.transitions.Tween;
    **Error** Scene=Scene 1, layer=Code, frame=1:Line 2: Syntax error.
         import mx.transitions.easing.*;
    Total ActionScript Errors: 2 Reported Errors: 2
    Can anyone help fix the code please?
    import mx.transitions.Tween;
    import mx.transitions.easing.*;
    var secNum:Number = 2;
    var aTween:Tween;
    click_btn.onRelease = function() {
    if (!this.toggle) {
    chameleon.stop();
    aTween = new Tween(chameleon, "_alpha", Quad.easeInOut, 100, 0, secNum, true);
    aTween.onMotionFinished = function() {
    delete aTween;
    chameleon._visible = false;
    } else {
    aTween.stop();
    chameleon._visible = true;
    chameleon._alpha = 100;
    chameleon.play()
    this.toggle = !this.toggle;

  • Web Banner Image Fade

    I'm an experienced Java Architect with no experience of JavaFX. I'm trying to develop a proof of concept Flash-style web banner to see if it is feasible to replace existing Flash elements on my client's site with JavaFX elements, thus removing the need for a costly proprietary RIA toolkit.
    Now the banner in question takes a physical URL from an XML document, loads a set number (also configured in a simple XML document) of images horizontally across the banner. It fades each image out independently and once invisible, it replaces that image with another random image from the URL and fades back in (ensuring it doesn't already exist in the other visible images). Whilst doing this, a quote is displayed across the images in a colour set by the XML file, and this quote fades in and out as well, changing to another quote from a set list, and fading back in once the new quote is found.
    Now I'm sure I can figure out some of the more typical functionality that I come across with Java, C++, etc. on a daily basis, such as interacting with an XML document, and loading images from URLs (perhaps), but the actual timing, fading, working loading new images and quotes at the right time, etc. is all new as I tend to develop business systems and not applications with visual effects. So help is needed on how to best go about doing this. I've begun with a very basic attempt at a Stage and tips on going forward would be appreciated.
    Also, as a side note, in JavaFX how would I extend the Stage and Scenes, and any other object, essentially, and then load them as variables...? remember I'm an OO-oriented Java and C++ programmer, so I understand inheritance, but cannot seem to find the right syntax in JavaFX after an hour working on this basic Flash-eliminating challenge.
    My code is below:
    package ribbon;
    import javafx.animation.Interpolator;
    import javafx.animation.KeyFrame;
    import javafx.animation.Timeline;
    import javafx.scene.paint.Color;
    import javafx.scene.Scene;
    import javafx.scene.shape.Rectangle;
    import javafx.scene.text.Font;
    import javafx.scene.text.Text;
    import javafx.stage.Stage;
    //capture the dynamic width and height of the scene
    var width: Number = bind scene.width;
    var height: Number = bind scene.height;
    var quote: Text = Text {
        font: Font {
            size: 16
        x: 10,
        y: 30,
        fill: Color.RED
        opacity: bind angle
        content: "Interesting quote goes here..."
    var scene: Scene = Scene {
        fill: Color.BLACK
        content: [
            Rectangle {
                x: 0,
                y: bind height - 30
                width: bind width,
                height: 25
                arcHeight: 5
                arcWidth: 5
                fill: Color.BLACK
                opacity: 0.5
            quote,
    var angleStart = 1.0;
    var angle = angleStart;
    var fade = Timeline {
        keyFrames: [
            KeyFrame {
                time: 0s
                values: angle => angleStart tween Interpolator.LINEAR
            KeyFrame {
                time: 3s
                values: angle => 0.2 tween Interpolator.LINEAR
        autoReverse: true
        repeatCount: 1000
    var stage = Stage {
        title: "Photo Ribbon"
        width: 680
        height: 100
        scene: scene
    fade.play();
    stage;Thanks in advance.

    If the banner image is not displaying, it is either not in an acceptable web file format (optimized for web as jpg, gif or png). Or it is corrupted.  Or the path to the image file on server is broken. 
    It's impossible to say more without a link to your problem page.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/

  • Image Fade! - doesnt want to fade!

    Hi all,
    Hope someone can help me.
    I have found a piece of code from Codelifter.com (
    http://www.codelifter.com/main/javas...lideshow2.html)
    enabling me to have a images fading on top of each other in a
    slideshow effect. However, somewhere down the line when placing in
    the code, i have obviously gone wrong because the first picture
    fades out but the others then do not fade in.
    Does this part of the code below look wrong to anyone or does
    anyone know why it may not be working!
    <body
    onload="runSlideShow();MM_preloadImages('../images/mainButtons/homeOver.jpg','../images/m ainButtons/gowerOver.jpg','../images/mainButtons/mumblesOver.jpg','../images/mainButtons/m arinaOver.jpg','../images/mainButtons/moreOver2_15.jpg','../images/find
    buttons/findHomeOver_02.gif','../images/find
    buttons/findHome_03.gif','../images/find
    buttons/findHomeOver_03.gif','../images/find
    buttons/findHome_02.gif')">
    <script
    language="JavaScript1.2">mmLoadMenus();</script>
    Thanks Nikki

    Yes thats done the trick, code as follows:
    private static Image resize2D(Image srcImage, int size)
            int w = srcImage.getWidth(null);
            int h = srcImage.getHeight(null);
            // Determine the scaling required to get desired result.
            float scaleW = (float)size / (float)w;
            float scaleH = (float)size / (float)h;
            System.out.println("Image Resizing to size:"+size+"w:"+w +":h:"+h+"scaleW:"+scaleW+"scaleH"+scaleH);
            // Create an image buffer in which to paint on.
            BufferedImage bi = new BufferedImage(size,size,BufferedImage.TYPE_INT_ARGB);
            // Set the scale.
            AffineTransform tx = new AffineTransform();
            tx.scale(scaleW, scaleH);
            // Paint image.
            Graphics2D g2d = bi.createGraphics();
            g2d.drawImage(srcImage, tx, null);
            g2d.dispose();
            return bi;
    BufferedImage newImage = resize2D(origImage, 200);
    origImage.flush();
    origImage=null;

  • Flash Slideshow-Image Fade-CS4 help!

    So thanks to this place I have figured out how to a an image slideshow...but I would like the image to like go white... fade out..and then turn into the next picture,possible seeing the next image bleed through the fade... I am not able to figure it out..where am I not looking, what is the effect called? Im using CS4 if that helps.
    Thank you!

    Download the template I made and posted on this thread, should get you started,
    http://forums.adobe.com/thread/563921?tstart=0

Maybe you are looking for