# Flash Navigation to DIV

**URL:** <https://forum.kirupa.com/t/flash-navigation-to-div/261270>\
**Category:** flash\
**Created:** [May 25, 2008, 1:22pm UTC](https://forum.kirupa.com/t/flash-navigation-to-div/261270 "2008-05-25T13:22:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattjp18](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@mattjp18](https://forum.kirupa.com/u/mattjp18)\
**Post date:** [May 25, 2008, 1:22pm UTC](https://forum.kirupa.com/t/flash-navigation-to-div/261270/1 "2008-05-25T13:22:20Z")

</div>

Hi,

Is there any way to have a flash header in a website using navigatetoURL to load in different content into a DIV container on the site?

Thanks,

---

<div class="post-metadata">

**Author:** ![sparkdemon](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@sparkdemon](https://forum.kirupa.com/u/sparkdemon)\
**Post date:** [May 26, 2008, 7:49am UTC](https://forum.kirupa.com/t/flash-navigation-to-div/261270/2 "2008-05-26T07:49:35Z")

</div>

\<head\>  
\<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1” /\>  
\<title\>Untitled Document\</title\>  
\<style\>  
#demo  
{  
width:500pt;  
height:400pt;  
font-family:Arial, Helvetica, sans-serif;  
font-size:medium;  
background-image:url(“images/bground3.gif”);  
background-repeat:repeat;  
}  
\</style\>  
\<script type=“text/javascript”\>  
function changeSettings(thiscolor, thisfont, thissize, thisbg){

```
        var bg='images/'+thisbg+'.gif';
        document.getElementById("demo").style.backgroundImage="url("+bg+")";
        document.getElementById("text").style.color = thiscolor;
        document.getElementById("text").style.fontSize=thissize;
        switch (thisfont) 
        {
        case 'Arial':
            
            document.getElementById("demo").style.fontFamily = "Arial, Helvetica, sans-serif";
            break;
            
        case 'Verdana':
            
            document.getElementById("demo").style.fontFamily = "Verdana, Arial, Helvetica, sans-serif";
            break;
            
        case 'Times New Roman':
            
            document.getElementById("demo").style.fontFamily = '"Times New Roman", Times, serif';
            break;
            
        case 'Courier':
        
            document.getElementById("demo").style.fontFamily = '"Courier New", Courier, monospace';
            break;
        }
    }
    &lt;/script&gt;
    &lt;script src="Scripts/AC_RunActiveContent.js" type="text/javascript"&gt;&lt;/script&gt;

```

## \</head\>

the body contains another div called text:

\<div id=“text”\>  
Your message will appear here.  
\</div\>

this is a sample html code … that changes color, background image, and font with dhtml with command from flash…

flash calls the changeSettings function as :

this.getURL(“javascript:changeSettings(’”+fntcolor+"’,’"+fntName+"’,’"+fntSize+"’,’"+bgimage+"’)");

or you could also use externalInterface if you dont favour old flash players 🙂

---

<div class="post-metadata">

**Author:** ![mattjp18](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@mattjp18](https://forum.kirupa.com/u/mattjp18)\
**Post date:** [May 26, 2008, 12:44pm UTC](https://forum.kirupa.com/t/flash-navigation-to-div/261270/3 "2008-05-26T12:44:40Z")

</div>

Thanks everyone, I wasn’t aware of the externalInterface in as3, I think this is exactly what I need. I’ll try it later today and let you know.
