Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








When I Load A Movie Clip Into A Target It Doesn't Appear In The Center


Hi I really need some help on why the movie clip I load into a target doesn't load in the center. Instead it loades on the bottom right corner!

here is the website http://www.hostultra.com/~dushhhhhh/ Click on the "Home" button. It is supposed to load in the box to the right but is out of place. I know the flash is not nice but my main concern is why it wont load in the center. You can download the .fla's I used which are only very small in the bottom part.

Thanks for your help.




FlashKit > Flash Help > Flash ActionScript
Posted on: 05-05-2002, 06:58 AM


View Complete Forum Thread with Replies

Sponsored Links:

When I Load A Movie Clip Into A Target It Doesn't Appear In The Center
Hi I really need some help on why the movie clip I load into a target doesn't load in the center. Instead it loades on the bottom right corner!

here is the website http://www.hostultra.com/~dushhhhhh/ Click on the "Home" button. It is supposed to load in the box to the right but is out of place. I know the flash is not nice but my main concern is why it wont load in the center. You can download the .fla's I used which are only very small in the bottom part.

Thanks for your help.

View Replies !    View Related
How Do I Target The Center Of A Movie Clip?
I want to have AS determine the pure center of a movie clip, and from there track how far or how close the cursor is. any thoughts, any one?


R

View Replies !    View Related
Load Movie Into Target, Placed Off Center?Help
I am trying to load a movie into a target. But when it loads into the target it put sthe movie in the target off center. The target is the same size as the movie clip, it would be nice to get the loaded movie clip to fit right into the target, but it is loading it down and to the left of it. I don't understand why?

View Replies !    View Related
How To Align Horizontal Center Of An External Image Load Into A Movie Clip?
Hello,

I can now use MovieClipLoader to load an external image into a movie clip of my flash file.

However the position (x, y) of the movie clip is fixed. Since the width of external image may be different. Is it possible to align the movie clip horizontal center in the flash movie?

Thanks and best regards

Alex

View Replies !    View Related
Load A Movie Clip Into A Target
please help...
i have a button in a scroll pane in a movie clip on the main stage, how can i load a movie clip in the library into a target on the main stage by clicking the button. by the way, i have flash mx...

thank you very much!

View Replies !    View Related
Load Movie Clip Target?
Hello,

I am working in Flash Mx and am attempting to return to the program after it has been on the shelf for a bit.

I have a still image as a button, and when the user clicks on this image, it needs to animate. I have a symbol ready for the still button and the animation Say B_reel and M_reel B for button and M for movie.

Is this an "on release, load movie clip into target=this" ? sort of thing?

Thanks in advance for any tips or links to tutorials.

Cheers,

Wes

View Replies !    View Related
Load JPEG And Center To Target?
Hi there,

I am trying to dynamically load images into a "picture frame" which is essentially is an image with a transparent centre to reveal the image.

My question is to accomodate images that are slightly larger than the frame size (so if they dont match the exact aspect ration for example). I am loading images into a target, and therefore always loads the image to the top left 0,0 point of the target. Is there anyway I can then centre the loaded image to this movie clip?

See here for an example, I wish I could recentralise this loaded jpeg, so the middle is aligned and revealed?? Anyone have any ideas?



Thanks for any help in advance.

View Replies !    View Related
MC Center Alignment Doesn't Work When Loaded Movie
Ok, I have a really weird problem. I've followed the tutorials but can't seem to get this simple thing right (am i losing my marbles?!)

Hopefully, someone can help.

My main movie features just a holder MC and some AS. I want to load an intro animation from an external swf which has all the animation based on the main timeline.

I have put this code on my main movie:

Code:

holder_mc._x = Stage.width/2;
holder_mc._y = Stage.height/2;

///////////Center Align Code//////////////////
Stage.align = "TL";
Stage.scaleMode = "noScale";

var stageL:Object = new Object ();
stageL.onResize = function(){
holder_mc._x = Stage.width/2;
holder_mc._y = Stage.height/2;
}

Stage.addListener(stageL);

///////////////////////////////////////////////
_root.holder_mc.unloadMovie();
_root.holder_mc.loadMovie("intro.swf");
_root.holder_mc._quality = "BEST";
stop();


The intro swf is loading fine but it places itself on the bottom right corner of the page. Its almost as though the intro swf has a registration point set to the top left corner but is that actually possible if all the animation was done on the main timeline of that movie??

I hope I am making sense, it's been a long day

