开发者

User Initiated Pop-up Window within Flash ad

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.


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


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()];

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