Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Actionscript / December 2005



Tip: Looking for answers? Try searching our database.

Button Delay Please Help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bryan Krossley - 31 Dec 2005 14:56 GMT
Hello,
   I would like to start off saying I am new to Actionscript and know very
little.  I need some help with some code.  I have a button the on release
goes  to a url.  The button also play a sound when pushed.  But because on
release of the button the page changes to another url page which is cutting
out the sound effect I have for the button.  I would like the button to
delay for a second or two before it does the command getURL.  Please
remember I have little knowledge of actionscript so please include ever
step.  Thanks in advance.

Bryan Krossley
yachts99 - 31 Dec 2005 16:31 GMT
Name the button instance on the stage "theButton" and then place the following
code on the first frame of the timeline NOT on the button. This will give a 2
second delay (2000 milliseconds) before calling the function that gets the new
page:

theButton.onRelease = function () {
    setTimer ();
};
function setTimer () {
    intervalID = setInterval (getPage, 2000);
    function getPage () {
        getURL ("http://www.google.com", _blank);
    }
}
Bryan Krossley - 31 Dec 2005 16:49 GMT
Thanks for the post.  I will try it.  Also is there a way to open the new
url maximized?

Bryan Krossley

> Name the button instance on the stage "theButton" and then place the
> following
[quoted text clipped - 13 lines]
>  }
> }
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.