Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Limit Variable



Hello.

Anyone know how to set a limit to a variable number?

Speed = 0;

??limit?? =3;

Thanks



FlashKit > Flash Help > Flash MX
Posted on: 12-10-2002, 09:24 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

What Is Variable Limit?
I'm working on a site for a church's youth ministry and I'm having an issue with a variable that is being brought in via PHP. When the text is loaded into the dynamic text box it ends up being truncated. There's A LOT of text there.

To view the PHP output go to:
http://www.pursuityouth.org/new/eventsall.php

To view the output in flash go here and click on events:
http://www.pursuityouth.org/new

If there is a limit to external variables...how can I accomplish this?

Limit To How Much Dynamic Text In Variable?
I have a movie clip, it contains a dynamic text field. In the actions layer of the movie clip there is this code:

loadVariables("int.txt", this);

The scrollpane then uses this movie clip which contains the dynamic text field.

This loads well, but only a quarter of the txt file is displayed, and then it's blank, although the scroll bar seems to scroll down as if all the text is there...weird, any ideas why this happens?

Thanks, please help I need to get this sorted

Jhem

Limit On Variable Size Passed Into Flash?
I'm building a proof of concept and wanted to know how bulletproof it is.

When it comes down to it, is there a limit of character data passed into a flash file via a GET string.

i.e. movie.swf?variable=lots+and+lots+of+characters


Is the limit based on the player? The server? The browser?

More info:
I have a swf file where I'm creating a single menu item. That single menu item has one submenu with a variable number of link titles/links.

I'm currently serializing the data in a string and passing it in GET style like this:

menu.swf?name=name+of+menu&links=linkTitle1,link1|linkTitle2,link2|linkTitle3,link3

And so on...

So far so good but this data is coming from a feed that might throw a huge number of items at it.

Will this method withstand it?

While I know that SWFObject would probably be a better option for embedding the Flash file and variables, I'd prefer not to do it that way, if at all possible.

Thoughts?

Key Limit
Hello everyone!

I'm learning to code a simple game in flash,and I was trying to figure out how to make it so only one arrow key will function.For example the way it is now is when you press Left and Up it will go diagnol.That is not exactly what I wanted.So basically the way I want it is if you were to press Up it would go up,if while you were holding Up you pressed left the left key would not be functinal. (Up and Left are used only as examples.)

I learned this script on one of the tutorials on this site:

onClipEvent(load){

moveSpeed=10;

}

onClipEvent (enterFrame) {


if (Key.isDown(Key.RIGHT)) {
this._x+=moveSpeed;
} else if (Key.isDown(Key.LEFT)) {
this._x-=moveSpeed;
}


if (Key.isDown(Key.DOWN)) {
this._y+=moveSpeed;
} else if (Key.isDown(Key.UP)) {
this._y-=moveSpeed;
}
}


If someone could help that would be excellent.Thanks!-Hayden

Limit
Hi

|I've a image that zoom in and zoom out and movie it in a movie clip
but i want limit it that dont go to outside movieclip area.

but cant script this limitation.
i program this limit in 1X but in other size cant control


----
Danial

Limit
Hi

|I've a image that zoom in and zoom out and movie it in a movie clip
but i want limit it that dont go to outside movieclip area.

but cant script this limitation.
i program this limit in 1X but in other size cant control


----
Danial

How Do I Limit # Of MCs?
well i have this code

Code:
rand=Math.round(Math.random()*10);
if(rand==1){
duplicateMovieClip("glowdrop", "glowdrop" add x, x);
setProperty("glowdrop" add x, _x, random(550));
x = Number(x)+1;
}
if(rand==2){
duplicateMovieClip("glowdrop2", "glowdrop2" add x, x);
setProperty("glowdrop2" add x, _x, random(550));
x = Number(x)+1;
}
how do i limit the # of movie clips that can appear on the stage at one time?

MC Limit
Hey there!

I'm having a dragable MC inside my main movie, like this:

ActionScript Code:
on(press){startdrag(this);}on(release){stopdrag();}

But I want to set a limit for the drag, let's say my main movie is 300X300 pixels, and I want my MC to be dragable only inside the 300X300 pixels, how do you do this?

How Do I Limit # Of MCs?
well i have this code

Code:
rand=Math.round(Math.random()*10);
if(rand==1){
duplicateMovieClip("glowdrop", "glowdrop" add x, x);
setProperty("glowdrop" add x, _x, random(550));
x = Number(x)+1;
}
if(rand==2){
duplicateMovieClip("glowdrop2", "glowdrop2" add x, x);
setProperty("glowdrop2" add x, _x, random(550));
x = Number(x)+1;
}
how do i limit the # of movie clips that can appear on the stage at one time?

