ActionScript 2.0 :: Align Loaded Movieclip?
Feb 24, 2007I have a movieclip that is loaded into a blank MC. I want to align the loaded movieclip (that is loaded into the blank MC) to center on the stage whenever the stage is resized.
View 1 RepliesI have a movieclip that is loaded into a blank MC. I want to align the loaded movieclip (that is loaded into the blank MC) to center on the stage whenever the stage is resized.
View 1 RepliesI just finished reading and building the Photo Gallery using XML and Flash tutorial.Now i was editing it a bit to my desire, but im having trouble with positioning.My external images are all different sizes, and I would like to align them to the horizontal center of my Flash area.[code]
View 3 RepliesThe code is in the first frame of the timeline. I want to center an externally loaded image, but I just can't make it work:
[Code].....
I have created a slideshow, in which image is loaded dynamically from a xml. the issue is the images gets aligned to left ,top position by default. i want it to center align.
View 7 RepliesI have created a slideshow, in which image is loaded dynamically from a xml. the issue is the images gets aligned to left ,top position by default. i want it to center align.
View 7 RepliesI cannot align the loaded swf exactly on top of the main movie? To see it online check here.Note only the about button works for now...also note how the top menu moves when about button is clicked! why is that?? Follow this link to download the FLAs and the other image folders I am using...
View 12 RepliesThis should be relatively simple, except that my entire movie (site) is TopCenter based. I just have one movie clip (some text) that I need to be top Left aligned & I can't figure out how to put it there, especially since it is within an MC that is centered and full-screen (liquid layout). This is my code right now (within terminal MC):
PHP Code:
// initiate postitions and scaling values for objects
//////The below is what I need left-aligned; current values are incorrect:
//_level0.terminal_stage.terminal.terminal_text._x = -440;
//_level0.terminal_stage.terminal.terminal_text._y = -315;
_level0.terminal_stage.terminal.terminal_bg._width = Stage.width;
_level0.terminal_stage.terminal.terminal_bg._height = Stage.height;
[Code] .....
The terminal_text MC should be about 20px from the left edge & 20px from the top edge of the browser...
Here is the problem. I use 100% width and height for my flash, but I also did some JavaScript to create scrollbars if resolution is too low. And there is a problem. I cannot align movieclips anymore. How to get real workspace size of my flash including area outside stage?
View 1 RepliesHow can do align movieclip to stage dynamically. If i use align panel, Movieclip perfectly aligned to stage. Here i have attached sample image.
For the Movieclip the registration point may be change.
I have created this Flash site:
[URL]
Under "Gallery", each picture, is a movieclip, which loads a picture from my server.
But the pictures aligns to the top left corner of the MovieClip. How do i make them align to the center of the movieclip?
My code is as follows:
Code:
holder_mc.loadMovie("../Nordic/images/pic1.jpg");
I'm new to AS 3.0 and I don't get this fluid thing fully. Everything works fine when I want my movieclip to align to the middle of the screen but when I try to make a button (or any movieclip) always align to bottom right I can't figure out how. Here's my AS, how do I make the "ball_mc" align bottom left?
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
stage.addEventListener(Event.RESIZE, resizeListener);
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
[Code] .....
Here's an example of how I want my movieclip to get placed, (like the "fullscreen" button): [URL]
I'm planning to provide the visitors of my website an option to toggle between their normal window and an optional fullscreen window. I just don't know how to align a simple movieclip to the left bottom of my fullscreen window (margin 20px). I can't use static parameters because it has to be adjusted to everyone's personal screen resolution. Does anyone know how to fix this?
View 1 RepliesWhen using the Align tool to align to objects to each other, but not the stage, how does Flash choose which item remains stationary and is aligned to?
View 1 RepliesI'm loading an external swf that is a button to close other loaded movies. I want it to stay above all the other movies at all times so that the user has a way to close them and go back to the main stage. There are buttons on the stage that load external movies and the close button movie loads automatically. All of the movies load in fine but once I load in a movie from a dynamically created movieclip button on the stage, it covers up the close button movie.The following code is where I dynamically load movies from the dynamic movieclip buttons and then after that is where I load in the external swf for the close button.
//Dynamically assign external movies to load from
//the dynamic buttons
for (j=1; j<holderArray.length; j++) {
[code]...
what I'm trying to do is accessingsnapText = scrollPane.source.textSnapshot;from an external swf. I've tried:
trace("-->: "+scrollPane.source.textSnapshot.getText(0, 1000));
trace("-->: "+myLoader.content.textSnapshot.getText(0, 1000));
trace("-->: "+mc.textSnapshot.getText(0, 1000));
[code].....
Im making a movie with a menu that loads movie clips according to which menu is selected simple enough. However, the newly loaded movie clip also needs to allow the user to load another movie into the main movie effectively swapping the first movie clip with the second. This needs to be done without using the main menu.
View 6 Repliesknow how I can resize the stage to match the size of an external graphic/movieclip which is loaded into an empty movieclip,
View 3 RepliesI load an image into a MovieClip. At a second time I want to move this image to another MovieClip.
View 1 RepliesI'm loading an image into a blank_mc within a movieclip called 'background_mc' using the MovieClipLoader object; when the onLoadInit for the MovieClipLoader object is fired, i then attempt to clone my 'backgound_mc' object and the loaded image it contains so i can do something with it (i,e a funky masky/blur thing, not important right now)I'm successfully loading my image into the blank clip within background_mc, the onLoadInit behaviour fires and duplicates background_mc once the image has been loaded, but in a disappointing turn of events, my clone of background_mc no longer has an image attached, and has instead reverted back to it's original form, just as ti was before it had the jpeg image loaded in.
View 3 RepliesThis is something I'm experimenting with, but haven't seemed to figure out... I have several MovieClips, basically the same, only different colors. As each one plays, I'd like it to "overlap" whichever one is already there. Right now I have each button linked to a gotoAndPlay function, but I don't think that will ever get me what I want. You can see how I have it now here: [URL]
Instead of having the content MovieClip go back to all white when a button is clicked, I'd like the preivious one to remain, and get "covered up" by the new one. You continue to see the old color, and the new color overlaps it. I have a feeling I need to use a variable and then addChild, with a removeChild for the old MovieClip after the new MovieClip has loaded, but I'm not getting any good results yet.
hide movieclip A when a loaded swf B overlaps that movieclip? movieclip A = level0. loaded swf B = level1
View 3 RepliesI tried "attaching" a custom context menu on the 'picture' movieclip (empty movieclip that holds externally loaded pics) but with no luck.
View 1 RepliesI'm nesting a SWF inside my movie by so
Code:
var loading:Loader = new Loader();
loading.load(new URLRequest("loading.swf"));
placeholder.addChild(loading);
All is fine and dandy. But I would like playback of the nested swf to be stopped initially. This can be done by putting a 'stop()' call on the swf itself but I would really like to know if it's possible to do this from the parent movie?
I have a bunch of SWFS from a third party tool that I am loading into an MC called "_root.dropzone". I want to be able to tell flash to move to a frame label in my main movie when that loaded MC has played the last frame but I have no idea how to do this. I don't have the FLAs for the swfs otherwise i'd just add code into the last frame. Here's what I am using:
if (_root.dropzone._currentframe == 1521)) {
_root.gotoAndPlay("s_2");
}
This doesn't seem to be working as flash jumps to "s_2" immediately...
im trying to place a loader content (an swf which is an instance of the class "Nav") into a movieclip (so i can easily refer to its variables, for example, width) but when i trace the movieclip it throws null. why ?
Code:
private function doneNav(e:Event):void
{
trace (navLoader.content);// [Object Nav]. fine!
nav = navLoader.content as MovieClip;// null. why??
[Code].....
I have random buttons on the stage that I have set up so each one, when clicked, will load different movieclip.These movieclips load directly on top of each other in the exact same place.The problem I'm having is the previous movieclip does not clear off the stage when the the next button is clicked.I need to set up a condition that will remove the current movieclip when another button is selected to load the next movieclip.Below is part of my code that needs editing. I've been researching switch, else, and other conditional statements but can't figure out how to make this happen.I have the fla or swf file for viewing, let me know.
// Event Listenershempelbtn.addEventListener(MouseEvent.CLICK,btnActions);fourtyonebtn.addEventListener(MouseEvent.CLICK,btnActions);draycottbtn.addEventListener(MouseEvent.CLICK,btnActions);eg
[code].....
I'm loading assets from a swc and I need to loop through every frame of the movieclip and find a certain instance so I can colorize it. Is this possible? It seems that with a swc I loose the ability to control the movieclips playback. It just plays and repeats no matter what I do.
View 4 RepliesIs it possible to read the SWF version of a loaded SWF into a main one?
var mcl:Loader = new Loader();
mcl.contentLoaderInfo.addEventListener (Event.COMPLETE, prepareDisplay(mcl));
mcl.load (new URLRequest ('movie.swf'));
[Code]....
essentially, I'm loading some clips dynamically via xml offstage...they then pan to the center of the screen. Pretty easy, except the files (about 100k+) aren't loading fast enough, and they're showing up halfway through the tweenYes, I know, I need to wait until the clip has loaded...but how? I've tried onLoad(success), getBytesLoaded() ==getBytesTotal() etc...but I can't so much as get the file size of the file at the end of the xml branch. Before I go any farther, here's the code:
button.onPress = function() {
var itsloading = _root.gallcon.gal.attachMovie("loader_circ", "loading", 60);
itsloading._x = 380;
[code]........
I have created this Flash site: [URL] But i am having a problem. Under "Gallery", each picture, is a movieclip, which loads a picture from my server. But the pictures aligns to the top left corner of the MovieClip. How do i make them align to the center of the movieclip?
[Code]...