View Replies !    View Related
Help Publishing Movie In HTML, But Doesn't Center In Browser Window?
I am publishing my movie in html and swf. Setting are at 800 x 600 and at Center in the other fields under Publish in Flash MX. But the movie is not centered when I view the HTML webpage in the browser window.

Thanks for your help!!

View Replies !    View Related
Preloader Doesn't Work When Movie Assigned To A Target
Hi

I've used the following code for a preloader for all my individual website sections and it works great.

The problem is that the preloader won't work when the movie is assigned to a target in my main movie.

Here's the code:-

total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);
bar.gotoAndStop(percent_done);
ifFrameLoaded ("Scene 2", 30) {
gotoAndPlay ("Scene 2", 1);
}


Once again, this code works fine when tested by itself in a standalone environment, the problem happens when the file is assigned to a target in the parent movie.

I'd really like to fix this without resorting to assigning the file to levels instead of targets.

url for the working standalone preloader:-
http://www.hodes.com.hk/Clients/bhg/test.htm

url for when it's assigned to a target:-
http://www.hodes.com.hk/Clients/bhg/home.htm


Thanks in advance

Sean

View Replies !    View Related
How Do I Center A Text, Graphic, Button, Movie Clip Or Anything In A Flash Movie?
??
And also centering something in a rectangular. Please help.

View Replies !    View Related
Center This &%$#@? Movie Clip
I've been working on this all weekend and am a little frustrated (if you can't tell from the title).

Background - Photographers' web site (mine). I have a floating palate to call up jpgs into a centered movie clip. No problem with that (even though I thought it would be the hard part)

My issue is with the movie clip I'm trying to load the images into. They just won't center, the little buggers. Is it the registration? Do I need to write it into ActionScript? Is it something else?

Attached is the file. What am I doing wrong?

View Replies !    View Related
Movie Clip Center
i have figured out how to get a background image in my flash movie to scale and cover the whole browser window, now i need to figure out how to keep the main content and navigation to stay centered and at a consistent scale like here:

http://www.animallogic.com

see how the nav stays the same size and in the middle ? any tips on this would be helpful. thanks.

View Replies !    View Related
Center A Movie Clip.
Ok... the maths are pretty simple for centering a movie clip on the stage, but here's my problem. I want to mimick Director, ie: the main movie stays the same size in a hairline black box in the center of the screen, no matter how large the resolution is. To do this I need to measure the size of the screen when the movie loads and fullscreens, then position my content movie clip according to that info so that it's central in the screen.

Any ideas? Does Flash have such a function for getting screen size built in?

Cheers,

G

View Replies !    View Related
Load Movie Into The Center?
Hi Guys,
Is there any way to load the movie into the center of the scene?
Thanks in advance,
Khan

View Replies !    View Related
Load Movie Center
i'm sure this has been asked a million times, but how do you load movie so that the center of the movie is aligned with the target's center?
___
| |
| o | <---
|___|
thanks!

View Replies !    View Related
Load Movie Into Target And Tell Target
when i load a movie into target i can effect thie movie with setproperty but not with tell target, is this "normal"?

View Replies !    View Related
Movie Clip Is Off Center In HTML
Hey, i'm still a newbie, so i'm sorry if this seems like a 'dumb' question.

But when I publish my movie clip into html (F12) it shows up 'off' by a pixel. This is what I mean:

I'll have a rectangle, and it will have a white outline, and when I try to match the size of the rectangle to the stage, it will match width just fine, but when i press F12 to publish, the movie clip will only show 3 of the 4 outlines of the rectangle. The right side gets 'chopped off'

here are some links to show you what I mean..

http://www.geocities.com/nics01/Movie1.swf
http://www.geocities.com/nics01/Movie1.fla
http://www.geocities.com/nics01/Movie1.html

I appriciate any help I can get with this.

View Replies !    View Related
[F8] Center Loaded Jpg In Movie Clip
I have a logo.jpg that I am loading in logo_mc . I dont know how to go about having the jpg center in the logo_mc instead of loading in the top left.

View Replies !    View Related
[F8] Xscale Movie Clip From Center?
how on earth can I scale my movie clip from the center easily? I have the following code attached to my button which scales the x and y up 5 when rolled over, but it does it from the upper left corner, not the center of the movie. This has always been a stupid quirk in Flash to me, as I usually would want the movies to default to the center, so how do i go around it?

