ActionScript 2.0 :: Make Loading Pic Load In Centre?

Jun 26, 2008

i want to know how can i centre the position of the image that we load. all these three external images when load are loaded from left top corner.i mean if i resize the images to less width and height they load from top left corner. i want them to load in the centre

View 3 Replies


Similar Posts:


AS3 :: Auto-Centre - MovieClip Always Stays In The Centre Of The Stage On Resize?

Jul 22, 2009

Just a quick one. Using AS3, how would I ensure that a movieClip always stays in the centre of the stage on resize?

View 1 Replies

ActionScript 2.0 :: Loading External Pic In Centre Of Gray Box

Jun 26, 2008

i have three butons on stage and one empty movieclip container which load the external jpg images. i want that those external images should load in the centre of the big grey box. fla file is included what script do i need to include in this

[Code]...

View 3 Replies

ActionScript 1/2 :: Loading Clips Into Loadmovienum - How To Make Load In Background

Apr 11, 2010

I swear that this was working earlier but i must have changed something because now it isnt. I have a few clips that im trying to have load in the background without actually being visible upon initial load. To accomplish this i was going with something like this on the first frame of the main clip:
 
loadMovieNum("dl_illustration.swf",4);_level4._visible = false;
 
I SWEAR this same code was working just fine about 30 mins ago and now ive been playing with some other stuff and its not working anymore- the illustration clip just loads right over top of the main clip, basically ignoring my call for it to be invisible.

View 10 Replies

Actionscript 3 :: Prohibit Users From Loading Swf Files By Flash Loader.load() And Only Allow Loading Images?

Apr 1, 2010

I want to have an AS3 app load images from url supplied by the user. But I don't want a malicious user to be able to load an SWF file in place of the image, such as with an altered extension "maliciousSwf.png". Well, not sure how big a security threat that is above and beyond the ability of the hacker to decompile swf, but I think that ideally such behavior should not be allowed.

So, is there any way to prevent this? When people allow users to load images in their Flash apps, do they somehow guard against loading of SWF? Or is this really absolutely no big deal?

View 1 Replies

ActionScript 2.0 :: Xml - Load The First Image And Keep Loading The Rest With One Loading Time

May 21, 2008

i was creating my portfolio using xml gallery script from this site. the thing is that it loads one picture at a the with a preloader between each load. is there a way to load the first image and keep loading the rest so there will be only one loading time? here is my action script:

[Code]....

View 3 Replies

ActionScript 3.0 :: Get Map Centre Zoom Accordingly?

Oct 23, 2009

I have multiple points on a Google map that i need to pinpoint.How would i find the two points that are farthest away from each other and get my map center an zoom accordingly?[code]Just copy and paste into root time line to test

View 1 Replies

Actionscript 3 :: Loading Lots Of Images And Its Done Asynchronous Which Make Browser To Frees During Loading

Feb 19, 2012

I have typical situation where big loop is loading lots of images and its done asynchronous which make browser to frees during loading and I want to make it synchronous but having big trouble doing it. I found this class synchronous loader and it work great but you cant add mouse event listener to loader. Here is sample code:

[Code]...

View 2 Replies

ActionScript 2.0 :: Gradual Centre On Screen?

Mar 9, 2005

I have seen a couple of flash movies of late that have a nifty element to them, when the user resizes his window the movie slides to the centre or relative position, rather than snapping.THIS SITE is one example of the effect I mean When you resize your window the text moves gradually to a relative position.How is this done? is it via action scripting or through the html/java?It is a nice little touch, I like it. Do you think if you can dictate the position of certain elements you can dictate the size of elements according to window size?

View 9 Replies

ActionScript 2.0 :: Mouse Follow From Centre

Feb 12, 2009

Using this code:

[Code]...

I have a compass that is rotating depending on the position of the mouse, however it rotates it from the top left of the stage not the movie clip, how to get the AS to recognise the centre of the compass.. Also, I thought a nice touch would be if the compass had a slight "wobble"

View 1 Replies

ActionScript 2.0 :: CS3 Use Stage Centre Not Top Left?

Sep 13, 2010

i am struggling to work something out here and am hoping that someone on here can put me right...i have a flash movie that uses a liquid type layout (ie all from top left to fill the stage) - part of the movie is a navigation that when clicked slides around the stage to set positions.the problem is that the nav co-ordinates (points it travels to) are all based around top left of the stage, and i need to make it work from the centre of the stage.this is an example of one slide actions on one of the buttons named CLEAR:

PHP Code:
panel.CLEAR.onRelease = function(){
yTargetMC = 325;

[code].....

View 2 Replies

ActionScript 3.0 :: Centre MC With Browser Zoom

Jul 6, 2011

I have been struggling with the affect the browser zoom level has on my application for days. Finally I built the below test swf and noticed that when user zoom in using the browser zoom (IE 8) the box centering stopped working correctly.Movie with moviclip named box and button named mybtn with three text fields:

[Code]...

View 1 Replies

ActionScript 2.0 :: Stage Centre Not Top Left?

Sep 13, 2010

i am struggling to work something out here and am hoping that someone on here can put me right...i have a flash movie that uses a liquid type layout (ie all from top left to fill the stage) - part of the movie is a navigation that when clicked slides around the stage to set positions. the problem is that the nav co-ordinates (points it travels to) are all based around top left of the stage, and i need to make it work from the centre of the stage.this is an example of one slide actions on one of the buttons named CLEAR:

PHP Code:
panel.CLEAR.onReleasefunction(){
yTargetMC 325;

[code]....

View 2 Replies

ActionScript 2.0 :: Loadclip Won't Centre On Screen

Aug 9, 2007

I have a movie clip symbol on my stage, called 'symbol', i have centred it on the stage using the following.[code]...

View 2 Replies

ActionScript 2.0 :: FMX StartDrag Not Snapping To Centre?

Jul 18, 2003

Is there a way to have the startDrag command not lock to the centre of a MC but to have it snap and drag from a set location, ie _x and _y positions, on a MC.

View 8 Replies

IDE :: Align Centre Xml Loaded Images?

Oct 7, 2009

I 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 Replies

ActionScript 2.0 :: How To Centre An Image Resize

Oct 5, 2004

I'm new to AS and trying to learn new stuff by going through Kirupa's tuts and old threads, I came across this image resize from Best of Kirupa.url..At the moment all loading images as well as frame are resizing with top left corner always in fixed position. I've been trying to amend the existing AS, so both frame and images always stay and do the resizing at horizontal centre of the movie?

View 8 Replies

Internet Explorer 8 - IE8 With Loading FLASH. SWF Loads And Renders Correctly On Initial Load, But On Any Subsequent Refresh It Fails To Load

Mar 7, 2011

I need some help? Anyone experience this problem before with IE8 FLASH bug? Can not get this to work on all subsequent refresh to the flash. I have a flash piece which simply renders only on the first initial load. After that, if i refresh or visit the page, it does not load correctly. It seems I am having this problem with the swf only on subsequent loading of the page or whenever a refresh happens.

View 1 Replies

Alignment - Centre The Number In Relation To The Rectangle Behind It

Oct 6, 2009

thought I'd posted this but clearly not I created a rectangle and in the centre using the text tool places the number 1 try as I might I cannot find an easy way to centre the number in relation to the rectangle behind it. Is there an easy way? tried the alignment tools but failed

View 1 Replies

Alignment - Centre The Two Rows Of Buttons On The Stage

Sep 29, 2009

I've ceated 18 buttons 1-18 on two rows and using the alignment tool made then all gapped the same and in line etc. I now want to centre the two rows of buttons on the stage. I've shift clicked to select all the buttons but no matter what option I pick in window alignment I can't get it to work.

View 2 Replies

ActionScript 3.0 :: Centre Of Map Remains Centered During Map Scale?

Oct 28, 2011

I've created an mc which functions as my map and controls to go with that which allow the map to be moved around and key points navigated to and zoomed in on at varying zoom levels.I'm using scaleX and scaleY to scale the map mc and a list of x and y positions to correctly position the map for each key point. The map mc starts at 1:1 scale ratio with the screen and it's registration point is at 0,0.When I want to go to a certain area I perform this calculation (offsetX and offsetY are the center of the screen and posX and posY are predined offsets on the map):[code]

I now need to implement a zoom in / out function and this is what I'm struggling with. The zoom should use the center of the screen as the reg point for the scale, so I've been trying something along the lines of the following to get the correct x and y position to set after the scale:[code]I know this is wrong but I've shown this to give you an idea of my train of thought, I need to work out what the new x and y will be to ensure that the area that is being zoomed in on, stays in the center of the screen.So in my mind this gets the distance from the current position of the map relative to the center point of the screen (offsetX, offsetY) then scales that distance by the new scale.

View 6 Replies

Flex :: Making Background Image To Centre?

Feb 15, 2011

CustomAppSkin Class

<?xml version="1.0" encoding="utf-8"?>
<s:Skin name="CustomApplicationSkin"
xmlns:fx="http://ns.adobe.com/mxml/2009"

[code].....

View 1 Replies

Actionscript 3 :: Display Centre MovieClip - Flex4?

Mar 6, 2011

How to have that movieClip created to be created at the centre of the screen?

View 1 Replies

Calculate Centre Point Of Rectangle In Flex?

Feb 23, 2012

I have two rectangles: var rect1:Rectangle = new Rectangle(66,147,89,67);

var rect2:Rectangle = new Rectangle(155,147,89,67);

How to calculate the centre point of these rectangles based on their x and y positions. I want the centre point to be calculated with relative to stage

View 2 Replies

ActionScript 3.0 :: Drag & Rotate Movieclip From Centre?

Jan 5, 2012

I'm trying to drag & rotate a planet so it spins around with the mouse -instance name: PlayerThe code works really well but it doesn't seem to rotate around the centre, instead it rotates from the top left corner.I'm quite a noob at as3 so I'm not quite sure where I've gone wrong with my code to be able to fix this. Do I need to specify the dimensions of the stage or the planet? I have altered the Stage from the the default 550 x 400 (if this could be the problem).

ActionScript Code:
import flash.events.MouseEvent;
import flash.events.Event;

[code].....

View 2 Replies

ActionScript 3.0 :: Make The Site Load Faster Is To Load In Swf's Externally

Mar 16, 2011

I'm pretty new/bad at actionscript (3) for web. I have a site up for a client/friend [URL], but it takes FOREVER to load. I'm under the impression that a good way to make the site load faster is to load in swf's externally. Right now, the site, in its entirety, is one big movieclip. I have large images (movieclips) for background images. If you look at the site and are kind enough to wait for it to load (aprox. 45 seconds or so) you will notice how the background image changes when you click to go to each section.

I am trying to find a way to load in the background as external .swf's to cut down on the initial load time. I'm also open to any other ideas. Below is the as3 code for my buttons/how they direct the site. I'm hoping to use a similar/generic style to load the background images. I'm hoping to load the movieclips underneath the rest of the site, and use the same naming scheme (e.g. homeBTN.swf) to keep it organized.

[Code]...

View 3 Replies

ActionScript 2.0 :: Make A Preloader For A Little Flash Project That Involves Re-assembling A Load Of Rectangles To Make Up A Pattern?

Aug 4, 2007

I'm trying to make a preloader for a little flash project that involves re-assembling a load of rectangles to make up a pattern.Idea is that instead of the usual load bar i wanted to make use of this pattern that is relevant to the project and have it rebuild it self with these rectangles flying in from the side. So far I have got the tweening sorted using the tween class and staggered the 42 (yes took a little while, probably an easier way so let me know on that also) rectangles using 'setTimeout' so it releases each 100milliseconds after the one one before it. This probably the wrong way to do it but i wanted to check how it looked and this was the one way i knew how to do it.

I want to make it so that these rectangles fly in a complete the pattern once the loading has finished, but on a fast connection I don't want it to rush the animation but for a slow connection I obviously want it to adjust the release time and maybe even the travel speed to compensate.

I had an idea of maybe working out the percentage loaded divided by 42 and then run an if statement to see if that percentage for that segment had been reached before 100millseconds had passed, if 100 had passed then release the rectangle, if not then hold the rectangle until 100 m/s had passed. Not sure if that is the best way to do but that's why I'm looking for some suggestions from more experienced developers.

Code:
import mx.transitions.Tween;
import mx.transitions.easing.Regular;
// declare variables

[code]....

View 1 Replies

Flash :: Professional - Centre Content In Browser Window?

May 3, 2010

How do I centre my Flash content horizontally in the browser window? In the Publish Settings I see there are options to align the HTML to Default, Left, Right, Top and Bottom, but no Center. Is there a setting somewhere else? Do I need to write some ActionScript to do this? (If so, what?)

View 2 Replies

Actionscript 3 :: Pop Up A Component In Centre Of User's Viewable Area?

Feb 14, 2011

I have an application whose dimensions are larger than the user's screen resolution. Typically, when adding a popup I would call popupManager. addPopup() followed by popupManager.centerPopup(), but this could cause the popup to be added outside of the user's visible area on screen.Is there a way to add a popup in the middle of the user's current viewable area instead?[code]

View 2 Replies

ActionScript 3.0 :: Align Object Centre With Children Random

Jan 6, 2010

I am really confused on how to keep the parent 'canvas' sprite aligned to the centre of the stage with the 'registration point' changing with it's children being added. I am guessing that some calculation of the initial registration point is needed but I just cant work it out

View 1 Replies







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