ActionScript 2.0 :: Scaling Backgroundimages And The Position Is Also Failed
Jun 26, 2010
im using this scaling script here: [URL] and my problem is that this script only works fine with the bitmap inside the fla (640x width). If i include a bitmap in the same MC with a better/greater resolution, the script doesnt scale the image correct and the position is also failed. i include a image with 1920x1200 and see after export into swf, embedded in HTML and so on only a little part of the big picture.
I have a project which has a background which is a swf that is scalable with the browser.However I do not want anything in the parent SWF to scale and want to position it in the top left of the browser regardless of size. how to do this in AS3 Currently it seems that the parent SWF is scaling everything as a result of a child swf on the stage.
Essentially I want a MC to take it's X position and magically set its x and yscale, so that when it is at an X of 0, it's xscale is 75, when it's at a X of 88, it's xscale is 100, and when it's at a X of 176, its scale is 75 again. But it needs to scale from 75 to 100 and back to 75 smoothly, while it's being moved by another script.
Essentially I want a MC to take it's X position and magically set its x and yscale, so that when it is at an X of 0, it's xscale is 75, when it's at a X of 88, it's xscale is 100, and when it's at a X of 176, its scale is 75 again.But it needs to scale from 75 to 100 and back to 75 smoothly, while it's being moved by another script.
I have a dragable movie clip that on release I want to scale, depending on the mouse position, the further the mouse up the screen (y) then the smaller the clip scales on release.
I'm working on a site right now where the flash player fills the browser window up to 1600x1200 res. The developers I hired are having problems with AS2 when it comes to scaling things and positioning them as the browser window changes size. While it works, the biggest problem is the aspect ratio, keeping the layout looking nice, and the footer keeps dropping off the screen at certain sizes.
Screen res closer to 16:9 looks better laid out than 4:3 and they keep telling me that it has to be proportional when it comes to positioning and scaling, although positions aren't really changing from whatever code they've used. To me, there must be some way so that if looks nice on 16:9, when it goes to 4:3 it will look good too, or even some in between size, they should be able to use code to figure out where things belong, even if it's not perfect. Instead, there are big gaps of dead space on 4:3 and it just looks like crap.
This is also true of background images which fill up about 1/3 of the page on the left or right. As we go down in size they say only a proportionate scale can be used, but sometimes the images are staying too large based on the size of the browser window and should be scaled more. Some of this may be attributed to much of the content being loaded dynamically as the client has us building a CMS, but to me, it's still coordinates and scale when it comes down to it and I don't know why raw percentages must be used instead of some more complex math.
If someone knows how this can be achieved, or can at least point me to web site that has this working properly, I can make sure they investigate further and figure this out before the deadline. I'm adding attachments to illustrate what I'm talking about. I'm using colored blocks to define where dynamic text boxes, icons, footer, images and navigation are. Arrows show where i'd like things to move dynamically.
I have a Flex and Java application and i am using BlazeDS between flex and java. Generally my application works fine. I observed when ever i try fetch data little faster(not giving gap between two fetch commands) then i am getting the error "Server error :faultCode:Channel.Call.Failed faultString:'error' faultDetail:'NetConnection.Call.Failed: HTTP: Failed'"
I guess when ever load is increasing on BlazeDs, i am getting the error. I am calling the java service using following code
I have a flash file (a flash navigation bar actually, which gets loaded in all the webpages inside the website). What I am trying to do is place an external swf file on it in a desired position when the corresponding page is being loaded. I am using FlashVars (variable name -> 'movieName') to pass the name of the movie clips. These variables are read by the navigation swf file and the corresponding swf file should be loaded in the area specified. Now, to create a container, I am using createEmptyMovieClip() method which will host all the external swf files.
The swf files are all being loaded but with a lot of problems. First, no matter what I try, the swf file comes at a fixed place (which is way off from where it is supposed to be). I have tried checking if the container loaded the movie before fixing its position but it changed nothing. Although it did change the position of a weird background colour box I am getting when the movie starts loading - which brings me to the second problem.
A rectangular box flashes once when the external swf is loaded, and its position is being affected by whatever I am setting the _x & _y values of the container movies to. I have no idea why it is happening as it doesn't happen when I test that swf seperately.
I'm building some navigation that extends all the way from left to right across my SWF. When the window resizes, I'd like the nav buttons to get wider but not have the text on the buttons get wider.
The buttons themselves are rectangles with a vertical gradient and a stroke around the outside. I'm using 9-slice scaling so the stroke doesn't scale, but the middle (gradient) gets wider or narrower.What'd be great is to be able to select an object or layer and say "don't scale, even if the rest of this movie clip scales". Is there a way to do that, or will I have to do it via actionscript?
i have a diagonal movieclip that I am trying to scale along with the background video. The background video scales perfect, I am attaching the diagonal movieclip (br in the code as bottomright) with addChild Instead of scaling with the window, it seems to repeat such as the image is displaying. this is the main section of the code that is doing the scaling
var br:mc_bottomright = new mc_bottomright(); addChild(br); //proportional scale if ((stage.stageWidth / stage.stageHeight)> (owidth/oheight))
I am trying to achieve an effect of scaling a movie clip on click...very similar to [URL] When the user clicks on See, Hear, Play and Shop boxes, the boxes expand. I have created a box movieclip that has a bar on top. This bar is a movie clip inside the box movieclip. When i try to scale the main box movieclip, the internal bar movie clip scales as well. How to stop this?
really sorry to bring this one up again. I've managed to create quite good working gallery. What I'm trying to now is create a menu that is attached to the scaling part but does not scale it self - in other words just changes position. here's an example of what I mean: galleru #1
What I'm trying to now is create a menu that is attached to the scaling part but does not scale it self - in other words just changes position. here's an example of what I mean: galleru #1
I added a Menu_mc on my stage. Initially, this should be at the center of the stage and when I click on it, it will tween on the upper left corner of the browser. However, when I resize the browser, the Menu_mc goes back to the center of the screen.
I have tried separating a different actionscript file where it is specifically for initialization of the object and another one for resizing. And then when I call it on my main AS file it goes like this:
Code: // Add the symbols to stage var Menu_mc = new Menu_MC(); addChild(Menu_mc);
I am using a ScrollPane in my application(viz., instance name is: myScrollPane). When I view the contents of the ScrollPane, it shows them perfectly. My issue is: When I try to view data present inside the ScrollPane, if I move the Vertical-ScrollBar of the ScrollPane to middle(or somewhere from top to down) and then click on Submit button(viz., instance name is: submit_btn), then its Vertical ScrollPosition must be reset from middle(or any position where we leave it before) to top(or initial position). Hence, I need to move the Vertical ScrollPosition of ScrollPane to top (or) initial position. Everytime, I need to refresh the VerticalScrollBar Position when I click on the submit button. How to do it?
how to make an actionscript to move punto_mc from current position to random position after release, and then from this new position to mevo to another randon position after release?
I have simple image gallery, where images are placed one next to another and the mask is revealing only one of them. Now I want to tween position of the images, but when I do that the mask is "traveling" alongside with the images..
So I'm trying my hands on some full browser flash and after reading a couple of tuts I wrote this
Code: #include "mc_tween2.as" Stage.scaleMode = "noScale"; stageListener = new Object();[code]...
The trace's are because it didn't work like I thought it would.Etc the middle movieclip didn't center itself but rather positioned itself seemingly how it pleased so I traced its x position and the var stageXcenter position and like suspected it shows different values.
I have a ScrollPane and I want to get and set the scroll bars position (pixel position). For example, if the user changes the scroll bars position and then refreshes the page, we need to take the user at the same point where he was before refresh. For this I need to get the respective scroll bars positions before refresh and then set it to the saved position after load. I have got the positions by hPostion and vPosition but now when I try to save the values back to the same properties after refresh it doent work.
var manTimer:Timer = new Timer(1000,14); manTimer.addEventListener(TimerEvent.TIMER, moveMan); function moveMan(e:TimerEvent):void {[code]....
I just need to make the tween's position relative to it's current position, as opposed to starting at the stage's 0 position then moving the the stage's -40 position. It needs to start at its current position the move -40 from that position.
I'm hoping someone can solve this headache. Basically, I want a movieclip to move to the position of each of my buttons from any position along my x axis. Therefore, the movieclip needs to 'flip' to face the way it is traveling.At the moment I have the movieclip moving to the mouse x axis when I ROLLOVER the button and stop following the mouse when I ROLLOUT but the code won't flip the movieclip so I must have something wrong...
Basically the x position of the mouse should control the play position of a movie. Do I need something like an event handler (I'm not sure exactly what these do, but I've seen similar scripts that seem to use them).
I have an Input Text area that users can edit and then submit. I need to be able to show, on screen, the cursor's current position as they type. I don't need to know where the mouse is but all work-arounds I've found so far can only tell me the mouse position. The font for the text is 'courier' or 'courier new' and the Input Text area is scrollable.
I've run into a new problem, this time with positioning. I've narrowed down the line that's causing it--"block.y = block.y + block.height;" in SetOfBlocks.shiftDown. When I take it out, no problem. But with it in, instead of just dropping each block down by a block height, the affected blocks sometimes move up, and also often move about randomly within the X axis--although their new positions always keep them lined up with the 'grid', which is to say, within multiples of the block height and widths.
I have a sprite that I zoom out using the sprite.z property. Once the z property has been modified the sprite x and Y values do not match the stage x and y real value. So far so good and what I was expecting!
What I want to accomplish is that when the user clicks the stage the sprite tweens to where the mouse was clicked but I don't know what x and y position to send to the sprite. ( since stage 200,200 is something like 400,400 for the sprite depending on z value)
I tried Utils3D.projectVector using Matrix3D of the perspectiveProjection of the stage without success. (i.e. I get Vector3D(Infinity, Infinity, NaN))
I could fallback to scalex/scaley but sprites.z gives me the correct scale, perspective projection, paralax scrolling since I have sprites on different z level all for free. I would have to recode all that.
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.)