Xpos Limit
I was wondering whether you might be able to help me out with one more thing. I wanted to make a button that controlled the xposition of a target. However, how can i set a limit to the distance that the target can move. For example, I dont want it to move past say 500px. Thanks again.

How Would You Limit A Percent Value?
Hello Flashers allovadaworld
well my problem is to limit to two digit after the point a percent loaded here is the code:

onClipEvent (load) {
total = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
download = _root.getBytesLoaded()/1000 +" Ko télechargés";
bytesleft = _root.getBytesTotal()/1000-_root.getBytesLoaded()/1000+" Ko restants";
percent = _root.getBytesLoaded()/_root.getBytesTotal()*100+"% pourcentage achevé";
if (percent == "100%") {
_root.gotoAndPlay(23);
}
}

this displays me the following as output (for the percent part of course):

20.32113538495 %
So what should I add to limit the output to two digit (20.32%) or even no digit at all after the comma

Flashly yours

AttachMovie Limit?
Greetings:
I am having a heck of a headache with an apparent limit to attachMovie. I have a number of symbols (gallery items) that I have limked in the library for export, these symbols (MCs) have a 12 cell alpha fadein and a stop. My corresponding buttons attach these to an instanced MC which I named screen01. As I wanted to have a "cross-fade" and not a flashing replace effect I created a variable 'num' for the level and in each button on press I changed the variable num=num+1 then on release I attached; screen01.attachMovie("linkname", "newlinkname", num) so the fade is soft and on top of the old level. It works great.....for 9 transitions and on the 10th nothing happens. I have almost 40 items. I am sure it's something simple like setting a variable to accept 2 digits or something else, but I thought I had done it and now, while not quite square one, I have been set back again.

Any help is most appreciated either to solve this scenario or if there's a better solution, I would love to know
thanx
-Raystarjet

Limit Y Axis
After a too long of a break I'm trying to learn Flash all over again.

Here's a run down of what's what. Movie height of 200 with a dragable MC that has a height of 250. At the start the y axis of the clip is -25.

This is the code I'm using for moving the clip up and down

y = getProperty("/hidden", _y);
offset_y = (start_y+y)/16;
cur_y1 = getProperty("/movie1", _y);
setProperty ("/movie1", _y, Number(cur_y1)+Number(offset_y));

I want the clip to movie either up till the y axis = -50 then go no higher or have the movie go down until the y axis = 0 then go no lower.

I've been looking for the answer for a while and have tried a half a dozen things with some funny results and I'm sure it's an easy thing.

Can anyone please point me into which scripting commands I need to look at to learn how to do this?

How Can I Limit _x Movement.....
As stated, how can I limit the movement of this sample navigation so that it doesn't completely leave the screen?
http://www.roberttruex.com/misc/slid...dsensitive.swf
Any help is greatly appreciated!

ROBT

Limit Of LoadMovie K?
I have a Flash movie that loads about 10meg worth of files.. It starts to slow down at about the 6meg mark - is there a max limit to how much K one Flash MX movie can take in and use?
Has anyone else encountered problems when using LoadMovie from a server and it take a while just to get it to acknowledge that it's supposed to be loading a file? (Goes from -1 to full K almost instantly)

Thanks
-><|TheMadFlasher|><-

Limit Their Options
You know when you visit some websites and when you right click the .swf file, you can only see the one or two options instead of the whole list of play options?

Well I was wondering how to accomplish that. Any help would be greatly appreciated.

Thnx for you time and advice.

How Many The Limit Of Frames I Can Use ?
I record the live view and save it into server.
It was record a .flv file.
I'm going to import the file into the .swf file.
How many the limit of frames I can use or
how long did I record the live view?

Any help would be greatly appreciated.
Thanks in advance.

Best regards,

softip

Max Frame Limit
OK - I've looked at all the other posts about max frame in flash, and they all say 16,000. But here is my question...

Is that 16,000 frames for the entire .fla file (adding up all the frames that are in the child mc timelines and other symbols)

OR

Is that 16,000 frames per timeline?

My main timeline is only 200 frames, but I'm afraid that if I add up all my frames from movieclips that are played from that timeline, it will be near the magic 16,000 ceiling.

Follow me?

Frame Limit?
First off, I'm really sorry if this has been posted before. The search function kept returning 404, and this is sort of urgent.

Is there a limit to the ammount of frames you can have in flash? I've got quite a big (~21,000 frames) animation project very close to completion and once it gets to scene 10, the animation stops. You can still hear the sounds, but no animation. I have checked for random "stop" keyframes and things like that, as well as tested the video on several different computers. The problem follows the file from SWF, to EXE to HQX. Any ideas?

