ActionScript 2.0 :: Preloader - MovieClips Get Strange Coordinates
May 18, 2003
I have a main movie where everything is in the first frame. In that frame external swfs load both into MCs and levels, plus some tweened MCs. All this works perfect without putting in a preloader. I want to have a preloader to this movie but have some minor problems with using one. I put the preloader in the first frame and move the main movie to frame 2 with a stop. The preloader works in that way that when total bytes are loaded it jumps to frame 2. The problem: When the preloader is done the main movie opens but some swfs that are loaded into levels and MCs get strange coordinates. But if I put the main movie in frame 5 and keep 2-4 empty then it works.
View 1 Replies
Similar Posts:
Apr 24, 2011
I've stored a number of x and y coordinates within a 2D array. I would like to use these coordinates to move MovieClip across the stage. I haven't been able to find anything on this all day...
View 3 Replies
May 30, 2010
I am trying to swapping a movie clip with another movie clip keeping the x y coordinates in the same location as the original. This is to be done within a case statement. [code]...
View 1 Replies
Apr 24, 2009
I have a MovieClip ("mc3" that moves dynamically) inside of a MovieClip ("mc2" that moves dynamically) that is on the stage ("stage" that is static). I need to find the value of mc3's x in relation to the stage? I need to make it into a variable. I am trying to do the math, can't figure it out. Also tried localToGlobal and failed.
View 5 Replies
Dec 19, 2011
I was trying to convert global coordinates to local coordinates of a UIComplenent in my flex project using below code using below code
var gp:Point = new Point(e.stageX,e.stageY); //global point
var lp:Point = uic.globalToLocal(gp); //local point
uic is UIComponent in which I have subclass of Sprite for drawing something I have set the sprite's mouseEnabled and mouseChildren to false to not interrupt the mouse event. above code is within uic's mousemove event where I was tracing the gp and lp gp was giving correct value and suprisingly lp was giving negetive values. when I move the move to the top left corner of uic i expect lp to be 0,0 but it is giving the -width of of uic. I broke my head for hours and ended up finding an alternate by using offsets. Infact my original code was much simpler like this which was same issue
var lp:Point = new Point(e.localX,e.localY);
I am not sure what exactly is causing this problem. the workaround had lot of issues and it creating a mess in my rest of the algorithms.Just now I found even more interesting thing (which is actually weird). for some reason I went and create a new lp2
var lp2:Point = new Point(e.localX,e.localY);
now surprisingly it was giving correct values as expected and I went back and changed the code as
var gp:Point = new Point(e.stageX,e.stageY); //global point
var lp:Point = uic.globalToLocal(gp); //local point
var lp2:Point = new Point(e.localX,e.localY);
var lp2:Point = uic.globalToLocal(gp);
now it is expected to have all the lp, lp2 and lp3 variables to be same but weiredly lp two is giving wrong value and lp2 and lp3 were giving correct. I am suspecting using the variable lp has something to do. I am not sure about that but above proves it so right now I am using lp2.
View 1 Replies
May 21, 2007
I was reading the 'Isometric Transformations' tutorial by Danko Kozar and I have a few questions. I understand what all the code does, but not how it does it. First of all, how does the following code work:
transforms x,y,z coordinates into Flash x coordinate
xFla = function (x, y, z) {
// cartesian coordinates[code].....
I understand that it converts 3d coordinates to 2d coordinates, but I don't understand how. What numbers whould be punched into x, y, and z to acquire certain desired effects?Also, what's the difference between moveTo and lineTo:
red line
style(1, "0xFF0000", 100);
plot(0, 0, 0);
draw(200, 0, 0);
View 4 Replies
Feb 2, 2009
I wish to build a preloader with some percentage animated movieclips alongside a percentage text.I post an example of where I am so far. I made two movieclips with things happening every 20 frames up to 100 frames. I wish to turn this into a percentage logic so that the actionscript makes my MC moves to the next 20 frames every 20%. See what I mean?
View 1 Replies
Aug 10, 2009
i am trying to import a swf movieClip to my main stage, but since the swf contains large scale images, a added a preloader to it, the preloader is in each swf, but when i load the swf to the stage of my main movie clip, sometimes it works fine and loads and some other time it doesn't! Beloa is the preLoader that I am using:
[Code]...
View 5 Replies
May 11, 2011
I have a fla that starts with a preloader that works properly. I then addChild a movie and it plays. I would like to have another movie load on a separate upper layer (so you can see the movie below it, like a background) with three different movies that can be advanced by a button. Here is my code so far. It loads the preloader up, then advances to drawing the graph. From here I've been adding a conditional checking to see if the movie is done playing -- playGraph.addEventListener(Event.ENTER_FRAME,check done,false,0,true); was the tip I was given -- but if I use an if statement, it loops over and over
Here's the code. Hopefully it makes sense.
[Code]......
From the addChild I assume that I want to do 'if graph is done playing, start with the first part of the movie', but it gets caught in a loop if I trace 'done'.
View 1 Replies
May 3, 2010
Im making a little app in flash using papervision I want to make a regular movieClip show up in the same place as a papervision object. The coordinates seem like perspective is affecting the number displayed.
View 2 Replies
Jul 1, 2009
I'm having trouble removing some preloader movieclips I have inserted via AS3. The message I get is:
[Code]..
View 5 Replies
Feb 28, 2003
I've been reading a Flash book, and it tries to explain how you can use Action script to create a preloader that will play a movie clips frames based on the amount of bytes loaded. I can't seem to get it to work.
Here is the code:
stop();
myInterval = setInterval(preloader,10);
function preloader() {
if (getBytesLoaded()>=getBytesTotal()) {
play();
clearInterval(myInterval);
} myMovieClip.gotoAndStop(Math.round(_framesloaded/_totalframes*(myMovieClip._totalframes)));
}
This is on the first frame of my movie. I've also have a stop action on the first frame of my movie clip. I've attached the FLA for dissection....ts?
View 2 Replies
Apr 12, 2004
How do I make a preloader if I have only attached movieclips from the library, I know how to make a preloader but not for attached movieclips. The movieclips are attached from level 0 to 12, and I want one preloader to preload all levels at once, how do I do that? Tried with a for loop to loop through all levels but it didn't work.
View 1 Replies
Mar 10, 2008
I'm making a gallery using MovieClipLoader&loadClip. I follwed a tutorial and everything works fine, although the preloader is just plain text. I want a graphic preloader instead, so I imported in the library a gif, turned into a movieClip, and linked it for actionscript, but I can't find a way to attach it to the thumbnails.
This is my thumbnails function:
Code:
function callThumbs() {
_root.createEmptyMovieClip("container_mc",_root.getNextHighestDepth());
container_mc._x = _root.gallery_x;
container_mc._y = _root.gallery_y;
var clipLoader = new MovieClipLoader();
[Code] .....
I've tried creating an empty movieClip and using attachMovie inside onLoadStart & Progress, but nothing shows up. Here's a link so you can see exactly how the actual preloader is [URL]. So basically instead of the percentages as text for each thumbnail I would like to place in a MovieClip with my own loading animation.
View 5 Replies
Apr 12, 2004
I have a little problem, How do I make a preloader if I have only attached movieclips from the library, I know how to make a preloader but not for attached movieclips. The movieclips are attached from level 0 to 12, and I want one preloader to preload all levels at once, how do I do that? , Tried with a for loop to loop through all levels but it didn
View 1 Replies
Aug 18, 2011
How can i speed up the preloader. And where should i place the movieclips and sounds in the timeline. Should i check the export in firstframe or not?
View 13 Replies
Apr 24, 2009
When I'm working on the .fla I don't see anything unexpected, but when I view the .swf or export it there's a little red square in the animation. It moves with some of the stuff I have moving in the animation like they're attached somehow, but I can't find it in the fla to get rid of it.
View 1 Replies
Mar 19, 2009
i've created a movieclip that i'm applying a simple blur filter to and in Flash when i play the timeline it runs with no problems although when i publish the movie the blur doesn't display - i've run out of ideas about why this could be! I've looked online and can't find any suggestions either - does anyone know what i'm doing wrong?
View 1 Replies
Apr 17, 2009
i really like this effect and i was wondering if anybody could point me to a tutorial that does something similar to this: i deleted the link because the site is not working anymore
View 2 Replies
Jun 10, 2009
You click on tv, then on the first thumbnail and the video starts playing.When you resize the browser window the video stays centered.Thats exactly how I want it to
You can see the same example as before, but this time there are playbackcontrols which would be perfect if it wasnt for the fact that if you now resize thbrowser window, the video jumps almost its own width to the left.
View 3 Replies
Mar 31, 2010
I have a website. You can see that website both by typing in(not REALLY my website...I'm just using examples here)This website has a flash intro that at the very end enables the user to either choose to go to the html version of my site or the flash version, each option represented by a button.The strange thing is that if I'm on theURL of my site, everything works ok there. However, if I'm on the version with the "www" added into the URL, those buttons don't work. You still get the little "finger" indicator, but when you press, nothing happens.
View 4 Replies
Jul 7, 2010
I'm working on a large AIR-app. When I run the project from Flash CS4, everything works fine. But when I run the installed app, some buttons will react very slow.
View 7 Replies
Apr 6, 2009
I created a movie clip that i want to act as a button. Inside that movie clip i place 2 graphic symbols (in different layers) that each have a tween of 30 frames. In a different layer i put a stop(); at frames 1 and 30. Then i create a fourth layer writing the following code for all 30 frames:
Code:
var rewind:Timer = new Timer(10);
var rootButton:MovieClip = MovieClip(parent);
rootButton.RR_mc.buttonMode = true;
rewind.addEventListener(TimerEvent.TIMER, rewindHandler);
[Code]...
1. On mouse over the movie clip (RR_mc) start playing normaly untill frame 30 where stops.
2. On mouse out the movie clip starts rewind going frames backwards. Now if i put my mouse over the movie clip, before rewind reach frame 1 the rewind stops and the movie start playing again. 2b. If the movie clip reach frame 1 after rewind, then is not stopping and continues to give frame 1 (if you put a trace(this.currentFrame(); you get infinite 1s). On mouse over the movie clip afterwards i can see that trying to start play but it's progress is max 2-3 frames before the rewind routine pull it back at frame 1.
3. If i transfer the timer and it's function to the parent directory then everything work fine.
I want to write all the code for the button inside the child directory of that button, is it possible?
View 3 Replies
Dec 3, 2010
I've made [at least I'm trying to] a class that will make able to communicate flash with PHP [and MySQL].I've done this once before on the main time line and it worked perfect. This one is working as well but I get strange variables from PHP in Flash. Here are the codes:
[Code]...
View 1 Replies
Sep 23, 2009
I can't figure out why there is a display problem around the "Green Printing" button. Each of the button is created the same way, using the same graphics. Only this one displays incorrectly when the swf is produced.
[URL]
I have quadruple checked position and all the buttons are correct. No overlap. If you right click and zoom in on the button in question, it looks perfect. only at 100% is the display problem visible and only on that button/area of the flash swf.
View 3 Replies
Feb 27, 2011
I am beginner in FLEX programming , I am trying to implement a very simple LOGIN system using PHP, FLEX, MySQL.
protected function button2_clickHandler(event:MouseEvent):void
{
var create_new_user:Users= new Users();[code]..........
I have added the "alert.show" to check the sequence , it was really strange to find out the it is executing "6,5,4,3,2,1"..?? Which mean user is created before checking the verification result?
View 1 Replies
Dec 14, 2011
I need to check (for my own good reasons) whether the cursor is located within the bounds of a particular object. I'm using a simple code to do this...
if(mouseX > hsSlot1.x && mouseX < (hsSlot1.x + hsSlot1.width) && mouseY > hsSlot1.y && mouseY < (hsSlot1.y + hsSlot1.height))
{
//My code
}
This, theoretically, should work perfectly! However, there is an offset (and one I did NOT set, mind you!) of about 16 between the hsSlot1's visual position (where it appears to start on the screen) and hsSlot1.x. There is a similar offset on the y axis, but I haven't measured it yet.The only thing I can think of for this is that hsSlot1 is an instance of a button (one with only one state at that) that was scaled to fit. However, I don't think that is it, because the numbers show that the entire object is merely offset at its current size.
View 2 Replies
Oct 5, 2009
Im trying to put a video in my website and im getting a strange result. on my computer everything is working fine BUT when im trying to run it over the internet its showing me only the skin of the video player but not loading the video. The strange part is when im loading the file stright from the ftp server, its working fine...
View 2 Replies
Mar 15, 2009
I made a spiral in pv3d using a mc for material and added a listener for the mouse events.Now the problem is that when i rollover my mc the rollover tween start and directly start the roll out tween.The clickhandler is rendered useless.So before adding tweenlite to the class everything works fine?
View 2 Replies
May 12, 2009
Code:
base_scale = 70;
my_scale = 1;
scale_mod = 30;
[Code]....
EDIT: In fact, it is working now (behavior changed with updated TweenMax...?!), BUT still, when I zoom with mouseclick, everything goes well. When I zoom with a keypress, the image is resizing... but if the image is not centered, the registration point (set to center of the image) - the image is moving - for no reason...
Different results with the SAME function, no parameters etc.
View 2 Replies