Results 1 to 6 of 6

Thread: help in flash script

  1. #1
    Join Date
    Aug 2006
    Location
    Mumbai, India
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default help in flash script

    rediff.com uses swf ads at top left corner which expands when we visit the site and after few seconds it goes back to its original position.. is there any script used in that, for temporary period u can also view the same funda is used in http://tataindicomwifi.com/

    pls give the solution

  2. #2
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    How familiar are you with Flash and ActionScript?

    There isn't any really complicated coding going on there. The magic is really in how you embed the Flash file and CSS z-indexing.

    If you embed the file using transparent window mode, it'll have a transparent background. Then you just position the movie as you need to using z-indexing and it seems like the flash is "floating" above your content.

    Here is an example I made a while ago when someone asked me the same question. Click on the movie to expand it. The mountains in the background are an image. Added using regular old HTML. I've included the flash source files (in both Flash 8 and CS3). You're welcome to take a look at the CSS and HTML, as well. Just be mindful of the noncommercial CC license.

    Let me know if you have any other questions.

  3. The Following User Says Thank You to Medyman For This Useful Post:

    ReadyToLearn (05-02-2008)

  4. #3
    Join Date
    Jan 2008
    Posts
    51
    Thanks
    46
    Thanked 1 Time in 1 Post

    Default

    What luck. I was just about to post a question to this.

    Medyman, that's a great example. I've downloaded the source and have a few questions.

    1. Would it be possible to make the entire add draggable. So the user can take out out of the way if you wanted to.
    2. How would I make it so that instead of appearing wright away, the back animates to expand.
    3. What font did you use for the text? I really like it.
    4. Can I use this on my website? Or is that against your license?

    Thanks

  5. #4
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Would it be possible to make the entire add draggable. So the user can take out out of the way if you wanted to.
    I wouldn't recommend that use implement any flash add that is going to get in the way of content. At best it should appear and after a certain period go back to it's collapsed position.

    In any case, if you want to do this...look into the startDrag() and stopDrag() methods.

    How would I make it so that instead of appearing wright away, the back animates to expand.
    For any kind of tweening (animation), I always use MC Tween or Tweener. It would be fairly easily to implement MC Tween in this instance.

    For example, replace
    Code:
    ad.back._height = Stage.height;
    with
    Code:
    back.resizeTo(back._width, Stage.height, .5, "easeOutQuad");
    If you do that, you should get rid of the positioning on the text field. Unless you use it in conjunction with MC Tween's onTweenComplete method, it won't have the height of back until the animation completes (and you're calling it before the animation completes).

    What font did you use for the text? I really like it.
    It's called nevis. It's available here for free.

    Can I use this on my website? Or is that against your license?
    Yeah, sure. I just mean don't sell my code as yours. Thanks for asking though.
    Last edited by Medyman; 05-02-2008 at 06:03 PM.

  6. The Following User Says Thank You to Medyman For This Useful Post:

    ReadyToLearn (05-03-2008)

  7. #5
    Join Date
    Aug 2006
    Location
    Mumbai, India
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks a lot Medyman ... can i get the source files to understand better

  8. #6
    Join Date
    Mar 2007
    Location
    Currently: New York/Philadelphia
    Posts
    2,735
    Thanks
    3
    Thanked 519 Times in 507 Posts

    Default

    Quote Originally Posted by deepakdeep View Post
    Thanks a lot Medyman ... can i get the source files to understand better
    Yea, they're on the page. Where it says
    Source: Flash 8 & Flash CS3
    Those would be links to the source!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •