View Full Version : flash position help

Oct 30th, 2009, 03:53 PM
I'm trying to create a page where i want to position a flash object
in top right position regarding resolution,
how can i do that ?

Oct 30th, 2009, 03:59 PM
how can i do that ? What you have achieved so far?

Oct 30th, 2009, 05:36 PM

It's about the loadMovie action. The loadMovie loads external swfs in movie clips of our movie.

Always have in mind that the top-left corner of the loaded movie clip will be placed in the registration point of the "host" movie clip.

The registration point in a movie clip is this little cross inside each movie clip that defines the position of our elements.
Why is this happening? Flash places the registration point of the external movie (which is always the top-left corner) in the position of the registration point of the host clip.
We can have an ordinary clip or a blank one as our host (the target for our loadMovie action), it makes no difference. We just place the host clip in the position we want, having in mind the above rule.
Below we see our stage with a blank clip on the left and a filled one on the right. See how a blank clip is presented in the stage? The little circle exists to show us where the clip is placed and is also the registration point of our clip. Also notice the registration point of our filled clip. It's the cross in the top-left corner of the orange rectangle.

I have named the blank's instance blankhost and the filled's host. The two buttons contain the script to load an external swf (mov.swf) in each host clip:

on (release) {
loadMovie ("mov.swf", "blankhost");


on (release) {
loadMovie ("mov.swf", "host");

And now the real thing:

Also keep in mind that the loaded movies, apart from taking the hosts' place, are taking their names also.
So when we want to call them we use the instance names of our original host clips. In this movie: host and blankhost.
The black buttons unload the clips using their instance names.

Hope this helps! :D

Source: http://www.flashkit.com/tutorials/Tips_And_Techniques/Loading_-k-gianni-737/index.php

Oct 30th, 2009, 06:16 PM
this is what i've done so far:

my html page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<link rel="Stylesheet" href="~/styles/global.css" type="text/css" />
<title>Design Master</title>
<form id="form1" runat="server">
<img alt="" id="bg" src="pics/homepage.png" />
<div id="scroller">
<div id="content">
<embed src="flash/knopka_with_urls.swf" quality="high" bgcolor="#ffffff"
align="middle" allowScriptAccess="sameDomain"
allowFullScreen="false" type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer" wmode="transparent"
style="float:right;z-index:1000; width:60%; height:10%; position:fixed; right:1%;"/>


this is my css:

html, body {margin:0; padding:0; width:1024px; height:100%; overflow:hidden;}
body {font-family:verdana, arial, sans-serif; font-size:76%;}
#bg{position:absolute; z-index:1; width:100%; height:100%;}
#scroller {position:absolute; width:100%; height:100%; top:0; left:0; overflow:auto; z-index:2;}
#content {padding:10px 10px 10px 250px;}
p {line-height:1.8em; letter-spacing:0.1em; text-align:justify;}
#fixed {position:absolute; top:25px; left:10px; width:150px; z-index:10; color:#567; border:1px solid #000; padding:10px;}