views:

63

answers:

2

I am currently working on a flash ad for a local bank. One of the frames of the animation requires that the disclaimer text be displayed. I am attempting to create a tab within the ad that if clicked will allow a small window to slide up (roughly half the height of the medium rectangle), display the disclaimer and then close. This would occur while the main animation is still progressint. The problem is I'm not sure how to go about it.

I've seen this technique in an Insurance ad on one of the major ad networks but have not been able to determine how to do it.

I am using Flash CS4. I am marginally proficient in AS3.

A: 

You mean that it pops OUT of the ad?

Check Rich Media Ad

http://googleblog.blogspot.com/2009/04/whats-rich-media-ad-anyway.html

If you meant like inside... Well, it is just a simple animation - made in a movie clip, so that it does not move with the main timeline...

Aurel300
A: 

Create your MovieClip disclaimer and when the animation reaches the relevant frame, add the tab which , when click will add the MovieClip to the stage.

//on the relevant frame add the tab MovieClip
var tab:MovieClip = new Tab();
tab.addEventListener(MouseEvent.CLICK , tabClickListener );
addChild( tab );

function tabClickListener(event:MouseEvent):void
{
  var disclaimer:MovieClip = new MovieClip();
  disclaimer.x = -400; //whatever position is out of the window
  addChild(disclaimer );

  //I personally use TweenMax , but you can use whatever tweening class
  //this will slide your MovieClip in
  TweenMax.to( disclaimer , .5 , {x:100 } );
  tab.removeEventListener(MouseEvent.CLICK , tabClickListener );
}

//In your disclaimer MovieClip:
//create a close button and add a click event listener to trigger the
//following

function close(event:MouseEvent ):void
{
  TweenMax.to( this , .5 , {x:-400} );
  closeButton.removeEventListener(MouseEvent.CLICK , close );
}

//to make your disclaimer look like a pop up , just add a DropShadow filter
this.filters = [new DropShadowFilter()];

PatrickS
I've never used TweenMax or any Tweening class for that matter, but I'm trying to get this to work. Do you have an example .fla I could look at? I've downloaded TweenMax, placed the .com folder in the same directory with my .fla, but I continue to have errors. Access of undefined property, and call to a possibly undefined method Tab.
Victor Duwon
You need to add TweenMax to the library/class path. Check this link:http://help.adobe.com/en_US/Flash/10.0_UsingFlash/WS3e7c64e37a1d85e1e229110db38dec34-7fa4a.html#WSB1F410E6-F7BD-443a-97E7-13DE866CA732
PatrickS