http://www.cs.uni.edu/~jacobson/022/fla/introDancer2.html // This code is in Frame #1 of the layer named "actions" in honor // of ActionScript 3.0, the language for // programming Flash CS3. var link:URLRequest = new URLRequest("http://www.uni.edu"); skip_btn.addEventListener(MouseEvent.CLICK, onClick); function onClick(event:MouseEvent):void { stop(); navigateToURL(link, "_self" ); } ---------- // This ActionScript 3.0 programming language code is in frame #100 // of the actions layer of the Flash application. ---------- var link2:URLRequest = new URLRequest("http://www.uni.edu"); stop(); navigateToURL(link2, "_self" ); http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/ Packages: Look under flash.net Package --------- Functions: Look at the navigateToURL() function documentation. --------------- -------------- Note: Frame #100 would normally have ONLY THESE TWO STATEMENTS! -------------- stop(); navigateToURL(link, "_self" ); You almost always want to navigateToURL() to the SAME WEB PAGE whether: 1. the user clicks the button to skip the Flashy Flash intro, or 2. the entire Flash intro plays and finishes, so that the user is now automatically taken to the web page the flash intro was just preparing you and motivating you for. ------------------------------------------------------------------------- // Frame #1 has these statements, including declaring the // varIABLE named link. --- ---- var link:URLRequest = new URLRequest("http://www.uni.edu"); skip_btn.addEventListener(MouseEvent.CLICK, onClick); function onClick(event:MouseEvent):void { stop(); navigateToURL(link, "_self" ); } ----------------------------------------------------------------------- Note: Frame #100 would normally have ONLY THESE TWO STATEMENTS! -------------- stop(); navigateToURL(link, "_self" ); You almost always want to navigateToURL() to the SAME WEB PAGE whether: 1. the user clicks the button to skip the Flashy Flash intro, or 2. the entire Flash intro plays and finishes, so that the user is now automatically taken to the web page the flash intro was just preparing you and motivating you for. In summary, var link2:URLRequest = new URLRequest("http://www.uni.edu"); is really not needed!!!!! Just use the already declared link variable from frame #1! ---- --- ---- var link:URLRequest = new URLRequest("http://www.uni.edu"); ---- navigateToURL T URL T URL T URL skip_btn.addEventListener(MouseEvent.CLICK, onClick); E L E L E L E L cAsE SeNsItIvE to UPPER case and to lower CASE lEtTeRs!!!!! YMCA or ymca or YmCa or yMcA or yMCa or YmcA????? skip_btn is the INSTANCE NAME of a button. -------- skipButtonSymbol might be the name of the SYMBOL in the Library. ---------------- You cannot give anything an instance name when you are creating it as a symbol or when you are converting it to a symbol (Button or Movie Clip type symbol). You can only give something an INSTANCE NAME when it is on the stage!!! ------------------------------------------------------------------------ CHAPTER 07 of the textbook explains all of this in much more detail and walks you through an example, so be sure to read and perhaps to DO that example to get the foundation for doing Flash intros. ------------------------------------------------------------------------ http://www.cs.uni.edu/~jacobson/022/fla/introDancer2.html