I have these buttons placed specifically on the stage, thus don't want to dynamically attach them and use some suggested method where I place one clip inside another and use uneccesary math to decipher the center point of the outer clip...I just simply want to tell it to scale from the center rather than the left corner, and changing its orientation point on the stage doesn't do anything. There must be a way to do this though, otherwise how would it know to do it from the upper left corner?

if (_root.portfolio.briars.hitTest(_root._xmouse, _root._ymouse, true)) {

if ((_root.portfolio.briars._xscale<=105) && (_root.portfolio.briars._yscale<=105) ){
_root.portfolio.briars._xscale = _root.portfolio.briars._xscale + 5;
_root.portfolio.briars._yscale = _root.portfolio.briars._yscale + 5;
}
}
else {
_root.portfolio.briars._xscale = 100;
_root.portfolio.briars._yscale = 100;
};

}

View Replies !    View Related
Rotate Movie Clip About Center
I have a movie clip that I want to be able to rotate about it's center. I would like to do this is by grabbing one corner of the movieClip and drag or rotate it.

I created a movieClip and I can drag it but I am not sure how to rotate it about its center.

Any help appreciated.

View Replies !    View Related
Always Center A Movie Clip On Stage
I'm trying to load images into a mc (imageHolder), then center the mc on stage. Everytime a different image loads, image's dimensions are different so imageHolder's _x, _y has to be assigned dynamically... How can i always center the imageHolder on stage..?

View Replies !    View Related
Center A Movie Clip On 100% Stage
Hello Community

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);

Thanks in Advance
Oliver

View Replies !    View Related
Center Movie Clip In Window
Hi there- I realize this is an incredibly stupid question, but I haven't found any information on how to do it so far. I want to center an object in the window. Of, of course I can set _x and _y to a certain pixel value, but I want it to automatically adjust no matter what the size of the window is. This is easy enough; I should just need to take the window's height and width and divide each by two. But what object and property would that be? Thanks!

View Replies !    View Related
Load Library Clip Into Target On Stage
Hi. Wouldn't bother anyone with this but have been at it for hours and am at max frustration level. I'm using Flash CS3. I want to rollOver a button on the stage which will load a movie clip from my library into a movie clip that is currently sitting on the stage.

The desired effect would be comperable to using the loadmovie command and loading an external .swf into a target on the stage. Except in my case I want to load a clip located in my library into the target, instead of having to load an external swf file. Make sense? The objective of doing it this way is I want the loaded clip to sit there on the stage while the cursor mills about. But when the cursor rolls over another button, I would like a different clip in the library to replace the one previously loaded by the first button.

Any suggestions would be greatly appreciated. Please be specific as I tend to get lost easily with this stuff. Thank you in advance.

View Replies !    View Related
How To Load Movie In The Center Of The Main...?
Is there a way to load a movie in the center of the main movie with a script...?

View Replies !    View Related
How Do I Load A Movie To The Center Of The Screen?
Hi Guys,

Running a FS movie with buttons, the buttons loads a 240/180 swf. to level 1. By default it loads to the 0,0, coordinates, I need to load the swf.to 249,92 coordinates.
any help is appreciated.

thanks,

View Replies !    View Related
Load Movie In The Center Position?
hi guys,



i am building a photography site.



i have an editorial section which has thumbnail in it. and

it calls external swf (bigger version of photograph) in it

with ;

on (release) {
gotoAndplay (20)
_parent.aaaa._visible=false;
_parent.photom._visible=false;
_parent.photomm.loadMovie("photos-swf/edi/1.swf");
}

1.swf loads on the desired place, everything is ok.

there is a next button inside "1.swf" that has to call

"2.swf" inside;



on (release) {
loadMovie("photos-swf/edi/2.swf",2);
}


in editorial when i click the next button inside the 1. swf

it calls 2.swf but not at the center of the ditorial. it

puts the swf. left top corner...

plaeasae heeeelppp...

i want 2.swf to load at the center of editorial...

View Replies !    View Related
Load Jpg And Center But Stops The Movie
Hello fellows... it's my first post here and I will try to explaine my problem.

I have a object's instance called "container_01" and this guy is within a movieclip that's change her position and her color when the timeline goes to the frame 1 to frame 60. Until now everything is ok.

In the first frame of the movieclip I put this code bellow to load a external jpg and center the image in the container, because I need the center of the image (not the Top Left) in the origin of the container.