Scene Or MC Limit?
For some reason, this scene I just put in.. things just aren't working right. My hittests just aren't working. Everything is exactly the same. I've actually recreated the scene a few times.

It's really weird...

Time Limit
I am trying to develop a quiz where the player has a limited time to answer the question before it moves on to the next one. My problem is that I do not know how to make the next mc load after the defined time has passed. Is this an actionscript task, or do I need something else like javascript? Can anyone please help me. This project is soon due and I am a stress case!!!

Limit Randoms
i need help with my script:
where on rollovers the object changes to a random colour.. however my stage is black and sometimes the object may change to black or a dark enough colour where the object is no visible.
i want to limmit this so that the object never turns too dark that is will not be visible
here is my script but it won't work correctly.

on (rollOver) {
this.stop();
objcolor = new Color(_root);
objcolortransform = new Object();
objcolortransform.ra = random(100);
objcolortransform.rb = random(255);
objcolortransform.ga = random(100);
objcolortransform.gb = random(255);
objcolortransform.ba = random(50);
objcolortransform.bb = random(150);
objcolortransform.aa = random(100);
objcolortransform.ab = random(0);
objcolor.setTransform(objcolorTransform);
if (objcolortransform<={rb:-150, gb:-150, bb:-150}) {
} else {(objcolortransform.rb=100, objcolortransform.gb=150, objcolortransform.bb=10) }
}

Frame Limit
I've reached the framelimit of 16000 in Flash.

I am making a presentation and I want to make it so that when there is no activity for 20 seconds the presentation goes back to the beginning. I achieved this by inserting frames but now I don't have enough frames left.

Is there a way to make some kind of timer in actionscript that can do the same thing? So, when there is no user input for 20 seconds the movie skips back to the beginning?

hope someone can help me out with this

Frame Limit
is there a "frame limit" ? cause im at 16000, and it just stops for no reason.

Asfunction Limit
OK, I've spent a week building something based around the asfunction function just to come to the realization that it has a 127 character limit. I'm passing PHP variables through it and if there isn't a workaround I've wasted a week of my life....

Does anyone know of a workaround???

MC Size Limit?
I a working in MX. I have a Movie Clip full of text that is 3000px tall. I am scrolling it with two buttons. That all works fine. The problem is, not all of the MC is showing up in the published SWF. It shows up in the scene in flash. Is there a max height that a movie clip can not exceed.

Flash + Xml : The Limit
hi everybody
we are ok now that flash can't create file
but when i've an empty xml file can i add to it nodes from flash (using my_xml.appendChild)?? :
i want to save the position and names of all shapes in a flash movie to an xml file to load them later from this xml file

Limit To Else If? What The Hell Is Going On Here?
Is there some kind of limit to the amount of Else Ifs that you can use? This is making no logical sense to me.

I have a 'if else' statement that works absolutely fine until I add a 7th 'else if'. The 7th 'else if' is formatted exactly the same as the other 6.

Another question : How to you copy and paste code into these forum so that it keeps its formatting. I've seen others do it in a seperate blue box.

Thanks
David

How To Limit A Movieclip
ok first of all I'm using Flash MX2004

now lets talk about my problem...

I build some Portfolio file for my main movie file..
I made a Long MC Called "Tumbs" thats sit inside "TubmsMC" i use some trick with button that call MC script to make the "Tumbs" MC to slide inside "TumbsMC" Mask and see Each of 3 part it has inside.

ok now i've got the problem!!
the "Tumbs" MC slide good inside "TumbsMC" mask but!...i want the button to ignore the script call if the "Tubms" location is in the edge of the visual part.. in this case its the left part.

but i cant get it! how i dont it?

i wrote something like this in the button Action:

