-
Hi,
I have 2 questions about some programming in Flash:
1) How do I tell a web page to wait for the images on the page to load FIRST, before the flash movie starts to play?
2) How do I detect which resolution the user is at, and then based on that info re-direct them to a specified URL?
Thanks!
-
Dan the cow as an icon. cool idea!!
But to get back to the subject,
i can answer your second question about rederecting.
but your first is kinda tricky i guess. Maybe its possible but i dont know how its gonna be done. It seems quite impossible to me though.
well.
================================================== ========
to detect which screen res somebody is using youll have to make a new html page, a detecting screen. I prefer black detecting screens with no pictures and stuff. You just see that screen for a sec or some, so....
Then you have to open the source code and put some javascript code in there to detect the resolution.
You can find all sorts of (javascript) codes at http://www.dynamicdrive.com
I have fetched a code for you.. here comes:
-
<script language="JavaScript1.2">
<!--
/*
Screen resolution detection and notification Script-
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions,
100's more DHTML scripts, and Terms Of
Use, visit dynamicdrive.com
*/
var correctwidth=800
var correctheight=600
if (screen.width!=correctwidth||screen.height!=correc theight)
document.write("This webpage is bested viewed with screen resolution "+correctwidth+"*"+correctheight+". Your current resolution is "+screen.width+"*"+screen.height+". If possible, please change the resolution!")
//-->
</script>
-
Now, that piece of code only detects what kind of res you are watching and tells it to ya. But you want more. You want the browser to redirect.
Ill just search some more for ya.. hold on.
-
-
to make a loader
you put in the first frame the action:
if frame is loaded "name_of_label_of_movie"
goto en play "name_of_label_of_movie"
end frame loaded
and in frame 5 or somthing like that you put
goto and play "name_af_loding_label"
-
I believe we encountered your first question before. How we handled it was to have javascript control the flash movie.
Put a stop action on the first frame of your movie. Make sure there is nothing else in that first frame but background color. Then, put the onLoad() javascript command at the end of your html. You'll have to create a function that wille execute when that command is triggered. You want that command to tell the flash movie to play after everything else is loaded. Then, you can have the flash movie go to a preloader or, if it has finished downloading (which you can also check with javascript), have the movie start right up.
I'm not really sure of the specifics, but that's how we got around it. If you need something more specific (which you probably will) I can ask the technologists at work what they did.
hope this helps,
Rich
http://www.richpaul.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|