CODE:
var myMCL:MovieClipLoader = new MovieClipLoader();
var mclListen:Object = new Object();
myMCL.addListener(mclListen);
myMCL.loadClip("foto_01.jpg", container_01);
mclListen.onLoadInit = function(container_01:MovieClip) {
container_01._y = 0-(container_01._height/2);
container_01._x = 0-(container_01._width/2);
};

THE PROBLEM IS:
This code works fine but STOPS THE MOVIE CLIP!!! The jpg loads ok, the image is centered ok but de movie stops and don't move and not change the color of the image loaded in the container. The curious is if I comment this guys:
///container_01._y = 0-(container_01._height/2);
///container_01._x = 0-(container_01._width/2);
The movie works fine but don't center my image, WHY???

Well people, sorry my bad english and if somebody can help me I thankyou in advance VERY VERY much!

Best regards...
Urbaxter

View Replies !    View Related
Target Host Movie Clip From Loaded Movie Clip.
Hi all.

I have a movie clip loaded into my main movie. This movie clip is the INTRO of the website. What want is that when this INTRO ends it should tell the main movie to go to the next scene of the movie. I tried _parent.nextScene() but it is not working. Please help me as I need it badly and urgently.

Thanks.

Zee

P.S: Btw this is my first ever post on FlashKit so I hope to have a great time here!

View Replies !    View Related
Target Empty Movie Clip And Movie Clip Frame
I'm loading a random movie, reading in Shared Object data.
If the Loaded movie has been viewed playing it's 2nd frame.
How can I load the movie into an empty movie clip and target its 2nd frame?
Is it just a syntax issue?


Code:
filename = ["flashMovieA.swf", "flashMovieB.swf"];
path = "flash/";
i = filename.length;
k = Math.floor(Math.random()*i);
// get object if none just play
mindSO = SharedObject.getLocal("mindControl");
// Scan the mindSO for values
for (a in mindSO.data) {
trace(a+": "+mindSO.data[a]);
// if previously viewed play second frame
if (mindSO.data.movieName == filename[k]) {
// here is my targeting issue
loadMovie(path+filename[k], movieHolder_mc);
movieHolder_mc.movieName.gotoAndPlay(2);
} else {
// play whole movie
loadMovie(path+filename[k], movieHolder_mc);
setSOData();
}
}

View Replies !    View Related
Moving The Center Of The Movie Clip For A Frame
im making a game and when u shoot the bullet is calculated where it should be by -140 from the center of the movie clip and when the character jumps the movie clip isnt in the middle of his body is there some way to fix it?
for a example go to http://afflicted.netfirms.com/fuzzynew.html <-- press shift then control in mid air and the bullet will appear where it should be when standing...

View Replies !    View Related
Zoom In And Center On An Arbitrary Movie Clip
I am working on a system that uses a floor plan. It gets the information for it from PHP and MySQL. All of that works fine.

What I'd like to be able to do is have the user select an object on the map, and tell it to zoom and center this. I can write the code for the PHP just fine for this. My problem is with the Actionscript.

For the time being, I'd just like to be able to stick into my onClipEvent(load) something that will zoom in and center the movie clip that I specify. From there, I can figure it out.

I've been messing around with the _x and _y positions, but am having no luck.

View Replies !    View Related
How To Center A Loaded Jpeg In A Movie Clip?
Hello fk.
I want to load jpegs in using loadMovie. I have a container or "empty" movie clip that I want to load these jpegs into. The catch is that I want them to be centered in that empty movie clip. Can this be done?

Also, I would like the code to be adaptable. For example. If I make my container movie clip a certain size, say 450 x 450 using an obect like a square at alpha 0, can the code carry over to a container that is 400 x 600. I just don't want to go back and tweek code if I change my design. I wish I new more about functions and the like but I don't. Any insight appreciated.

View Replies !    View Related
Spinning A Movie Clip On Center Axis? (and More)
Hey fellas,

I have a movie clip on the stage, which is a record.

What I want, is for the user to be able to move the mouse over, click down, and spin the record left and right. To confuse matters, I would like to keep the record spinning (tapering to a stop) after they let go and flick the cursor across the screen. So if they hold the mouse down, the record will rotate with the mouse. and perhaps some lag which will be easy enough.

Anyone know how to do this? I also need to set a maximum velocity (?), whereby when it is spun hard enough, an event is triggered.

I guess the most essential thing is to be able to rotate the object, with tapering etc being secondary. I'm told it uses fairly simple pythagoras etc, but i'm yet to even use a simple rotate command.

