ActionScript 2.0 :: Limiting X_scale/y_scale Of Movieclip?

Jan 2, 2007

I have a question that I would really love answered. I have put script on a button which will scale a movieclip in intervals when pressed by the viewer. My question is if there is a way to tell it to stop at a certain point? Here is the code on the zoom button.

Code:
on (press) {
bigscan1._xscale += 25;

[code].....

View 5 Replies


Similar Posts:


ActionScript 2.0 :: Dynamically Resizing/limiting Width Of A Movieclip?

Sep 23, 2008

I have some rectangles inside a movieclip. All movieclips are created by actionscript. I want to limit the size of the movieclip on top right corner when user starts drag.

Code:
this.holder_mc.onEnterFrame = function() {
this.holder_mc.rectangle_6._xscale = this.holder_mc._xscale-260;

[code].....

View 1 Replies

ActionScript 1/2 :: Limiting The Randomness?

Feb 25, 2011

I have this line of code, it's a part of a code that generates mcs at random X and Y, it worked when I wanted it to spawn everwhere, but now i want to limit the X to 200 - 430 this is the code for spawning on all 640 (1-640) pixels of the movie:

this._x = random(640);

i've tried (200-430) but it acts as 200 minus 430 and I end up with the X being 0 somehow
 
Edit: Never mind, I got it... Here's how: this._x = 200 + random(230);

View 1 Replies

ActionScript 3.0 :: Limiting Characters In A TextField (via XML)

Jul 24, 2009

Is there any way? I thought "maxChars" was promising until I learned it was only for inputting text to a textfield.The XML is coming into a dynamic text box. I need to cut it off at say 500 characters and add an ellipsis.

View 2 Replies

Professional :: Required With Limiting StartDrag()?

Jul 26, 2010

Quite new still to AS3 so if someone can help me out, or point in the right direction,Stage size is set to 750 wide x 440 high and my hi res image is 1500 wide x 880 high. image is called mcImage.The hi res image on the stage that is scaled down to 50% on both X and Y axes.I have a zoom in button, a zoom out button and a reset button. All do pretty much what their name suggests.When you zoom in, it adjusts the Z axes of mcImage to make the image appear larger on the stage. So far so good.I then get the new co-ordinates of X and Y by using the localToGlobal feature and record them in a variable, passing them to the mouse Handler for the dragging of the image.The issue is, whatever I try in startDrag(); does not limit the size of the dragable image, nothing happens, though I am expecting it to allow me to drag the image around within it's boundary!I am sure that the code can be tidied up, but I am still learning a lot about AS3 and trying my hardest.

[Code]...

View 6 Replies

ActionScript 3.0 :: Limiting Movement Distance Of A MC?

Jan 1, 2010

Im trying to create a scrolling image gallery that changes when one hits the button by tweening the images left and right and now I'm trying to find a simple way to limit their movements in AS3.

Currently the images scroll infinitely in either direction. Is there anyway to restrict their movements?

Code:
import fl.transitions.Tween;
import fl.transitions.easing.Regular;
RightArrow_Btn.addEventListener(MouseEvent.CLICK, scrollRight)

[Code]...

View 1 Replies

Actionscript 3.0 :: Limiting The Distance On X Axis?

Jan 4, 2011

example im dragin one mc object. with as3 code, and when im draging i want to do next: now

if(400<mc.x<450) {trace("WIN DUDE XD")}[

how to make that interval ?!

every time when my mc is between 400 and 450 on x axis, to trace Win

View 2 Replies

ActionScript 2.0 :: Limiting Random Movement?

Jun 14, 2006

My knowledge of actionscript is basic, at best. I'm trying to make some animations move randomly by following a very helpful tutorial posted on this site [URL].. And everything was going so well until I tried to use my own initiative to limit the width and height of the movement. This is when I realised that I haven't got a clue what I am doing!

View 10 Replies

ActionScript 3.0 :: Limiting MC Y Coord Movement?

Apr 6, 2010

I have a MC made up of 5 vertical images. I have buttons that control the y value of the MC to move it up and down so that you can scroll through the content. Everything works fine, except that I cannot figure out how to make the MC stop moving when it gets to the last image on either end. I assumed it would be something simple like adding a > or < condition in the button so it would stop working at the extremes, but I can't seem to get it to work.

my website to see what it is I am talking about. [URL].. Click on the "print work" link and you should see the MC and the buttons that control it.

View 3 Replies

ActionScript 2.0 :: Limiting Form Entry To Once A Day?

Oct 24, 2002

I need to limit form data entry to once a day. I have created a login and a PHP script that writes variables to a txt file. However, I want to limit the users ability to enter data to the server date, so that they can only enter in data once per day. For example, a poll that allows a user base to vote once per day. I need to do it using Actionscript, PHP, CGI, or javascript.

View 2 Replies

Flex :: Limiting The Values In An Array Collection?

Jul 28, 2009

I have an array collection that I would like to limit to say 100 items. I tried setting up a filter function where the return was:return (myAC.getItemIndex(item) > 100);but the value was always -1. For whatever reason it couldn't find the item, even though the item is definitely there.I'm able to do this with a while loop:while(myAC.length > 100) myAC.removeItemAt(100);

View 4 Replies

Actionscript 3 :: Limiting The Stage Space Of A Function?

Oct 13, 2011

I want to know how to prevent the user from drawing outside my school board.

My board image sizes 709.15 X 499.5. So I thought of something like this...

if(stage.stageWidth <= 709)

But if my board image is being called as a variable on stage boardActiva it should be easier.

Here's the function that draws:

private function dibujar(e:MouseEvent){
trace(e.localY);
tizaActiva.x = e.stageX;

[Code].....

View 1 Replies

ActionScript 3.0 :: Limiting Display Of Questions Being Pulled In Via XML

May 21, 2010

I was trying to produce an output of an array mixed up and limit the number. how that is done. Now need to incorporate into a quiz application which pulls in data via, XML, displays that, and shows the number of questions. So if 50 questions are in the XML file 50 questions will be displayed in the quiz. What I am trying to do is use the XML file as a question pool and randomly select say 30 questions out of the file to display. no luck so far, but I am making progress!

[Code]....

View 1 Replies

Actionscript 3.0 :: Randomizing XML Randomly And Limiting Display

Apr 20, 2010

I have an Flash CS4 application which pulls in data (questions) via XML and randomizes them. Right now if there is 50 questions in the XML file, 50 questions are displayed and randomized in the application. I am trying to figure out how to limit the randomizing pool so that only 35 questions display(even when the XML file has 50 questions) or something like that. My current code which brings in the file and randomizes is below. The code is written in AS3, by someone else.[code]

View 1 Replies

ActionScript 3.0 :: Limiting A Container To A Certain Number Of Children?

Feb 9, 2009

At one point in my script I'd like to check a MC for the number of children and limit this number to 3. For that I use this script:

Code:
if (container.numChildren > 3){
for (i = container.numChildren; i > 3; i--){
container.removeChild(container.getChildAt(i-1));
popError('Horizontal nur 3 Elemente!');
}
}

This somehow works fine if there are 4 or 5 children in the MovieClip, but as soon as there are 6 or more, it throws an Argument Error #2025 and does not remove anything. BTW it does not make difference if I use container.removeChildAt(i-1);

View 2 Replies

Actionscript 3.0 :: Randomizing XML Questions Randomly And Limiting Display?

May 17, 2010

I have an Flash CS4 application which pulls in data (questions) via XML and randomizes them. Right now if there is 50 questions in the XML file, 50 questions are displayed and randomized in the application. I am trying to figure out how to limit the randomizing pool so that only 35 questions display(even when the XML file has 50 questions) or something like that. My current code which brings in the file and randomizes is below. The code is written in AS3, by someone else. this part of the code pulls in the XML data and randomizes.

Code: Select allpackage  exam {
import flash.net.* //to create URLRequest and load XML  file
import flash.events.* //for Load events

[code]....

View 7 Replies

ActionScript 3.0 :: Limiting Input Text To Unique Characters?

Apr 20, 2011

I already know how to limit my input text to a number of characters, but how would I go about (if possible) making sure characters do not repeat? In other words, I have a ten character input text box and I want you to be able to type pretty much any character but only one of each.

Example:

AFKEIOPCNK

What I'm trying to eliminate is this:

AANHDKDDJI

If that isn't possible, I'd like to instead detect if there are repeated characters so I can just say "that's invalid".

View 2 Replies

Media Server :: Live Stream Bandwidth Limiting?

Dec 12, 2008

I have confirmed this behavior in FMS 3.0.2 on Windows 2003, Vista, and Linux.

In prior versions of FMS if I had a publisher sending a live video feed to the server, then I could have subscribers connect to the server and set a bandwidth limit for them and the server would ensure that the subscribers only got as much bandwidth as I set for them. As of version 3, the server now ignores this limiting for live streams.

You can set a limit on the publisher which of course then limits the live stream that subscribers view, but that is not what I want. I want to have the publisher push a live stream at the quality I specify and then I need a way to give some subscribers a lower bandwidth version of that stream. This all worked fine in prior versions of FMS and I can't imagine this is intended behavior in version 3, but it seems like a major oversight.

The bug can be replicated by creating a simple flash app to stream live video to the server and then in a separate NetConnection, subscribe to that live stream and display it. Then on the server side, setup an application.onConnect to do a setBandwidthLimit on the subscriber and you can see that it is totally ignored. You get the full bandwidth stream even though the limit should be reduced for the subscriber.

View 22 Replies

ActionScript 1/2 :: Limiting Dynamically Embedded Fonts To Certain Characters?

Apr 21, 2009

Since I only need numbers, can I limit dynamically embedded fonts to only numerals, periods, dashes and special characters copied from the character map? 

View 5 Replies

ActionScript 3.0 :: Prevent Scrolling In Textarea Not By Limiting Characters

Jul 2, 2009

I need the ability to create a TextArea entity in a constrained area (i.e., it is located at x and y and is w pixels wide and h pixels high and have that never change.), containing a proportional width font. As such, no 'num char entry limit' strategy is feasible. They need to be able to fill the entire area, and if that means 1,000 period '.' characters, or 200 '#' or "W' characters, then so be it.

The two lines following this one consist of 30 periods followed by 30 Ws.
..............................
WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW

I cannot limit a user to 30 characters. They need to be limited by using a TextArea that will let itself be filled until full, and then refuse further input until space is created by removing existing content. I then need to print that TextArea _as rendered on the user's screen_. Any 'scrolled' lines would be unprintable, and therefore the user's entry must be limited BEFORE any scrolling occurs, or contrariwise, when scrolling occurs, the last entered content would need to be removed and the entity forced to un-scroll. I can program this. It won't be elegant, and in fact will be quite stupid, as any programming where a change event is called with each keystroke or paste and then conditions tested is inefficient, wasteful, and well.

View 3 Replies

Flex :: Security - Limiting Web Service Access To Public

Oct 6, 2009

I have a flex application which collects data entered by the user and posts it off to a web service I have running on a back end server. The flex application does not authenticate users (it's available for anyone to use without setting up an account) and communicates to the web service using HTTPS. There is an XML firewall in place for preventing certain malformed requests, DoS attacks etc and the web service validates all data received from the client.

If I was to sign the content then I could use the XML firewall to verify the signature but I assume that any certificate type data I embed in the client could be extracted out of the flex app through some means of de-compilation. My question is, is there any way of limiting calls to the web service to only those from my flex client? I understand that a user could input bad information but I'm really trying to prevent another client or 'bot'.

View 2 Replies

ActionScript 2.0 :: Limiting And Controlling Mouse Wheel Scroller?

Aug 10, 2009

The code below is currently what I am using to use the middle mouse wheel to control the position of the page... sort of a DIY page scrolling mechanism, luckily I only need up and down ( ._y property)...

ActionScript Code:
mouseListener = new Object();
mouseListener.onMouseWheel = function(delta) {

[code].....

View 4 Replies

ActionScript 2.0 :: XML Adding Thumbnails Tut - Limiting Scroll Boundaries?

Sep 14, 2006

I've been working on Kirupa's adding thumbnails to the XML photo gallery. I've managed to change the scroller to one that is vertical and reposition it to where I wanted it and everything works fine. urrently the code accounts for when the mouse moves (on the horizontal) to the left or right of the thumbnail container to stop scrolling. However when the mouse moves up and down to scroll (on the vertical) it continues to scroll even though the mouse has moved outside the container area. I'd like for it to only scroll when the mouse is within the 30 pixel - hit_left/right boudaries.

Here's the code, as you can see the changes have been very little from the original.

[Code]...

View 1 Replies

ActionScript 2.0 :: [mx2004] Limiting A Rewind Call On The Timeline?

Nov 25, 2006

I am using the following code to perform a rewind on the timeline when a button is pressed:On the REWIND button:

Code:
on(release){
rewState = true;[code].....

My question is, can I limit the rewind feature to just 12 frames at a time? Right now it rewinds back to the beginning, totally skipping all the stop(); commands on the timeline. I've tried for, do, and while loops in various places (one nearly froze my computer up!) with no luck.

update: I've added the following to the code so the user can at least stop the rewinding:

Code:
on(rollOver){
rewState = true;
}[code]....

but the thing moves forward in 12frame intervals.It is wierd having it move in reverse freely like this. So I am still looking for a way to get it to move the timeline backwards in 12 frame intervals...

View 2 Replies

ActionScript 3.0 :: Drag Limiting Mc To Be Dragged Horizontally Or Vertically

Oct 8, 2010

I got a movieclip which should be dragable horizontally and vertically, however it should be "locked" horizontally when dragging vertically as well as the other way around.[code]

View 6 Replies

Flash :: Flex 3 ComboBox Skin, Limiting Text Width

Jun 10, 2010

I've created a ComboBox skin by extending mx.skins.ProgrammaticSkin. It's working fine, except I can't figure out how to limit the width of the text. Is there a way to control this within the skin?

See the attached image for an example of the text going too far. I would like it to stop before the separator line to the left of the down arrow.

View 1 Replies

Flex :: Rich Text Editor - Limiting The Number Of Characters?

Jun 11, 2009

Is there a way to restrict the number of characters in the Flex Rich Text Editor? I guess there should be, since it's possible in a textarea. So, if I could get hold of the textarea contained in the rich text editor, I would be able to do it

View 1 Replies

ActionScript 2.0 :: Limiting The Speed While Browsing A List And Displaying Pictures Accordingly

Sep 7, 2006

In a kind of image browser where navigation is done through keyboard's arrow keys, I get the case where the user keeps the finger pressed on the arrow key. There, the list scroll faster and the screenshot doesn't have time to draw that the next item is already called.

I can see that in that case the CPU goes from an usual 1% when browsing "gently"..to about 20% when leaving the arrow key pressed and raging through the list of images.

I was thinking to:

1) Force the scroll rate to max out at 10 items per second

or

2) Only show pictures if key downs are > 10fps

or

3) Find a function that would wait for the last image to be drawn before continuing in the list.

So, to summarize:

- how to skip drawing pictures if the list is browsed to fast...or

- how to force the script to wait for the current image to be drawn before passing to the next item...or

Here is the script part containing the PNG loader, I've the feeling that this is the place where such a "limiter" should take place:

Code:
MC_loader.loadClip(displayArray[masterindex]".png", "screenshot_mc.screenHolder_mc");
//

[Code]....

View 1 Replies

ActionScript 3.0 :: Limiting Number Of Lines Of Text In Log Style Textfield?

Mar 28, 2009

I have a textfield that acts as a log in that it routinely gets messages added to it. I want to limit the number of lines the textfield can display - that is, if the textfield exceeds a certain amount of lines, the oldest lines that were added are removed and the rest of the lines of text are shifted up. Basically I'm wondering if there is a cleaner way to do this, as my technique seems inefficient:

Code:
const MAX_LOG_LINES:int = 50;
// assuming parameter message is a string that ends in to add a line break.
function addText(message:String):void

[Code]....

View 2 Replies

Actionscript 3 :: Limiting Custom BlendMode Made With PixelBender - How To Merge Images

Oct 7, 2010

i need to mix two images one photo and a placeholder. The idea is that we see the placeholder except where the palceholder has a particular color, in that case the user sees the photo. Something like chroma key.For this purpose i wrote a Pixel Bender shader that acts as a BlendMode. If the background is in the right color output the pixel image otherwhise output the pixel from the placeholder.

<languageVersion : 1.0;>
kernel Crossfade
< namespace : "mynamesp";
vendor : "Artbits snc";

[code]....

Everything works fine except for the fact that i had multiple placeholder, one over the other and my shader don't check the color of its own placeholder but the color of everything under the photo.Is there a way to force BlendMode to consider only a layer or a specific background color ?Is there a smarter way to obtain the same result ?

View 1 Replies







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