ActionScript 2.0 :: Get X,y Of Loaded Swf When Swf Is Not Centered?
Apr 13, 2010
I have swf files which have some drawing in its center. When I load these in a container, i can read width and height of the drawing.
I now want to draw a rectangle around this drawing.
The dimensions width and height are correct but the loaded drawing is not at 0,0.
How can I get the actual relative location of the loaded shape?
View 2 Replies
Similar Posts:
Oct 19, 2009
I found out how to load a SWF file on Flash using this code:
var myLoader:Loader = new Loader();addChild(myLoader);var url:URLRequest = new URLRequest("subnoAni.swf"); myLoader.load(url);
The problem is display on top left side.how I can center this on the screem?
View 3 Replies
Sep 24, 2009
I'd like to find out how to know whether an object is centered (its 0,0 coords are on the center point as happens by default to objects which are created on edit time) or left aligned (its 0,0 coords are located on its top left corner, as happens by default to objects which are created dynamically), so that I can apply different actions to it in order to zoom it in/out always from its center point.
View 5 Replies
Oct 19, 2004
is it possible create a pop up window with, as target, a swf file? How? What code I can use for the button that logs the swf pop up centered window?
View 8 Replies
Feb 22, 2003
the new clip grom nelly feat justin really is wicked man! but ehm, my question is following: when i publish my site, i can't get it centered! i tried to change the publish settings, but it wouldn't make
View 3 Replies
Feb 14, 2005
I got a code here which I got from Kirupa which launches a new html window from flash: [code] However, the window is not centered. I know that there is another code introduced by Kirupa which launches a centred pop-up window, but I've already used this code for several files, and was wondering if I could change the code above so that it would open in the centre.
View 1 Replies
Nov 11, 2006
I have a scene of a website dedicated to some pictures, with 8 thumbnails that are linked to different web locations. I found the kirupa's tutorial Launching a Centered Pop-Up Window very suitable to what I want, but there is a problem. Only one link works. When I made the second link, an output error appear
(Scene=nerenovate, Layer=1, Frame=1: Line 1: Mouse events are permitted only for button instances
on (release) {
and the second link doesnt works at all. I think the problem is at the actions layer, but don't know how to solve it.
View 1 Replies
Feb 23, 2007
I can't get my "dock" to center horizontally when i publish the movie for full browser flash(100%/no scale).It works fine when you test the movie. I don't get it. heres the code
Stage.scaleMode = 'noScale';
this.dockActions = function(label) {
switch(label) {
[code]....
View 1 Replies
Nov 15, 2008
I have been using code I recently found on Kirupa called Displaying a Centered Pop-Up Window.I have this feature attached to 6 buttons that pop up windows to different URL's. The window gets stuck on one size and completely ignores my attemps to change to a different size... like it's locked into my first code of 600 x 300. I've tried re-uploading the FLV file, purging internet memory and refreshing but the window size just won't change. Here is the link where I found the [url]...
View 1 Replies
Jul 18, 2010
I have a button on the stage that centers. I have a zoom slider on the stage too. That code is in red.The button moves to x=400, y=200. Once it moves to that point I would like zoom slider to zoom keeping that coordinate in the center of its zooming range. Do I need to add something to zoom code?Here is a view...Click on 39, bluish polygon on map. Then move zoom slider in and out. The 39 is not centered as it Ideally I would like zoom slider to zoom in and out of current centered position regardless of maps position. So that may be the better question.Could this call for onEnterFrame?
Code:
stopAllMCs = function(){
//map_mc.site39_mc.stop();
[code]......
View 1 Replies
Apr 21, 2011
How do I import a .swf so that the entire thing--all 50 frames of it in the case of the animation I'm importing--is centered on the Flash Stage? (I am using CS5). When I import it now it's automatically positioned in the upper left corner of the stage. And when I try to select all frames and align it to the center in the properties manager it will only center one frame of the 50-frame .swf at a time.
View 5 Replies
Aug 15, 2004
i recently did the ol' "make your pop-up centered on screen" tutorial : http:[url].... ,and i got it to work when i made a very very simple site consisting of 1 button. However...when i tried to use the same code in my own personal site, the pop up just won't load. Currently, i have a main timeline that loads an external swf into a clip called "emptyMC". i am applying the button code and the timeline code to my external swf...not my main timline.
View 1 Replies
Mar 9, 2010
I have created a full screen button when you click it full screens OK but when you click on ESC or click on regular screen again it gets chopped up and not centered....here is the link [url]..[code]...
View 2 Replies
Feb 8, 2012
i use on(release){this.loadMovie("myform.swf");}this script to run a another .swf file in .fla file. but its not coming in center why?
View 1 Replies
Sep 1, 2009
I have two labels (A and B) in a Flex VBox, with the horizontal alignment set to "center". I'd like to set A to be vertically centered (in the exact center of the container) and B to be underneath A (or on the bottom; either will do). What's the best way to rig this?
View 3 Replies
Sep 11, 2009
I'm using this code in Flash to popup a window:
on (release) {
var jscommand:String = "window.open('[URL]','win','height=550,width=830,toolbar =no,scrollbars=yes');"; getURL("javascript:" + jscommand + " void(0);");
}
The code is in 10 different buttons, each loading a different content for the same popup window. In Safari, if I click on the parent window and then click on another button, the popup window will come back on top of all other pages automatically, but it does not work with Firefox. In Firefox, the popup window will stay behind the parent window. I'd like for the popup window to be always centered on any screen.
View 1 Replies
Feb 16, 2010
Does anyone know the actionscript to keep the main SWF (which is 800x600) center of the screen in Fullscreen mode, while two other Mc's inside the SWF sit in the bottom left and right corners, like in this site...?
View 0 Replies
Apr 7, 2011
Why when I view my flash files in the flash player or by using Control+Enter or F12, are they never centered so that I can see the whole page at once? Toggling, by first zooming in and then fighting to push and pull it the right way, is not only a pain and frustrating, but it also decreases the quality of the image. I know what it looks like when it's clear, but if I need to send it to someone else who doesn't have the program and only the flash player, they are not going to be able to view the image at it's best. Does the problem have to do with how the image is centered on the stage when I save, the file size, what?
View 2 Replies
Sep 12, 2005
Using the centered pop-up tutorial method seems to only allow one pop up per url.. I need the user to open two, and they cannot replace each other because one is an audio player.
View 3 Replies
Mar 5, 2007
Some flash sites....have the swf centered in the browser...and when you resize the browser...the flash will automatically center itself (easily done by making it centerd)....but how do you make it EASE into the center?
[code]...
But that only centers a Background that you specify with the insance name "wallpaper" ...it doesnt center the actual entire swf or main site...
[url]
that is my test page...i would like it to EASE into the center whenever the wbrowser window is resized
View 3 Replies
Feb 1, 2011
I am having a problem trying to center a movieclip within an externally loaded swf. To test, I placed one instance of the movieclip on the first frame of the timeline on child.swf and centered it and the other is displayed using actionscript. They both align perfectly when I test the swf. The problem is that when I load this swf into another movie (parent.swf) they are no longer aligned with each other. I used this code to align the movieclip in child.swf. It works fine when I open child.swf on it's own but when I load child.swf into parent.swf the movieclips are not aligned.
[Code]...
View 2 Replies
May 13, 2004
I followed a tutorial here on kirupa on how to make a centered pup-up window. I kinda got it working. But when i test the movie out a blank page with the word "object" in the left corner appears behind the photo-gallery I have in the pop-up. When I upploaded it and tried if it would work "on the net" the button that brings up the pop-up does nothing.
View 5 Replies
Oct 19, 2004
is it possible create a pop up window with, as target, a swf file? How? What code I can use for the button that logs the swf pop up centered window?
View 8 Replies
Mar 6, 2010
I have my swf file, how do i set the alignment so its always centered in the browser at the top & in the middle, it keeps going top left corner, also how do make the page always fit to screen size?
View 1 Replies
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
Nov 23, 2009
I am trying to rotate a centered container from it's center. The problem with this code is when I use the rotatePicture method, it doesn't rotate from the center, instead it rotates from the box's top-left corner. Here's the code...
[Code]....
View 3 Replies
Mar 8, 2011
I have a ball bouncing on a paddle. I want the "stage" to move vertically in order to always keep the ball centered.
View 2 Replies
Jan 14, 2010
What I would like is to keep my original movie size (800x600) but have it centered both horizontally and vertically in the browser window. If the user expands the browser window, I'd like it to dynamically center itself both horizontally and vertically in the new window size.There is one that fits what I need, but it doesn't work properly. [URL]The current result when I use this in the HTML file is that everything is enlarged past the window size (and I end up with scroll bars), and the flash item is not centered.
View 5 Replies
Dec 11, 2003
I'm inserting text in a dynamic textbox by using variables. BUT I need a centered link. I know how to use the <p align="center"> and the <a href="asfunction:link"> stuff (I am using asfunction.)
The problem is that the link mouse cursor starts from the beginning of the text line even though there is no text from left to right (because it is centered).
View 1 Replies
May 13, 2004
How to make a centered pupup window. I kinda got it working. But when I test the movie out a blank page with the word "object" in the left corner appears behind the photo-gallery I have in the popup. When I upploaded it and tried if it would work "on the net" the button that brings up the popup does nothing.
View 5 Replies