My teacher did send a good detailed example, but I had a fair bit of difficulty making heads or tails given that there were rotation limits imposed, etc

Any ideas? cheers

View Replies !    View Related
Adjusting The Center Point Of A Movie Clip
This is probably really simple, but I haven`t been able to figure it out.

A lot of times I somehow end up with movie clips where the center point (where the x & y coordinates are 0) is way off. Is there a way to move the center point to the actual center of the clip? Or (with the same result) moving all of the content to the center at once.

Moving the content in each frame one by one is just too much.

View Replies !    View Related
Center Image Within Empty Movie Clip?
Hello, I have been following this tuorial for creating a dynamic photo gallery using xml.

right now, when loaded, the top left hand corner of each image is aligned to the 0,0 coordiante of the empty movieclip. My images vary in size and shape so I would rather that they were aligned centrally to the 0,0 coridinate. is this possible?

I hope I've explained myself ok, any help would be greatly appreciated

Here is the actionscript.


Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
/////////////////////////////////////
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
}
};
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
};
next_btn.onRelease = function() {
nextImage();
};
/////////////////////////////////////
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
desc_txt.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
desc_txt.text = description[0];
picture_num();
}
}
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
}

View Replies !    View Related
Call Movie When The Clip In The Center Of The Screen
Dear All,

I want to creat a movie like this, http://www.actionscript.org/showMovie.php?id=293

I want to make the inside movie clip to play when it is enter the center of the screen, how can I do. Out of the center of the screen, I want to call the inside movie clip to stay in the "Graphic "

The test File at http://www.dreamscale.net/~horaceli/test.fla

Thanks,
Horace


Is it useful to make it:

_root.onEnterFrame = function() {
if (_ymouse < 100) {
// then check if you are already playing the desired animation e.g.
//if (target_mc._currentframe > 10)
// target_mc.gotoAndPlay(1);
} else if (_ymouse > 100 && _ymouse < 200) {
// etc...
}
}

View Replies !    View Related
How To Rotate Movie Clip Round Its Center
just change the _rotation will be rotated round the left top point of this movie clip. how to rotate it rount its center point? thanks!

View Replies !    View Related
Pin Point Movie Clip In Center Of Screen
Hi all, I am pulling in external images via xml and ling them up in a row. I have previous and next buttons that moves the row of images across the screen.

I would like to target the movie clip that is front and center and make it 100% alpha, but the rest of the clips around it to be 25% alpha.

I tried this:

ActionScript Code:
if (imageHolder.x == stage.stageWidth/2) {
   imageHolder.alpha = 100;
}

This does not work. Is there a quick way to pinpoint an object in the center of the stage? Any suggestions on how to do this? Thanks!

View Replies !    View Related
Adjusting The Center Point Of A Movie Clip
This is probably really simple, but I haven`t been able to figure it out.

A lot of times I somehow end up with movie clips where the center point (where the x & y coordinates are 0) is way off. Is there a way to move the center point to the actual center of the clip? Or (with the same result) moving all of the content to the center at once.

Moving the content in each frame one by one is just too much.

View Replies !    View Related
How To Change Center Point Of A Movie Clip
Ok, I'm just getting into some game development. What I'm trying to figure out right now is how to move the rotation point of a movie clip.

The idea behind this is that I'm making an overhead view game. My main character will stay fixed near the bottom of the screen and only face up. the Left and Right keys will be used to rotate his direction - but in reality the ground is what is rotating, since the main character never actually changes positions.

The problem is that when i get away from the center of the ground movie clip, it's more like I'm swinging around the image, because it's rotating the ground movie from the center of the movie clip, rather than my hero's center position. How can i get the rotational point of the ground to always be at the center of my hero character?

View Replies !    View Related
Center Movie Clip In The Stage - ActionScript 3
Hi,

How to make sure that my movie clip is always centered in the stage?

For example if the flash movie is resized, my movie would take the screen width and always be placed in the center,

i think it has something to do with stageWidth, but i am not sure about the correct syntax,

can anyone help?

View Replies !    View Related
How To Center On Stage A Loaded Movie Clip
Hi everybody,

I have the code below, and I am using it to load an external mc. I would like the loaded movie centered on the stage, after it is loaded, but I can't find a way to do it. Could anyone please help me?

Thanks


