Hi guys,
I’m not 100% up on how well html and flash work together, I am currently working on the papervison 3d cube and have managed to create this all fine…
Those of you who are familar with this will know that when you click on a “face” of the cube it opens up a webpage in a new window: Using the following code:
face.addEventListener(MouseEvent.CLICK, faceClick);
function faceClick(e:MouseEvent):void
{
navigateToURL(new URLRequest(“http://www.yahoo.com”));
}
face2.addEventListener(MouseEvent.CLICK, face2Click);
function face2Click(e:MouseEvent):void
{
navigateToURL(new URLRequest(“http://www.google.com”));
}
face3.addEventListener(MouseEvent.CLICK, face3Click);
function face3Click(e:MouseEvent):void
{
navigateToURL(new URLRequest(“http://www.flickr.com”));
}
face4.addEventListener(MouseEvent.CLICK, face4Click);
function face4Click(e:MouseEvent):void
{
navigateToURL(new URLRequest(“http://www.youtube.com”));
}
face5.addEventListener(MouseEvent.CLICK, face5Click);
function face5Click(e:MouseEvent):void
{
navigateToURL(new URLRequest(“http://www.facebook.com”));
}
face6.addEventListener(MouseEvent.CLICK, face6Click);
function face6Click(e:MouseEvent):void
{
navigateToURL(new URLRequest(“http://www.adobe.com”));
}
I would like to potentially do 3 things:
-
Rather than than open in a new window…open the page in the same window…so something to do with _parent as the target perhaps??
-
Simialr to above but perhaps more difficult or impossible, open up url in an iframe or specific div, i.e If I have iframe called “content”, when html loads it loads my flash 3d cube into “content” iframe (that bit I can do no problem), then from clicking on a face inside the flash, open new html inside “content” iframe, again this has something to with specifying the target=“content” with flash??
3)Finally, rather than open a url on click, can I navigate to a new flash movie or to a place on the time line??
Any help, advice or tutorials would be very handy and helpful…
Just to clarify point 2, if I was do do this using just html and loading different html pages into my iframe, the html would look like this:
<a href=“2WheelDrive.html” target=“content” class=“three”>2 Wheel Drive-R&R</a>
Where clickin on “2 Wheel Drive-R&R” would load “2wheeldrive.html” into target “content” which is the name of my iframe, so I would like to apply this to the face within flash???
Hope this makes sense…thanks.