ActionScript 1/2 :: Set Specific Size And Position Of Preloader's Empty Movieclip On Main Stage?
May 1, 2009
it's possible to script an external preloader's empty movie clip to be of a specific size and position on the main stage? here's the script i've got for the preloader so far:
var my_pb:mx.controls.ProgressBar;
my_pb.mode = "manual";
this.createEmptyMovieClip("Portfolio", 999);
var my_mcl:MovieClipLoader = new MovieClipLoader();
[code]....
View 2 Replies
Similar Posts:
Aug 27, 2005
I have a MovieClip and i want to adjust the position on movieClip According to stage size. Means I resize the stage than it will adjust position according stage size. Either I run this swf in browser it should be same.
View 2 Replies
Nov 10, 2003
i want to know how did the creator of otradesign accomplish the effect in his site like the menu and the main contents change size and the menu position according to the size of main contents.
View 5 Replies
Apr 6, 2009
I have two movieclips, 1 with nothing in it, the other has a few movieclips within it(the few movieclps are thumbs).I set a variable leading to the name of the clicked thumb.Then I wanted the set the x position of the empty movieclip to that thumb.I tried empty_mc. height =thumb_mc.variable.height;I get a 'A term is undefined and has no properties' error.
Code:
var whatThumb;
var thumbName;[code].........
View 1 Replies
Feb 12, 2010
The problem is this: I am loading 4 external SWFs into an empty MC on the main stage for each of the 4 projects.So you press a button on the main stage for a project, and it loads that specific SWF.These SWFs contain an opening text for each project, a button to "continue" to the gallery, then the text fades out and the gallery loads.That's all within the SWF itself.The SWFs work fine on their own, but the problem is that when I load the SWFs into the empty MC on the main stage, the "continue" button doesn't work correctly The SWFs load fine, it's just the button At first when I pressed the button it would send my main stage back to the first frame, so I thought it was because the AS for the button in the SWF was probably conflicting with the main stage and confusing it. I went back into the SWFs and tagged part of the SWF timeline with the name "togallery" so that when you click the "continue" button, in theory, Flash knows specifically where to go within the timeline of the SWF and not the timeline of the main stage.
That hasn't worked either. The button just doesn't work at all now, at least not when the SWF has been loaded onto the main stage. Again, it works fine on its own. So what can I do? How can I get a button within an external SWF to reference only it's own timeline and not that of the main stage?
View 1 Replies
Jan 2, 2005
I wrote this AS for my preloader which schould be able to load a movie clip after pressing a specif button in the main sceene:
[Code]....
1) The problem is that to be able to target a movieclip I will need to give it a instance name. Where can i find this function in MX ?
2) I cannot understant how I schoul put a loadBar being a small movieclip on the main timeline, I think( the same timeline the container clip is at ) or maybe not ? well I am bit confused now..
Well I have done already a sceene preloader for my site and it works perfectly and i did not experience any problems as Im having now with this new kind of preloader.
View 2 Replies
Nov 15, 2004
know how I can resize the stage to match the size of an external graphic/movieclip which is loaded into an empty movieclip,
View 3 Replies
Nov 12, 2010
I want to load a user's file to a specific size within the stage then after a user uploads their image and places stickers on it, I want them to be able to save their image including part of the artwork from the stage (ex. a framing element).
View 1 Replies
Dec 9, 2003
I have two movie clips on the main stage: mcNav and mcContent1 (mcContent1 is located in the 2nd frame).
When I click btn1 which is a movie clip within mcNav, I want to go to the 2nd frame on the main stage where mcContent1 is located.
And then go to frame 10 within mcContent1 and stop.
Here's what I have:
btn1.onRelease = function() {
_root.gotoFrame(2).mcContent1.stop(frame 10);
View 2 Replies
Jan 11, 2004
I have a problem with buttons and transitions and it is similar to a problem I had a couple of days ago that I posted and that was sorted out. I have two buttons onstage (they're inside a movie clip) inside the movie, on the button one I have the following
[Code]....
I have similar code on button two and this does indeed make the buttons move into place as required. My problem is this, I need to load in external swf files into an empty movie clip on the main stage called container. These External SWF files have transitions and this is where my problem is. If I place a normal button on the stage it works but not if the button is inside a movie clip and has actions applied as above. The code next is what I have believe should also be placed on the button to make swf transition one load in.
[Code]....
View 4 Replies
Jul 29, 2007
i just recently started programming in flash and so far I have learned a lot, but new questions keep coming up
My problem is that I want to load an external swf in an empty movieclip and then manipulate this loaded swf from my main movie. For example tell it to go to a certain frame. Is such a thing possible?
View 1 Replies
Dec 18, 2007
I have a movie clip within another movie clip and I want one of the objects in the embedded movie clip to end at a particular spot on the main stage.
View 1 Replies
Nov 10, 2011
I'm trying to get SWFs frame size from preloader code. Please take a look at the example:
[SWF(width='640',height='480',backgroundColor='0xFF00FF',frameRate='60')]
[Frame(factoryClass="MyPreloader")]
public class Main extends Sprite
[code]......
View 1 Replies
Apr 1, 2010
How can I refer to an MC that is at a specific position (using frame label) to start playing based on a current event?
View 6 Replies
Jan 3, 2011
figure this out I am using this code inside my nav movieclip to load external movie clips on the main stage
Code:
var Xpos:Number = 110;
var Ypos:Number = 180;
[code].......
View 3 Replies
Nov 3, 2009
lets say i have a sprite on the stage and one movieclip inside it. now i want to tween or just set that movieclip x and/or y position according to stage position. so for example i want to set mc.y = - 100; (by which i mean -100 to stage, not sprite which mc is in.)
View 2 Replies
Feb 27, 2006
i saw a thread while ago .. that always position a movieclip in the middle of the stage even if the stage or window resize any1 can point me to it
View 3 Replies
Jan 1, 2004
I have a looped sound and some components in my main movie (scroll bar) which for some reason is really bogging down my swf and causing the preloader bar not to show up until like 46% or something ridiculous.So I am trying to solve the problem by having a preloader swf as suggested by Kode in this thread. However, now all my targeting is messed up in my main movie. Everything that was _root has to change but I can't tell what to load it into. I tried using _parent, _parent._parent, _root.container_mc (which is a blank movie clip created in the preloader swf that main is loaded into after the preloader is 100%) and others but nothing works. Even the simple looped sound which was originally just _root.backsound.start(0,999) can't be targeted.how to target things on my main stage based on the preloader swf?
View 14 Replies
Apr 6, 2010
The situation is as follows:I'm using Action Script 2.0 --- I'm obligated to in the course I'm attending.I have a main timeline that has 3 frames. On the 2nd frame I have a movieclip named mc_nbr. On the 3rd frame I have a button "voltar" that when pressed I want it to "Go and Stop/Play" at frame 3 of the movieclip (that is embedded on frame 2 of the main timeline).
I used the folowing code for the button btn_voltar:
on (press)
{
[code]......
View 2 Replies
Apr 26, 2004
Can I do this in flash? which is the best way to do it? I have a main mc and I want to duplicate it and then move it in specific area..
View 12 Replies
Nov 15, 2004
Does anyone know how I can resize the stage to match the size of an external graphic/movieclip which is loaded into an empty movieclip
View 3 Replies
Dec 29, 2009
I'm trying to get an object to increase in size the lower it goes down the stage, and decrease in size the high it moves up the stage.
It only needs to increase or decrease by a small amount. Basically, it's for a game character. To ad realism to his movements, it would be nice to have this feature.
This is where i'm up to so far:
Code:
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;
[code]....
I think I need something like:
if (object moves up)
decrease
else if (object moves down)
increase
View 6 Replies
Feb 8, 2011
I cant get this working at all, I have a movieclip that when it gets to frame 22 I want it removed from stage. As it gets to this frame it increases a variable by 100 and when I have it invisible it keeps increasing the variable infinitely which I dont want. How do I completely remove the movieclip from the stage (it starts placed on the stage from my library).
View 1 Replies
Oct 31, 2009
trying to put my moveclip into arrangement as below on stage[code]...........something is wrong with my code and I'm not sure what gone wrong..
View 2 Replies
Mar 12, 2004
I have a menu that appears on the stage with the following function.
[AS]function moveMenu (clip, yPos, speed){
clip.onEnterFrame=function(){
var endPos = yPos-this._y;
this._y += endPos/speed;
}}
moveMenu (menu, 50, 3);[/AS]
Next to the menu I have a movieclip (instance name "square") which I want to appear on the stage from the left, but not before menu (see above) has reached it's final position. How do I integrate this in the above function or should I make a separate function for this
View 8 Replies
Oct 4, 2009
I'm googling this as I speak, but I have a movie clip called intro_mc that plays in frame 1. My introduction(it's a web portal project that will be published to a server at college) is on frame 2. Can anyone help with the AS code that will take me from the played movie clip on 1 to the main page on 2? The movie clip stops at the end.
View 5 Replies
Mar 1, 2011
I'm developing my first flash app. I'm trying to use classes because they'll be very important in my future app. I created a simple movieclip with a star. However, instead of putting it directly on the stage, I'm calling it from library, using the addChild method to place the star in the stage. To do that, I simple right click over the movieclip icon->properties->check export to action script->and I give a name to the class (for example: myMC)
Then, inside the class I wrote:
package {
import flash.display.*;
import flash.events.*;
public class myMC extends MovieClip {
var star:myMC=new myMC();
public function myMC() {
[Code] .....
As I am placing the two variables origin_x and origin_y inside the constructor, I'm expecting to get 250 and 200 respectively. After drop the star, I want to send it to it's original place, and that's why I need to keep this values. And here's the problem, origin_x and origin_y are both ZERO, instead of 250 and 200... The value is not relative to stage. I managed a little bit and I found this post : [URL]. Unfortunately I tried to replace by the suggested code, but both values remain zero. An interesting thing, is that if I put the star directly in the stage instead of calling it from the library as I am doing, I get correct values in origin_x and origin_y.
View 1 Replies
Aug 5, 2011
I have a Flash file for an xml driven menu. There is the document Class, called Main. There is also a Navigation class. In the Navigation class, I position the location of main buttons and sub menu buttons for the menu. I want to position the buttons in the Navigation class relative to the stage. Currently, they are just fixed at certain positions (like 20); To do this, I have read that because this is not happening in the document class.
I must add an event listener to the constructor that listens for the added to stage event. I am not sure how to do this, as when I try and add an event listener for added to stage in the Navigation class nothing happens, (or all menu items diaspear). How to position movie clips relative to the stage (i.e. stage.stageWidth - 50) from a class that is not document class? How to do so in the document class, too.
View 2 Replies
Mar 22, 2012
I have some movieclips like this one: game_mc.substage_mc.rightHand and inside the rightHand i have a thread_mc like this:
game_mc.substage_mc.rightHand.thread_mc
Ok so here is the thing, i need to access the thread.x and thread.y position related to the stage or substage_mc i don´t really care, but if i do this[code]...
View 3 Replies
Dec 5, 2011
how can I do to resize the size of my movieClip and the content of my movieClip(swf, jpg) to the stage?
View 5 Replies