Code:
var movieLoader:MovieClipLoader=new MovieClipLoader();
var loaderL:Object = new Object();
loaderL.onLoadInit= function(target_mc:MovieClip){
target_mc._x=Stage.width/2 - target_mc._width/2;
}
movieLoader.addListener(loaderL);
movieLoader.loadClip("main.swf", holder_mc);

View Replies !    View Related
Targetclip.movie Clip, What If The Target Clip Is An External .swf
I have a main.swf that loads a menu onto layer 2 as an external .swf.

when a button is pressed on the menu it loads another external .swf file (item1.swf) onto layer 1 so that the menu is infront of it.

when another button is pressed on menu.swf I want another external .swf (item2.swf) to load onto the same layer as the
first(item1.swf).

The thing is if I use loadmovie("item2.swf",1);
the item1.swf movies disappears immediately.

I have used targetclip.loadmovie, but can't get the target clip value. using this.loadmovie, or _root.movie works, but
doesnt leave the menu.

do I need to set up an empty "dummy" movie clip to use as the target to have movies load into that ?

hope that makes sense. Thanks in advance.

View Replies !    View Related
Movie Wont Load On Center Of Page
im having some trouble im trying to get this movie to load on the center of this other movie, looks fine when i do it in flash i export it and move it to my web sever and it gets off centerand every one seem to get it in differnt spots take a look

www.3dattic.com/test.swf

help help me here is the code i was using
//Change "yourFile.swf" to the name of your file.
//Change the 1 to what level you want to load into
loadMovieNum("viewer.swf",1);

//this is a timer that calls the load check function at an
//interval of 100 milliseconds
loadInterval=setInterval(loadCheck,100);

//In this function you will need to change the _level1 to what
//level you are loading into and also change the x y position.
function loadCheck(){
//get the bytes loaded/total data
var BL=_level1.getBytesLoaded();
var BT=_level1.getBytesTotal();
//check if the file is loaded
if(BL>=BT && BL>0){
//if the .swf is loaded then set the x y cords
_level1._y = -150;
_level1._x = -162;
//and clear the timer
clearInterval(loadInterval);
}
}


I found that actionscript ont he forms (thank u it was a big help)thank u Julieanne

View Replies !    View Related
Using Actionscript To Change The Center Point Of A Movie Clip
I have asked this before, but the answer was not exactly what I needed (unfortunately).
I need to be able to move a movie clip by using its "_x" and "_y" properties. But I also need to be able to change the centerpoint of the clip.
Example:
I have a clip that has a box-shaped button in it 100px wide and 50px high. The centerpoint of this clip is at 10,35. By clicking somewhere else on the clip, lets say 26,15, I need to be able to set those coordinates as the centerpoint.
I managed to find a way of doing it, but it doesn't work as planned if i dynamically alter the "_xscale" and "_yscale" of the clip (which i need to do). And the method I used does not alter the centerpoint, it just moves the clip in regards to the 0,0 coordinates of the root. The result is what I wanted, with the glitch that if I change the scale of the clip, the action is no longer accurate.
Please help me out ...

Thanx in advance.

View Replies !    View Related
Change Dinamically Movie-clip Center (or Fake It)
Hi all!

I would like snapping the edges of two figures programmatically, being these next one to another and with different rotation.

My first idea was "changing dinamically the movie clip center", so I would simply snap to one point, then rotating the figure till both would share a common edge.

Here is a graphic sample, so you understand what's going on:

http://homepage.mac.com/julifos/flash/sample.swf

And the related fla file (if you wanna experiment):

http://homepage.mac.com/julifos/flash/sample.fla

Thanks!

View Replies !    View Related
Center Content In Movie Clip Loader Component
Any suggestions? Thanks!!!
I'm trying to center photos inside a movie clip loader class component.
I don't want to center it to the stage..

View Replies !    View Related
Center Content In Movie Clip Loader Component
Any suggestions? Thanks!!!
I'm trying to center photos inside a movie clip loader class component.
I don't want to center it to the stage..

View Replies !    View Related
Easing A Movie Clip To The Center Of The Stage On Resize
hey guys!

Im trying to get a movie clip to ease to the center of the stage on window resize:

onClipEvent(load)
{
targetX = Stage.width / 2;
targetY = Stage.height / 2;
}

onClipEvent(enterFrame)
{
targetX = Stage.width / 2;
targetY = Stage.height / 2;
speed = 5;
this._x = this._x + (this.targetX - this._x) / speed;
this._y = this._y + (this.targetY - this._y) / speed;

For some reason it doesnt center properly???

any ideas?


}

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved