ActionScript 2.0 :: Find Center Of Movie?

Sep 26, 2003

How do you find the center of a movie that has has been loaded by loadMovie();

This is the method I was using, but now that it is in a .swf that has been loaded it's stoped working

[AS]
xcenter = box._x + ( box._width /2);
[/AS]

View 4 Replies


Similar Posts:


ActionScript 3.0 :: Find Center Point Of Pie?

Aug 26, 2010

i am trying to find center point of my pie.

var myTween:Tween = new Tween(piechart,"............", Strong.easeOut,1200, 510, 1, true);

i want to animate from the center and it has a xml driven data file.

View 2 Replies

Keep Center Of The Movie In The Center Of The Scree Regardless Of Browser Size?

Mar 23, 2009

My flash movie is 1440x900 but the area where all the important stuff happens in within 1024x768, i am trying to keep the middle in the center regardless of browers size or aspect ratio.

I can center the page but it doesn't work as i need it to. If the browers is small (1024x768) the swf is justified against the left edge, but not keeping the middle in the middle of the brower.

[URL] is an example of exactly what i am trying to achieve.

View 13 Replies

ActionScript 2.0 :: Find MC Center Relative To Edges?

Aug 31, 2010

I don't seem to be able to find the right wording to find my answer anywhere.How do I determine where an MC's center is relative to its edges?I'm developing a tool that a variety of noobs (as if I'm not still a noob) will be using, and I don't trust them to keep art with 0,0 being the top left corner.How do I figure out that the left edge is now at -111px, and the top at -52, and the right at 12, and the bottom at 334?

View 3 Replies

ActionScript 2.0 :: Find Distance Of Mouse To Center Of MC

Sep 17, 2007

I created a movie where I have a circle in the middle and a line drawing from the center out when the mouse moves. I want to calculate the distance from the mouse position to the middle of the circle. What I am going to do is have a sound playing from the center of the ball..The closer you get the louder the sound gets and the further away from the middle the quieter it gets. You can download my fla to see what I have so far.

View 1 Replies

ActionScript 2.0 :: Find Center Of The Visible Area After Drag?

Jul 19, 2009

I have a AS2 movie clip that has a drag navigation. The movie clip is bigger then the visible area. How can I find the center xy of the current visible area when I stop the drag?

View 2 Replies

ActionScript 3.0 :: Find Out Different Circle's Center Point Of A Bitmap?

Dec 6, 2009

How to find out different circle's center point of a bitmap?

just like photo above, how can i locate the 2 center points of circles?

i only know using .getColorBoundsRect to get a point, but this only apply to one circle, in fact i wanna get different points according to the bitmap.

View 1 Replies

ActionScript 3.0 :: Find Center Point Of Mc With Dynamic Scale?

Dec 1, 2010

I'm trying to add some zooming functionality. The problem is that when you zoom in and out, it scales the MC up and down from where the registration point is. This means That when I'm far from the position of the registration point instead of zooming the in straight it also makes it appear as if you are travelling towards the registration point.

To offset this effect I want to calculate the amount of pixels I need to offset the Map by so that it appears as if you are zooming in directly.

So just as a test I've put a little ball inside the map(called "center") which I'm trying to keep in the center of the map.[code]...

View 1 Replies

Movie Can't Find Linked Movie - Path?

Oct 15, 2009

OK, I've spent a few very frustrating hours trying to figure out a solution that's probably staring me in the face. I have one movie (Intro.swf) that loads a second movie (ncjhs_Menus.swf) with drop down menus. Intro has a movie clip with the following script in it:
 
var myLoader:Loader = new Loader(); addChild(myLoader);
var url:URLRequest = new URLRequest("ncjhs_Menus.swf"); myLoader.load(url);
 
Both the Intro .swf and the ncjhs_menus.swf files are saved in a subdirectory called Flash off the root. The html file generated by flash is saved in the root. When done that way the Intro file runs but does not manage to get the menus file to load. If however I save the html file into the same Flash diretcory as the two .swf files then everything works fine and Intro can call the menu .swf file.

View 4 Replies

Center Component In Movie Clip?

Feb 18, 2011

I'm try to build a photo gallery using the flash components SlideShowPro and ThumbGrid. I have put ThumbGrid inside a movie clip called thumbs_mc that slides in and out when you mouse over it to show or hide the thumbs. That part is working, but I would like to have the stage and thumbs_mc resize to the browser width with ThumbGrid centered inside thumbs_mc.

