Skip to main content
February 18, 2010
Answered

NavigateToURL code btns for Dreamweaver Frameset.

  • February 18, 2010
  • 2 replies
  • 1664 views

Can some one please coypaste an AS3 bnt code to use in-conjunction with a Dreamweaver frameset.

This topic has been closed for replies.
Correct answer kglad

what are you trying to do?

2 replies

March 13, 2010

Hi

Just to finalise the get URL is "parent" not "top" listed in the first line of code in the final 4 btn code set in this listing, cheers.

Sabby76

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
February 18, 2010

what are you trying to do?

February 18, 2010

I want to make a Dreamweaver frame set / Fixed Top.

The web site has four pages therefore four btns.

The Dreamweaver site uses these prefixes to the pages.

idex.html  / mainFrame2.html / mainFrame3.html and mainframe4.html

The btns for those pages are...

btn1 / btn2  / btn3 / btn4

Here is an example of the site code, it doe's not work.


   btn1.addEventListener(MouseEvent.CLICK,btn1Click);

function btn1Click(evt:MouseEvent):void {
   var url:String = "http://poole-pc/WebSites/FrameSets/URLRequest/index.html";
   var req:URLRequest = new URLRequest(url);
   navigateToURL(req, "_self");   
   }

I need the btn code to use a naviagteToURL.

btn2.addEventListener(MouseEvent.CLICK,btn2Click);

   function btn2Click(evt:MouseEvent):void {
   var url:String= "http://poole-pc/WebSites/FrameSets/URLRequest/mainFrame2.html/mainFrame";
   var req:URLRequest = new URLRequest(url);
   navigateToURL(req,"_self");
   }

To define the page and mainfarme, here is how it used to worked in AS2.

on(release){
getURL("mainFrame2.html", "mainFrame");
}

Someone like myself whom has limited knowledge of any actionscript

AS3 seems clamy and convoluted.

Sabby76

kglad
Community Expert
Community Expert
February 18, 2010

try:

   btn1.addEventListener(MouseEvent.CLICK,btn1Click);

function btn1Click(evt:MouseEvent):void {
   var urlS:String = "index.html";
   var req:URLRequest = new URLRequest(urlS);
   navigateToURL(req, "mainFrame");   
   }

I need the btn code to use a naviagteToURL.

btn2.addEventListener(MouseEvent.CLICK,btn2Click);

   function btn2Click(evt:MouseEvent):void {

   var urlS:String= "mainFrame2.html";

   var req:URLRequest = new URLRequest(urlS);

   navigateToURL(req,"mainFrame");

   }