PDA

View Full Version : Flash Questions



einsganzer
12-17-2003, 03:25 PM
I'm not sure if I should post these seperate. If someone asks me to I will, if not feel free to respond to all or one of the questions and I will sort them out.

I am in the process of creating a flash web site.... my first,and I need some guidance, please...

Question 1)Is it a good idea to create the entire site in Flash? Will probably want to read the other two questions before responding to this one.

Question 2) If so how can I jump from one scene to the next inside the swf smoothly with a mouse click to allow using the back button in the browser without it going all the way back to the intro?

Question 3 and final for now ) If I have a link to an external html file, how can I set up the link inside of flash to open a predetermined size window? Much like Dreamweaver using the Open Browser Action. I understand the GETURL but is there extra script, expressions, to define the window size?

Working in Flash 5

Thanks in advance. I don't expect anyone to just send me the code or scripts. That would be nice, but if there is a link to somewhere that will answer these questions, please let me know. I may have missed it in the book?

Cheers
einsganzer

Sualdam
12-17-2003, 08:45 PM
Answering the questions out of order...

On question no. 2, if you want the browser back button to interact with the Flash movie, take a look here:

http://www.robertpenner.com/experiments/backbutton/backbutton.html

The back button issue has been around for a long time with Flash. You might need to do a bit more searching - I'm not sure if this works with Flash 5 without looking.

On the first question, there is absolutely nothing wrong with creating a site entirely in Flash. You just have to consider accessibilty - if your aim is to have every human being on earth, no matter what their language or personal situation, access your site then you need to think about using Flash MX or greater and learn all the accessibility Actionscript functions.

However, if you are not into all that, then go ahead and do it. People who don't like Flash or who prefer text-only sites will disagree, of course :) There are plenty of Flash sites out there.

Having said that, have your Flash embedded in a HTML container - don't make the mistake of trying to just link to SWFs. You'll have problems if you do.

On the third question, it is quite easy. Here's why you need the HTML container...

In your head tags paste this code:


<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function openWindow(URL, winname, xwidth, yheight, xpos, ypos) {
newWindow = window.open(URL, winname, "toolbar=0,location=0,directories=0,status=0,menuba r=0,scrollbars=0,resizable=0,width="+xwidth+",height="+yheight+",left="+xpos+",top="+ypos)
}
function closeWindow() {
newWindow.close()
}
// End -->
</SCRIPT>

Now, in your movie, on a button say, put this code:


on (release){
getURL("javascript:openWindow(\'filetodisplay.htm\',\'wind owname\',0,0,0,0,0,0,0,350,400,0,0)", "");
}

This opens a window 350 by 400 pixels without any toolbars or scrollbars. You can see the various options in the HTML code and the corresponding '0' (change to a '1') in the Actionscript.

einsganzer
01-07-2004, 10:34 AM
Sualdam,

Thank you for your response. I appreciate your help. I am still working on the back button issue but I will get. However; When I used the code you had provided in your response I noted one thing:

At the end of the getURLscript-
,0,0,0,0,0,0,0,350,400,0,0 with 350 and 450 being the window size........when I used the code in MX I found that the window size was determined by putting the 350 and 450 in the first two tags as such-
,350,450,0,0,0,0,0,0,0,0,0

Just an observation.

Thanks again for the help.