Resize and scaling the stage and movie clips is not a problem, but I can't figure out how to keep ThumbGrid centered inside the containing movie clip. ThumbGrid is a fixed width component, and the only way I can get it to work is to have the mc the same width as the component. Here's the part of the AS that I'm using to control the positioning now:

Code:
thumbs_mc.x = (sw/2) - (thumbs_mc.my_tg.width/2);
thumbs_mc.y = sh-25;

View 7 Replies

Center Flash Movie In Webbrowser?

Jan 13, 2009

I have the setting in flash cs4 set to align ver center and horizontal center but when i publish my movie it appears on the left side , how can i center my flash movie ?

View 2 Replies

Center Movie Element Horizontally?

Sep 9, 2009

How do I horizontally center 1 element in my flash movie, so when the movie resizes it stays in the center.Im guessing Iconvert it to a movie clip,

View 2 Replies

Center Align Movie Clips?

Mar 15, 2009

How to Center Align the movie clips you have in the library when you call them through actionscript?

View 1 Replies

ActionScript 2.0 :: Center A Movieclip In The Movie?

Jul 22, 2006

Is there a way to center a movieclip in the movie? I have my SWF resizing to 100% wide but not height in the html document.Is there a way, maybe with actionscript, that you can cetner the movieclip?

View 2 Replies

Center A Flash Movie Vertically On A Page?

Aug 6, 2009

It used to be so easy to centre a flash movie in the center of a web page, but the days of aligning a movie in the center of a 100% x 100% table are over!

how it is done now a days? I'm guessing it's done using CSS code, but I'm a noob when it comes to CSS.

show me the code they would use to center a flash movie (dimensions 955px by 664px) horizontally and vertically on a web page?

View 2 Replies

When Add Animation To Library, Movie Clip Goes Far From Center?

Jan 10, 2010

when i add my animation to library movie clip goes far from center, why is this happening and how can i fix it?

View 5 Replies

ActionScript 2.0 :: LoadMovie In The Center Of Movie Clip

Mar 31, 2010

(using actionscript 2.0) I have a mc titled 'mc_othersitterimage1' Within 'mc_othersitterimage1' I have one layer with a simple shape that measures 85px x 85px, and I have another layer that has this actionscript on it:

Code:
this.loadMovie(perfectsitterimageURL1);
this._width = 30;
this._height = 30;

('perfectsitterimageURL1' is a variable for an image url. All of the images are NOT the exact same size.) I'd like the image to load in the center of my 85x85 pixel square. I have the registration point in the center of 'mc_othersitterimage1', but it still doesn't seem to work

View 1 Replies

ActionScript 3.0 :: Detecting The Center Of A Movie Clip?

Mar 18, 2009

I am getting some overlap issues when I'm using the hitTestObject function to determine if I am over a particular target area. Is there anyway I can have the center of my movie clip determine if it's over the target area instead of using the whole clip? I am using:

mc.hitTestObject(targeItem);

It is the "mc" that i would like to use the center point instead of the whole movie clip.

View 8 Replies

ActionScript 3.0 :: Make .swf Movie Center On Webpage?

Jun 26, 2011

I have a question, i have created my website and I publish the settings to swf-file and html-file and when I open the html file my website is to the left. But I want my website to be in center of the screen, can anyone tell my how to center the flash file?

View 3 Replies

Professional :: Pate Frames From One Movie To The Center Of Another?

Dec 6, 2011

what i am trying to do is, put a flash frame by frame movie into my flash web site. So i go to the frame by frame movie and hit Edit- Time line - Select all frames. i then hit Edit- Time line - Copy frames. i switch over to my web site, Create a new layer select the layer and hit Edit - Time line - Paste Frames. and the frames i copied are pasted into order and all my symbols are brought into my library. The problem is than when it is pasted its pasted in the upper left hand corner of the page on top of all my other stuff when i select the the frames of the frame by frame movie and move them to the center of the stage.

It seems to work fine but when i test my movie the first frame will be fine and than some stuff goes back to the original pasted spot and some stuff will stay where i moved it to. my question is. How do you paste the frame by frame movie to the center of the stage so it does not have to be moved at all? or else how do i move all frames and objects to where i want them and not just the first frame?

View 1 Replies

ActionScript 3.0 :: Can't Center Movie Clips On Stage