on (release) {
if (_root.tumbsMC.tumbs._x != -205.7) {
with (left_script) {
gotoAndPlay(2);
}
}
i checked the _x location in the Properties window of flash after moving in with the mouse to the edge location..
BUT IT DIDN'T WORK!

how can i set limit point for the script?!
i need to set Left Middle and Right points of stop to write the script like i want it to be..
in normal words i want it to be like this:

first i set some var called "State" i set it "middle" because this is my start point..

then when i press the right_button i check the state only if the state is middle of left you can move right because if you move right when its in right it will be empty (the edge of the MC visual)

then movie it 400px in the loop its something like move 20px for 20times

then my problem again..
if _x location is ?!?! set state to middle
if _x location is ?!?! set state to right
if _x location is ?!?! set state to left

i'm sorry its that long post i just want it to be clear for you =)

THANKS A LOT this forum is very very helpfull!!
Macpire

Recursion Limit
Hi, i want to know how to disable the 256 recursion limit that flash has. I created a recursive function that requires more than 256 recursion calls. What can I do?

Scene Limit?
Is there a limit to the # of scenes a movie can have?
The movie im making now relies heavly on scenes.

Ammo Limit
im making a first person shooter. i want to limit the ammo. how would i do it???
and how would i make it so the player be able to change weapons???



thanks,
bobet

Anyone Know How To Limit A _yscale? With AS
I have a movieClip that changes _yscale onEnterFrame.
I would like to put a Limit on how far it can scale.
let's say a _yscale of 300 pixels is the target limit

here's my current code:
code: onClipEvent (enterFrame) {
_yscale = _root.gAmpLeft5*10+Math.random()*50;
}

"gAmpLeft5" is a variable that changes onEnterFrame
and it's a number

Limit On LoadMovie Url Is 247?
Does anyone know if there is a work around for this? I'm only concerned about targeting local files.

Swf Problems... Is There A Limit?
Here is the deal... I am making a navigation that is very simple in flash 8. 12 words of text saved as png's with transparencies, each word has a button layer over it. Each of these sets (button / word) is set as it's own movie clip with all the actionscripting and frame labels that make the rollover work (simple color fade in / out). The problem I am having is this: Each of the words is a png with transparency exported from photoshop. Up to 11 words, everything is fine. However when I add the 12th word, one of the other words will disappear from the movie on preload / export. I have noticed this before in other instances, where transparent png,s overlap, some parts will simply disappear. Is there a limit to the number of overlaps you can have? Am I doing something wrong? Someone please help!

Is There A Limit To The Size Of XML?
Hi,

I am finding a strange limit to an XML file I am using in Flash 8.
The XML file is 10.3K which has 32 items in the structure.

Here is one item:

<videos>
<catagory>
<feature>
<height1>240</height1>
<width1>360</width1>
<height2>120</height2>
<width2>160</width2>
<image>thumbnails/annie1.jpg</image>
<link1>videos/annie_bortz360_3256K_Stream.flv</link1>
<link2>videos/annie_bortz160_356K_Dial_Up_Stream.flv</link2>
<text>A testimonial from Annie Bortz</text>
</feature>
</catagory>
</videos>


When I increase the XML file to over 22 features The Flash routine
doesn't quit but just doesn't see them and when I do a trace on the length,

_global.totalSubC = topNode.firstChild.childNodes.length;

It reports 22 even when there are over 22 features in the file.

I have gone over the XML file for hidden characters but there are none.

Is there a limit to parsing XML in Flash?

Best regards
Toby

[F8] Limit Scroller
I have a issue with my scroll arrows. When dragging the scroll bar is stops at the initial X and Y. When using the up/down arrows, it ignores that boundary. How would you set that limit?

Thank you in advance.


Code:
scroller_mc.onEnterFrame = function() {
current=((this._y - initialY)/scrollLength*maxScroll);
news_txt.scroll = current+1;
}

scroller_mc.onPress = function() { this.startDrag(false, initialX ,initialY, initialX, endY); }
scroller_mc.onRelease = function() { stopDrag(); }
scroller_mc.onReleaseOutside = function() { stopDrag(); }

up_mc.scroll = function() {
this._parent.scroller_mc._y--;
}

up_mc.onPress = function(){
this.int_down = setInterval(this, "scroll", 0);
}

up_mc.onRelease = up_mc.onReleaseOutside = function(){
clearInterval(this.int_down);
}

Memory Limit?
Is there a maximum amount of memory that Flash is allowed to allocate to the Flash 9 player?

I have a site that is loading quite a few high res images at one time, and I am getting some weird problems after maybe 10 or so are loaded. Things just seem to STOP working. But if I substitute the images with lower res versions, it works fine and smooth.

Also, it's not normal garbage collection since the bitmaps all have references in an Array, so they're not being collected. I think they are being discarded because there is too much memory being used.

Can someone point me to a possible limit on how much memory can be used at one time?

Thanks a bunch!

[CS3] Limit _height
Hello,

I am 95% through my project and have hit a snag. My .fla incorporates _xscale and _yscale on a button to scale a movie clip. It's a simple code that scales up and down - to infinity it seems. My client wants me to limit the scale to no more than 200% or 800 pixels. I thought a simple fix would accomplish this, but it appears that I am not correct.

I would really appreciate a pointer in the right direction-and/or why I can't use what I am using.

Below is my code.

Thank you for your time in advance.


PHP Code:



stop();

var middle:Number = Stage.width/2;
var middle2:Number = Stage.height/2;

//centers image//

zoomOut_mc.onPress = function ()
{

chair._x = middle;
chair._y = middle2;
chair._xscale *= .9
chair._yscale *= .9
}

zoomIn_mc.onPress = function ()
{
    
chair._x = middle;
chair._y = middle2;
chair._xscale *= 1.1
chair._yscale *= 1.1
}


chair.onEnterFrame()
{
if(chair._height > 800) {zoomIn_mc.enabled = false();
}

}

How To Limit FPS And Release CPU
How can I free CPU for a predefined period of time ?

I want to measure the time of drawing a single frame using getTimer(),
and than to suspend the SWF from using the CPU for a predefined period.

For example:
If the CPU can draw a frame in 0.01 seconds,
and I want a frame rate of 10 FPS,
I will draw a frame, than sleep 0.09 etc.

_visible. Is There A Limit?
Hi

How does _visible work? Is the mc still loaded into memory?

Basically I was going to use this method for a problem I had, but I might have up to 20 or more INvisible clips on the stage, I'm guessing this will effect performance?

Limit Loops
Is there a way to create a frame script that checks to see how many times it had been played and once it reaches a predefined amount, stops the movie?

Guess there is, it's just I don't know where to look/start!

Limit The Dragging
Hi,

I am trying to create a custom slider. It is working fine. problem is at the time of dragging if cursor goes outside the slider it still works. How do I prevent this?



Thanks.

Getting Around 16,000 Frame Limit
I am creating a training CD using Flash MX. I am way over the 16,000 frame limit. I had created about 80 scenes. I need to figure out how I can organize this information so that it will all play (it stops in the SWF once it hits the 16,001 frame). My thought is that I can take various sections of content and create multiple swf files. I can get my scripting to work though. I'm trying to make a button press play the imported swf file. I simply made the swf and then imported it into the library. My code is:

on (press) {
overview_scenes.gotoAndPlay("1");
//End Behavior

}

How To Limit Bandwith
hI,
how can i limit the bandwith of a vhost or entire server to reduce bandiwth?
I don't know what file e what tag to modify

Layer Limit/Bug?
I'm using Flash MX

I've reached Layer 39 within a movieclip within my flash movie.
On this layer(39) and others, I have a hidden graphic ( alpha at 0) that fades in (to a alpha of 100) on a rollover command.

The problem is....where ever this hidden graphic is place on the stage in layer (39), there's a square blank box the color of my movie background

If I delete layer 39, along with graphic,the blank box goes away.
I've replaced clips,pics,and graphics.
I've debugged the movie as well and the box still appears if I make a layer 39.

If anyone has had a similar problem or knows what's up ..Your help is appreciated

Peace

Frame Limit?
Hi there

I'm working on a rather large file in flash MX (more than 5000 frames in one scene, total .fla size 248,3 Mb, total .swf size 90,1).

in my big scene there a slideshow and when i export the whole fila as an .swf that slide show keeps stopping at frame 2575. using links I can get past that perticular frame yet my scene won't play further. strangely enough the play normal when I test the scene.
I've checked for stops etc in my timeline and changed the image(witch is on a button) on that frame, hell i even changed the scipt on that button by copying a script from another image that is playing.

So are there any time, frame, size limits in flash MX for Mac OSX???

This thing is driving me crazy.

PROXY (is That The Limit?)
Hi!

I´m wondering about PROXY servers...

I searched for articles about how to pass through a proxy server,
but it looks like macromedia didn´t already find a good solution
for that.

The stuff called: HTML TUNNELING doesn´t seen to work as it promise.

Anybody knows if I´m wrong in that point?

ISN´T THERE A WAY TO PASS THROUGH A PROXY?

Thanx!

Zerooito

16,000 Frame Limit
I'm making a large flash movie, and I know that Flash supports a 16,000 frame limit. Is there any way of knowing how much total frames my swf file contains.

_root._totalframes only gives me the total frames for the main timeline, but I need the total frames for all embedded movie clips of the swf file.

And, is this determined upon export, or does it count up the frame on run-time.

Say it does the frame count on run-time; if I had a small movie clip that loops repeatedly, does it incrementally add up the frames in every loop cycle of that movie clip.

After a test where I threw in some 'dummy' frames, but skipped all of them with a 'gotoAndPlay', the movie froze awhile into it, so I'm guessing its determining the frame count upon export (since it never did a running count on those frame upon run-time), but I'm not sure.

Sorry, for all the question, but any help is appreciated.

Copyright © 2005-08 www.BigResource.com, All rights reserved