Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7919297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:49:12+00:00 2026-06-03T15:49:12+00:00

I need some help with flash banner. I need to do a button in

  • 0

I need some help with flash banner. I need to do a button in banner which hides div, I’ve found a way to do it in AS2, but I need to use AS3, I don’t know ActionScript at all so I NEED your help.

I’ve found this code, unfortunately it’s in AS2:

on (release) {
import flash.external.ExternalInterface;
ExternalInterface.call("hideDiv", "operator");
}

<script type="text/javascript">
function hideDiv(id)
{
   document.getElementById(id).style.display = 'none';
}
</script>

My button instance name is “closeBt” and I would like to hide div “#flashcontainer”

Help me please.

UPDATE

my AS3 code

   import flash.external.ExternalInterface;
import flash.events.MouseEvent;


var myStage:Stage = this.stage;
myStage.scaleMode = StageScaleMode.NO_SCALE;
myStage.align = StageAlign.TOP_LEFT;

function resizeDisplay(event:Event):void{

    var swfWidth:int = myStage.stageWidth;
    var swfHeight:int = myStage.stageHeight;

    var flagaYPos:Number = swfHeight - flaga.height;
    var flagaXPos:Number = swfWidth - flaga.width;

    flaga.y = 40.75;
    flaga.x = -31.4;

}

myStage.addEventListener(Event.RESIZE, resizeDisplay);

closeBt.addEventListener(MouseEvent.CLICK, clickHandler);

trace("Button has been Clicked");

function clickHandler(e:MouseEvent):void {
    if(ExternalInterface.available)
    ExternalInterface.call("hideDiv", "operator");
}

and my html body

<body style="margin:0; padding:0">
<script>
function hideDiv("operator")
{
   document.getElementById("operator").style.display = 'none';
}
</script> 
<div id="operator">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(0013)about:internet -->
<script language="JavaScript" type="text/javascript">
    AC_FL_RunContent(
        'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0',
        'width', '100%',
        'height', '100%',
        'src', 'Kopia baner01',
        'quality', 'high',
        'pluginspage', 'http://www.adobe.com/go/getflashplayer',
        'align', 'top',
        'play', 'true',
        'loop', 'true',
        'scale', 'noscale',
        'wmode', 'transparent',
        'devicefont', 'false',
        'id', 'Kopia baner01',
        'bgcolor', '#ffffff',
        'name', 'Kopia baner01',
        'menu', 'true',
        'allowFullScreen', 'false',
        'allowScriptAccess','sameDomain',
        'movie', 'Kopia baner01',
        'salign', 't'
        ); //end AC code
</script>
<noscript>
        <object style="display: none" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="100%" height="100%" id="Kopia baner01" align="top">
        <param name="allowScriptAccess" value="sameDomain" />
        <param name="allowFullScreen" value="false" />
        <param name="movie" value="Kopia baner01.swf" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="salign" value="t" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" />  <embed src="Kopia baner01.swf" quality="high" scale="noscale" salign="t" wmode="transparent" bgcolor="#ffffff" width="100%" height="100%" name="Kopia baner01" align="top" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
        </object>

</noscript>
    </div>
</body>

AS is on timeline, i do not have any skills on AS, AS2 or AS3, i would like to hide div with banner so close btn would close the banner

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T15:49:13+00:00Added an answer on June 3, 2026 at 3:49 pm

    In AS3, it would look like this:

    import flash.external.ExternalInterface;
    import flash.events.MouseEvent;
    
    closeBt.addEventListener(MouseEvent.CLICK, clickHandler);
    
    function clickHandler(e:MouseEvent):void {
        ExternalInterface.call("hideDiv", "operator");
    }
    

    This code assumes that you’re adding your script to the timeline. If you’re using a Document Class, then you would add a “private” modifier before “function”. You mentioned you’re not very experienced in AS3, so timeline will be the way to go for now. But, do look into Classes if you’re getting serious about AS3.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need some help. Is there a way to use Kinect (on windows) using
I need some help about WCF and authorization. Currently I have a client which
I am absolute beginner in Flash, and AS3. I need to make dynamically some
Good people - I need some help to find a way to create an
I found SwfDotNet to help me create swf flash files with C#, but I
I've built myself some flash content for my website, but I need some divs
Need some help, please. I have a line of horizontal thumbnails loaded as ONE
Need some help to solve this. I have a gridview and inside the gridview
Need some help with this problem in implementing with XSLT, I had already implemented
Need some help gathering thoughts on this issue. Our team is moving ahead with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.