Results 1 to 4 of 4

Thread: [RESOLVED] Browse from root directory... (Flash buttons)

  1. #1

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Resolved [RESOLVED] Browse from root directory... (Flash buttons)

    Hi,

    I am creating a website that uses flash buttons and I am having problems with the root directory. The problem is the index page in the root directory does not recognize all the files in sites directory.

    It will recognize the css folder, java script folder, images folder and files but not the html nor media folders.

    Now I know using text links the code would be:

    Code:
    <a href="html/prod.html" title="Products">Products</a>
    If I was on the homepage (index) and wanting to go to say products. However, that path does not work for the flash buttons.

    I am assuming I need to put "../" in fort of the path in in the file! Except I do not know how many I need to put. While:

    Code:
    css/
    Works for the css, images, javascript folders in does not work for the html and media folders.

    Here is the code the flash buttons use:

    Code:
    btn.addEventListener(MouseEvent.CLICK,callurl);
    
    function callurl(event:MouseEvent):void
    {
    	var prod:URLRequest = new URLRequest("../html/prod.html");
    	navigateToURL(prod, "_self");
    }
    Any help would be grateful,

    Nightwalker
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: Browse from root directory... (Flash buttons)

    / takes you back to the root.

    So if you're on the following page:
    http://vbforums.com/SubDirectory/AnotherDir/Images/Style/Css.aspx

    And you reference a style sheet in the following manner:
    /Style/MyCss.css

    You'll essentially look at
    http://vbforums.com/Style/MyCss.css

    ../ takes you back a level from where you currently are
    KrisSiegel.com - My Personal Website with my blog and portfolio
    Don't Forget to Rate Posts!

    Free Icons: FamFamFam, VBCorner, VBAccelerator
    Useful Links: System.Security.SecureString Managed DPAPI Overview Part 1 Managed DPAPI Overview Part 2 MSDN, MSDN2, Comparing the Timer Classes

  3. #3

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Browse from root directory... (Flash buttons)

    Thanks kasracer!

    I have figured out which code I need to use in th flash buttons on the index page.

    Code:
    btn.addEventListener(MouseEvent.CLICK,callurl);
    
    function callurl(event:MouseEvent):void
    {
    	var about:URLRequest = new URLRequest("html/about.html");
    	navigateToURL(about, "_self");
    }
    I also need to copy all the buttons to the root directory as well.

    Edit:

    I needed to make sure the following code was set to:

    Code:
      <script language="JavaScript" src="javascript/AC_RunActiveContent.js" type="text/javascript"></script>
    and

    Code:
    <param name="movie" value="index.swf" /> <!--Value being the location of the movie file.-->
    Edit:

    Forgot to mention to make sure the code in the html file refering to "javascript/AC_RunActiveContent.js" had the movie line set the same as above except without the extension on the end.

    Code:
    'movie','alpha',
    Last edited by Nightwalker83; Dec 3rd, 2008 at 07:31 PM.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  4. #4

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: [RESOLVED] Browse from root directory... (Flash buttons)

    The url for index.html (root directory) will be:

    function callurl(event:MouseEvent):void
    {
    var index:URLRequest = new URLRequest("index.html");
    navigateToURL(index, "_self");
    }
    instead of:

    function callurl(event:MouseEvent):void
    {
    var index:URLRequest = new URLRequest("../index.html");
    navigateToURL(index, "_self");
    }
    Note: If you use "../" for links on the home page the link will take you outside of your website to the folder where the root directory is stored.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

Posting Permissions

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



Click Here to Expand Forum to Full Width