Jan 19, 2009

Im having trouble centering my movie clips on the stage.

I have postioned movie clip holders on the stage and and coded them to be invisible (10 of them). If the images loaded are less than 10, the extra movie clip holders stay invisible and the loaded ones become visible.I am struggling to center the visible movie clip holders.[code]...

View 1 Replies

ActionScript 2.0 :: Center A Loaded Movie To The Object?

Mar 5, 2005

i was wondering if there was a way to center a loaded movie to the object it was loaded in to..using this

loadee.loadMovie("load1.swf");

to load the movie into clip loadee , the clip is located the the center of the main movie, now i want the clip that was loaded into the placeholder clip to be in the center of the movie, instead of the upper left corner of the movie being were the placeholder clip was

// VoS

View 2 Replies

ActionScript 2.0 :: Center A Movie Clip On 100% Stage?

Jan 27, 2006

How i can get a Movieclip centered on a 100% Stage?Stage.align = T; doesnt work :/

and this also not works :/
mc._x = (Stage.width/2)-(mc._width/2);
mc._y = (Stage.height/2)-(mc._height/2);

View 2 Replies

ActionScript 2.0 :: Rotating A Loaded Movie In The Center?

Jan 27, 2006

I have spent hours trying to figure out how i could rotate a loaded movie through the centre axis rather than the set point set by flash in the left corner.

View 1 Replies

ActionScript 2.0 :: Center Movie Can Click / HitTest?

Jun 1, 2006

is there such AS where you can click/hitTest etc. and then it will take you to the next frame but with the whole frame centered?

View 4 Replies

ActionScript 2.0 :: Center A Loaded Movie To The Object?

Mar 5, 2005

i was wondering if there was a way to center a loaded movie to the object it was loaded in to..

using this
loadee.loadMovie("load1.swf");

to load the movie into clip loadee , the clip is located the the center of the main movie, now i want the clip that was loaded into the placeholder clip to be in the center of the movie, instead of the upper left corner of the movie being were the placeholder clip was

View 2 Replies

ActionScript 3.0 :: Scaling And Get The Center Window To Stay In The Center Of The Web Browser Screen

Aug 15, 2009

I have a center window and a background in my flash file. I am trying to get the center window to stay in the center of the web browser screen and get the background to expand and fill the entire web browser screen below center window layer. Sort of like this site [URL] I've currently converted the background to a movie clip and have this code.

[Code]....

View 11 Replies

ActionScript 3.0 :: Center Image/movie Clip On Click?

Oct 23, 2009

i am trying to center the image once clicked, i have multiple images(4) and want them to open dead center on the stage i would also like to close the opened image when the next one opens and return it to original position!

what i have got so far:-
 
stop();port1_mc.doubleClickEnabled=true;
var centerX:uint = stage.stageWidth / 2;var centerY:uint = stage.stageHeight / 2;
port1_mc.addEventListener(MouseEvent.DOUBLE_CLICK, go);
function go(evt:MouseEvent):void{
//opens image to the stage  gotoAndPlay (2);}

View 5 Replies

Professional :: Zoom To Movie Clip And Center On Child?

Jul 20, 2010

I have a movie clip of all counties in the state of Montana (allcnt_mc). Within allcnt_mc there are individual movie clips specific to each county with name equal to the county's name. When clicking on a county, I'd like to zoom to that county and center the stage on it. I've added event listeners to all counties through querying an xml table that has demographic info I am calling into dynamic text boxes. Here is the code I have thus far to load the xml and add the listeners to the county movie clips.
 
//load xml
var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);

[Code]....

View 5 Replies

Professional :: Center Flash Movie In Browser Window?

Jun 28, 2011

how to horizontally center my Flash movie in the web browser window after publishing?
 
A bit of background: I was able to achieve this using <center></center> tags a few years ago. But I have since upgraded to CS5 and I understand that this old method is now obsolete.
 
I have found a few threads/forums that address this, but I know nothing about HTML and these threads don't help me because they assume you have more knowledge than I possess. When opening up the index.html file in Dreamweaver I can't find anything that looks vaguely familiar to what is being discussed. I have found some code samples using <div></div> tags but have no idea where to place it.
 
So I will need it explained to me in a step by step fashion, including which file I need to fix and what program I should use. Code samples will be very welcome if you can tell me exactly where it goes.

View 7 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved