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




Change Range Of Pixels In Canvas



I have a canvas that is 600 x 100, I need to loop through the pixels the do something similar to this:
if (xPixel > 20 || xPixel < 80)
{
if ( yPixel > 10 || xPixel < 90)
{
set the background to white
}
}

How do I loop through the pixels and if the above criteria is met, change the pixels to white? What I am trying to do is make a white box in the middle of my black canvas, but I cannot use any other control or element.. do to other tasks that the canvas is performing.

Thanks for any help.



ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 10-22-2008, 03:31 PM


View Complete Forum Thread with Replies

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

Change Canvas Color Using AS2 / AS3 ?
I would like to change the canvas colors using Action Script 2 / AS3...please, any suggestion ?

thanks in advance,

Change Canvas Size
I have a flash project, and I would like to change the canvas size, and have all of the contents remain centered on every frame.

As if i'm adding material to the edges of the canvas, without messing up what is already on the canvas.

It would take hours to realign everything, if flash cannot do this for me.

Help - Change Canvas Size And Position Of Animation
... after all the wor is done!

how can i change the canvas size and move the animation
to the right place? by changing the proberties to teh right size, the animation is partly outside the canvas.

ty for your help.

Action Script To Change Mc Position Around Canvas
Hi,

I´m trying to make a Mc to move around the canvas according to the mouse position. The Mc follows the mouse on the _y coordinates.
Now I want to make it change position on the _x coordinates according to the mouse.
It´s working fine on the _xmouse position, but I´m not getting it to work in the _ymouse position. I´d like the Mc change position when the mouse is over a determined are on the stage.

Could anyone help?

This is the code I´m using

Code:
onClipEvent (load) {
this._x = 750;
//set original x
this._y = 420;
//set original y
divider = 5;
//speed
numx = this._x;
//numx is destination x
numy = this._y;
//numy is destination y
}
onClipEvent (enterFrame) {
if (_ymouse>700) {
numx = 732;
//set destination x
} else {
numx = 760;
//set destination x
}
}
onClipEvent (enterFrame) {
if (_xmouse>-230) {
numx = 732;
//set destination x
} else {
numx = 760;
//set destination x
}
x = numx-_x;
//setup variable named x
this._x += x/divider;
//see the x transition
//y=numy-_y; //setup variable named y
//this._y+=y/divider; //see the y transition
}
onClipEvent (load) {
_y = 0;
speed = 5;
}
onClipEvent (enterFrame) {
endY = _root._ymouse;
_y += (endY-_y)/speed;
}

Action Script To Change Mc Position Around Canvas
Hi,

I´m trying to make a Mc to move around the canvas according to the mouse position. The Mc follows the mouse on the _y coordinates.
Now I want to make it change position on the _x coordinates according to the mouse.
It´s working fine on the _xmouse position, but I´m not getting it to work in the _ymouse position. I´d like the Mc change position when the mouse is over a determined are on the stage.

Could anyone help?

This is the code I´m using

Code:
onClipEvent (load) {
this._x = 750;
//set original x
this._y = 420;
//set original y
divider = 5;
//speed
numx = this._x;
//numx is destination x
numy = this._y;
//numy is destination y
}
onClipEvent (enterFrame) {
if (_ymouse>700) {
numx = 732;
//set destination x
} else {
numx = 760;
//set destination x
}
}
onClipEvent (enterFrame) {
if (_xmouse>-230) {
numx = 732;
//set destination x
} else {
numx = 760;
//set destination x
}
x = numx-_x;
//setup variable named x
this._x += x/divider;
//see the x transition
//y=numy-_y; //setup variable named y
//this._y+=y/divider; //see the y transition
}
onClipEvent (load) {
_y = 0;
speed = 5;
}
onClipEvent (enterFrame) {
endY = _root._ymouse;
_y += (endY-_y)/speed;
}

(bitmapdata) Change Colors To The Dominate Color In That Range?
hey all,

I am working on a outlines script that converts a image in black outlines and the rest WHITE.

is there a math formula that converts colors in the same color range to the dominate color of that range?

so all light red becomes WHITE and the already dark redpresent in the image stay's darkred.

I am have a cool function that makes outlines but that is not perfect with a jpg with many colors..

so i do this:

1: image convert to 10 -16 colors
2: loop wxh, hxw and make outlines to setPixel (black) if color is different!
3: MY QUISTION ABOVE help?


Best Regards,

Manga

Constrain Objects To Fall Within The Width Of Canvas, Change Opacity As Object Falls.
First time using Flash and I'm trying to modify a tutorial I found on this site. Bear with me if this stuff is too much of a noob question =T.

I'm using this tutorial: http://www.flashkit.com/tutorials/Ac...-980/index.php and changing it so that there are leaves instead of snow falling. So far I have this: http://dcdomain.org/images/taro/left.swf There are a few things I would like to modify though.

1) Some of the leaves are falling outside of the right margin, is there a way for me to put in a constraint that would force the leaves to stay within the canvas parameters, either not allow leaves to fall that far to the right, or have them bounce back to the left when it hits the right margin.

2) I would like to get the leaves to fade out as it falls, so when it reaches the bottom, they should have an opacity of around 0 to 10. What are the steps I should do, or the actionscript I should add to get this effect?

Existing Code:
Frame1:

PHP Code:



shape = Random(4) + 1;
flakey.gotoAndStop(shape);
fallwidth = 300;
flakey._x = Math.random() * fallwidth;
flakey._y = 0;
fallheight = 550;
magnify = Math.random();
flakey._xscale = (magnify * 75) + 25;
flakey._yscale = (magnify * 75) + 25;
step = (magnify * magnify * 2) + 3;
drift = (Math.random() * 4) - 2;
spin = (Math.random() * 6) - 3;
flakey._y = Math.random() * fallheight;
gotoAndPlay(3);




Frame2:

PHP Code:



shape = Random(4) + 1;
flakey.gotoAndStop(shape);
fallwidth = 300;
flakey._x = Math.random() * fallwidth;
flakey._y = 0;
fallheight = 550;
magnify = Math.random();
flakey._xscale = (magnify * 75) + 25;
flakey._yscale = (magnify * 75) + 25;
step = (magnify * magnify * 2) + 3;
drift = (Math.random() * 4) - 2;
spin = (Math.random() * 6) - 3;




Frame4:

PHP Code:



flakeyfall = flakey._y;
if ((flakeyfall <= fallheight) && (flakeydrift>= -35) && (flakeydrift <=  fallwidth+35)) {
flakey._y = flakey._y + step;
flakey._x = flakey._x + drift;
flakey._rotation = flakey._rotation + spin;
gotoAndPlay(3);
} else {
gotoAndPlay(2);
}




One of my friends tried helping by providing me with this:

PHP Code:



//on frame 1

this.onEnterFrame = function(){

if(leafClip._x<rightboundary && leafClip._x>leftboundary){

//this is the function to make leaves fall
leafFalling()

}
}

//leaffalling function

leafFalling = function(){
//initialize alpha for leaves
leafClip._alpha = 100
//then your random falling actions go here
}

-to make the leaves fade with actionscript:
//first make them start fading at a certain y-position
this.onEnterFrame = function(){
if(leafClip._y<400){
leafClip._alpha += (0-leafClip._alpha)*.5
}
}




I tried messing around with the code he provided, inserting it into spots within the code I thought would work... obviously I had no luck.

I was able to get the leaves to change opacity, but only once and I guess the alpha stays at 0 afterwards, I tried adding the line where they return to 100% opacity afterwards, but that didn't work.

Any help would be appreciated. Thank you!

How Do U Change 'work Area' Size Not Canvas Size?
i need to make the work area size bigger in flash 8. not the canvas size. does anyone know how?

FlashMX Pixels Vs Photoshop Pixels?
In creating an animated Flash banner using a JPG graphic created in Photoshop 7, I set the flash document size to match the size of the backround graphic.  According to PS 7, the image size is 503x90 pixels.  This should fit exactly into a Flash document sized 503x90... yet when I bring the image into Flash, the image is about 2pix x 2pix smaller than the flash doc... this throws a border which causes the other images in the web page to not line up correctly.

Is this a known problem? Why doesn't Flash 503pix X 90 pix match with Photoshop's 503x90?

Thanks for your help.
steve

Range
people is there away to have a random that only generates between a range?

In Range
how can i check if a MC is a certain distance away from another? so if its like 20 pixels away then a variable is set

XML Range
How do I get an XMLList of a range of XML elements. For instance if I wanted myXML[5] through myXML[15]?

In Range?
When the monster comes in the range of the enemy it attacks it until either it dies or it dies.

How do i do this?

While(range--) What´s This?
I´ve seen this piece of code in another post:

ActionScript Code:
function getRandomNum(range, place, l) {        var sourceArray = [];    while (range--) {        sourceArray.push(place + range);    }


What does the while(range--) do?
How can you say the same thing using "if"?

Range.
I'm thinking about having a go at one of those Tower Defense games (or building as many elements to help make one up as possible).

I have a static non-moving tower that fires at a specific enemy object (bullets never miss, I can change there frequency etc).

But I don't know how to handle "ranging"?, like a circular range around the tower that defines if it should shoot or not (only if the enemy intersects/comes inside of the towers range).

Any ideas?

P.S. I have tried to do a couple simple things like if enemy X/Y is N amount of pixels away but it only ever ends up doing well with 1 particular entry point and not others, there must be a better way of going about this lol.

Oh and if anyone has advice for other elements (that I haven't yet gotten to) concerning tower defense games (ones like Vector TD in particular as I like how that one works), it would be greatly appreciated.

While(range--) What´s This?
I´ve seen this piece of code in another post:

ActionScript Code:
function getRandomNum(range, place, l) {        var sourceArray = [];    while (range--) {        sourceArray.push(place + range);    }


What does the while(range--) do?
How can you say the same thing using "if"?

Canvas
Hello, I need some help resizing the canvas, I have the links of the website on a main page where I show all the other pages, when you click on the links, the pages are linked to the center of the main one, I use masks to cover part of it and show the page that I want to, now, I had to make my background picture bigger because i needed to add more infrormation, and of course i had to resize the canvas and make the height higher, here comes the problem, it add the canvas to the buttom, no to the top where i want to add it to, and i can select all and move it, but then when i post the page and I click the links that i mentioned before, they apear in a diferen area, so what i have to do its change every single page and add the canvas but its a lot of work, they are several pages, it ould really help me if there is a way to add the canvas to the place that i want to, how can I do this? it is possible?

Pleas help!!!

Thanks

Going Off The Canvas
Ok, I saw yahoo do this alot, on their homepage, http://www.yahoo.com/ , under the home depot ad, click replay ad and the paint brushes move across all of the html links and stuff, I want to know how they do that.

Time In Particular Range ?
Hi,

Can someone help me with this scripting problem ?

I want to check if the local date and time (.GetHours, .GetMinutes, .Get Day, .GetMonth and .GetYear functions) is part of a specific timerange.
For instance from 20 April 2002 11h p.M. to 21 May 2002 9h a.m. I want to set a particular parameter to a specific value...

Anyone ?

Thanx in advance
r

_currentframe= A RANGE Of #'s
Here's what i've got in my code

on (press) {
if (_root.sight._currentframe=1 or 2 or 3 or 4 or 5 or 6) { <----This is the problem
_root.sight.nextFrame();
} else {
play();
}
}

I want it to recognize a RANGE of frames.

Also I noticed that even when using currentframe=1 it did not work. do i need to use Frame Labels? what is wrong?

Range Of ZIP CODES
Hi there,
I have a rang of zip codes where my company can delivery shipments within 24 hours, only in places located in that range of zip codes.
So, based on that information, I´d like to add a search box in the flash movie that I´m working on, this way WE can type the zip code in the search box and press SEARCH. If the user types a zip code that is within that range the actionscript would recognize it and show for example:
"THE ZIP CODE YOU ENTERED IS WITHIN THE 24HS ZONE"
But if the user enters a zip code that is not withing the range codes then show:
"THE ZIP CODE YOU ENTERED IS NOT WITHIN THE 24 HS ZONE"

Example of my range of zip codes:
01000-01099 (any zip code starting in 01000 and ending in 01099)
01500-01599 (any zip code starting in 01500 and ending in 01599)
and so on
Please note that I have more than one range of zip codes.
How do I set my IF actions to work as follow:
if (zipcode >=0100 && zipcode<=01099){
message = "THE ZIP CODE YOU ENTERED IS WITHIN THE 24HS ZONE";
}else if{
and so on

WILL IT WORK??? I HAVE ALREADY TRIED AND IT DIDN´T WORK HERE.
One thing that I don´t understand. What is the difference between = and == ??
In this case, should I use >==???

Stop Within Range...
Hi everyone. I need some help. I have created a 3 frame looping clip that moves my content around based on which button you click. I have the loop check against an array of positions so it knows where to go to and how far it needs to go from its current position.
Here is the code on the 2nd frame:
accel = .090;
yaccel = (_root.logoNextPosition-_root.mc_logo._y)*accel;
_root.mc_logo._y += yaccel;
if (Math.ceil(getProperty(_root.mc_logo, _y)) == _root.logoNextPosition) {
_root.stopLoop();
gotoAndStop(1);
}

My problem is that I never really get the values to equal each other because of the accel value. Depending on which way it moves sometimes it stops and sometimes it doesn't.
What I would like to do is test if the value is within range of the desired value, then stop my loop.
Make sense?
Thanks in advance everyone.

Targeting A Range Of MC's
Is it possible to target more than one MC in the same 'If' action. For example:

Say I have 50 movieclips named:

tree1
tree2
tree3

etc...

tree49
tree50


Is it possible to say: 'If this.hitTest(_root.tree[1-50])

or something like that?

Also will this speed up the game as an alternative to having 50 hitTest actions each with a different tree?

Thankyou very much for your help.

Set A Range For Dragging
Hi I have a movie which I allow the user to drag along _x, but I want to limit the range of the X dragging to within a specific range.

Any ideas on how I would do this?

Here is what I am using for the dragging:

code:
onClipEvent(load) {
drag = false;
}
onClipEvent(mouseDown) {
if (this.hitTest(_root._xmouse,_root._ymouse,true)) {
offset = this._x - _root._xmouse;
drag = true;
}
}
onClipEvent(mouseUp) {
drag = false;
}
onClipEvent(mouseMove) {
if (drag) {
this._x = _root._xmouse + offset;
updateAfterEvent();
}
}

Setting A Value To A Range
Is there a function in flash that allows one to create a range, aka 45-55?

Any help would be appriciated, thanks.

Defining A Range...
Hi All,

I have a problem. My movie width is 500 pixels, I need this size to represent x size and be able to define the x size so that I can move a line along that line by a user being able to specify a value (x) in a input box.

This is a GPS app, basically I have a city center, the lat and long values have a range of 1500, but my movie is only 500 wide (and 500 high), when I get the lat and long values I need to move 2 lines along the X and Y values to show your location. If you took this example the movement of this would have to be 500/1500 = 0.33 . Does Flash support the ability to move a line by ultra small decimals? (I noticed it rounds decimals up to 1 decimal place)

I hope you understand what I mean.

Cheers

Carl Bruiners

Range Of Variables
i forgot how to do this.... can someone please remind me how to create a range of variables with just a couple of lines of AS;

i want to tell all my variables (and there's 42 of them) to appear... the script i have is:

ct002._visible = true;
ct003._visible = true;
ct004._visible = true;

but i don't really want 42 lines of script...

If Number Is Between Range...
Hello...

I need to know how to use ranges and if there is a between operator in Flash ActionScript 2.0.

I have a variable that needs to be compared to a range of numbers. For example...

If varCoverage (is between) 96-120 Then
varRecommend = Option 1
Else If varCoverage (is between) 121-192 Then
varRecommend = Option 2
Etc...

On and on until the end of the ranges. So, once varCoverage is determined, I need to be able to compare it to about 10 ranges and then which ever it fits into, I need to store that ranges option in the variable varRecommend.

Make any sense? =) Thanks for all your help!

[Help] Variable Range
I have a bar, that when it reaches 0, it plays an animation, but problem is, if someone pushes the button one more time making the value -1 it wiggs out.
How could I set a range? Like if (_root.health = 1-10) {

Number Range?
Is there a way to target a number range instead of a specific number in an "if" statement?

For example:

Code:
if(myvariable == numberRangefrom 5 to 100){
gotoAndPlay(10);
}
Thanks for taking a look at this.

Hittest Range
im working on a multi player game, like age of empires, there can be lots of units in the game at a time. when a unit shoots i use:
count += 1;
duplicateMovieClip("shot", "shot"+count, count)

to create a new shot. and when it hits a guy i was using:
if(this.hitTest(shot1) or this.hitTest(shot2) or this.hitTest(shot3)... and so on
is there a way to have a range of numbers in the hittest so you dont have to write them all out somthing like this:
if(this.hitTest(_root["shot"+ 1 -1000)){

Random #'s From A Range
I'm looking to see how I can code picking a random whole integer from -2 through 2.

In other words, I need to specify a random number that could be either -2, -1, 0, 1 or 2?

Thanks

Currentframe Range
Hi!

I have folowing actionscript code:


if (_root.vsebina_program_mc1.vsebina_program_mc3._cu rrentframe == 2 ) _root.vsebina_program_mc1.vsebina_program_mc3.goto AndPlay ("litrasi_down");
if (_root.vsebina_program_mc1.vsebina_program_mc3._cu rrentframe == 3 ) _root.vsebina_program_mc1.vsebina_program_mc3.goto AndPlay ("litrasi_down");
if (_root.vsebina_program_mc1.vsebina_program_mc3._cu rrentframe == 4 ) _root.vsebina_program_mc1.vsebina_program_mc3.goto AndPlay ("litrasi_down");
if (_root.vsebina_program_mc1.vsebina_program_mc3._cu rrentframe == 5 ) _root.vsebina_program_mc1.vsebina_program_mc3.goto AndPlay ("litrasi_down");
if (_root.vsebina_program_mc1.vsebina_program_mc3._cu rrentframe == 6 ) _root.vsebina_program_mc1.vsebina_program_mc3.goto AndPlay ("litrasi_down");
if (_root.vsebina_program_mc1.vsebina_program_mc3._cu rrentframe == 7 ) _root.vsebina_program_mc1.vsebina_program_mc3.goto AndPlay ("litrasi_down");
if (_root.vsebina_program_mc1.vsebina_program_mc3._cu rrentframe == 8 ) _root.vsebina_program_mc1.vsebina_program_mc3.goto AndPlay ("litrasi_down");
if (_root.vsebina_program_mc1.vsebina_program_mc3._cu rrentframe == 9 ) _root.vsebina_program_mc1.vsebina_program_mc3.goto AndPlay ("litrasi_down");
if (_root.vsebina_program_mc1.vsebina_program_mc3._cu rrentframe == 10 ) _root.vsebina_program_mc1.vsebina_program_mc3.goto AndPlay ("litrasi_down");
if (_root.vsebina_program_mc1.vsebina_program_mc3._cu rrentframe == 11 ) _root.vsebina_program_mc1.vsebina_program_mc3.goto AndPlay ("litrasi_down");
if (_root.vsebina_program_mc1.vsebina_program_mc3._cu rrentframe == 12 ) _root.vsebina_program_mc1.vsebina_program_mc3.goto AndPlay ("litrasi_down");
if (_root.vsebina_program_mc1.vsebina_program_mc3._cu rrentframe == 13 ) _root.vsebina_program_mc1.vsebina_program_mc3.goto AndPlay ("litrasi_down");

I would like to know is there a way to join all this lines into one more simple. Like:

if (_root.vsebina_program_mc1.vsebina_program_mc3._cu rrentframe == 2-13 ) _root.vsebina_program_mc1.vsebina_program_mc3.goto AndPlay ("litrasi_down");

But this isn't the way, because it doesn't work.

Tnx for help. (in the word "currentframe" there is a space between "u" and "r". Don't know why )

Blaz

_currentframe Specifying Range
Say _root.phase1 = 300 frames

on (press) {

if(_root.phase1._currentframe == 1 - 100){
_root.buttons.gotoandStop (2);
}
else{
_root.buttons.gotoandStop (1);
}
}

What I'm looking for is a way to define the range of frames, like:

Frame 1 - 100 = do thing 1
Frame 101 - 200 = do thing 2
Frame 201 - 300 = do thing 3

Anyone have any thoughts?

Thanks a million!

Synth

Datatype Range
Hi,

Can anyone of you mention or refer any weblink where I could found datatype ranges for flash variable?
I did not find any such info in FlashMx2004 and Flash8 documentation.


Thanks in advance

How To Check A Mc's _x & _y In A Range ?
I'd like to check if a mc's _x and _y properties are between a certain range, but can't find out how to. Now that I'm typing this (I can't check it in Flash right now at the moment), I'm thinking if this will work:

let's say the mc is called mcMyMovie and it has to be between 90 & 100 (both for x and y)

if(mcMyMovie._x =< 100 && mcMyMovie._x =>90 && mcMyMovie._y =<100 && mcMyMovie._y =>90) {

}

Would this work or is there a shorter way to write this down in code ? In maths I'd write something like 90 < mcMyMovie._x <100.

Thanks!

Range Within An Array
Hi, I was wondering if someone could help me?

I'm trying to create an simple (yet I still can seem to do it) task where a user has to enter a prevously worked out number into an input box clicks a button and get a correct or incorrect message.

I need the number that they enter to be a numer within a range ie. 1.0 to 1.9

I have 2 text boxs on stage... 1 an input text box (called inputBox) and the other a dynamic text box (called answerBox) also the is a button on stage to exec the script

on the root timeline the script is:


Code:
numbers = ["1.0", "1.1", "1.2" etc etc];
function checkNumbers () {
for (i=0; i < numbers.length; i++) {
if (_root.inputBox == numbers[i]) {
_root.answerBox = "Correct";
} else {
_root.answerBox = "Wrong"
}
}
i}
and on the button is:


Code:
on (release){
checkNumbers()
}
but whatever I do I cant get it to work, can someone help me out here please???

How To Check A Mc's _x & _y In A Range ?
I'd like to check if a mc's _x and _y properties are between a certain range, but can't find out how to. Now that I'm typing this (I can't check it in Flash right now at the moment), I'm thinking if this will work:

let's say the mc is called mcMyMovie and it has to be between 90 & 100 (both for x and y)

if(mcMyMovie._x =< 100 && mcMyMovie._x =>90 && mcMyMovie._y =<100 && mcMyMovie._y =>90) {

}

Would this work or is there a shorter way to write this down in code ? In maths I'd write something like 90 < mcMyMovie._x <100.

Thanks!

Getting A Number Within A Range
I'm currently getting the x value of one movieclip and setting the x value of another movie clip to the same x. I want to make sure that the second movie clip does not go off the stage, so basically I was wondering how to set a value (number) but tell flash, that if it's outside a certain range, (a min or max value) then simply set it to that value

THanks!

Centralizing The Canvas
Hi, all,

What's the quickest way to centralize the canvas in Flash?

- boon

Outside The Working Canvas
I've put together a rather large movie clip that I'm going to have scroll across the canvas of my main movie (800 x 600 pixels). The movie clip ranges to about 3000 pixels in height, so I obviously can't see what I'm adding to it. I tried scrolling out and the MC gets cut off. Is there any way to see more of the blank area around the canvas???

-Foochuck

Canvas Problem
Ok i kind of finished my movie clip but i realised that I want to add something else to it on the left hand side. But i am unable to make it fit on the canvas???? I tried going to modify + document and changing the dimensions... but still no avail.

someone pls help.

thanx

Canvas Problemo
Ok - I kind of completed my movie clip but i realised that i wanted to add something to it.

Except when I tried to put some text on the left hand side > it doesn't fit on the canvas??? I tried to go to document properties and change the dimensions except its not making the canvas bigger? why is this happening and how can i make it bigger?

Pls help!

How To Do Canvas Trim?
my question is here:

I have a movie about 500 frames in total with lots of images in within. After I finished the whole movie, I found that my canvas size far too big for my images. Can anyone please teach me how to do CANVAS TRIM in Flash MX please? I just want to click a button like in Fireworks MX, but I couldn't find any button as simple as my Fireworks MX. I ended up shifting one image by one image to fit into the bigger canvas....hahaha, stupid me.

Please help me!!

Resizing My Canvas
hi there

im using flashmx.
How do i resize my canvas so that i dont have any white background showing.

thanks again
dcheketri

Resizing My Canvas
hi there

im using flashmx.
How do i resize my canvas so that i dont have any white background showing.

thanks again
dcheketri

MC Allocation To The Canvas
Hello there,

I've the following piece of code on the main timeline which loads 6 jpg's into 6 seperate MC after clicking a button. When you click it again, it loads the next 6 pics.

But how can I tell Flash to put those MC's on a pre-defined place on the canvas (let's say top left, top right, middle left, middle right, bottom left, bottom right)

Here is the code on the timeline:


function showPic(p) {
var l = p.length;
for (var i = 0; i<l; i++) {
_root.attachMovie("pic", "picture_holder"+i, i);
_root["picture_holder"+i]._x = 200*i;
_root["picture_holder"+i].loadMovie(p[i]);
trace(p[i]);
}
}

Anyone who can help me with this? Remember, this is Flash 5 code since I cannot open MX!

Thanks in advance for your expertise!!

Elena

Swiff Canvas
Is there any support site for Swiff canvas? Previously i used to go to Swifftools.com now that site points to screenweaver.com. Can Swiff canvas be used for FlashMX?

Canvas Size
for a game im making i need to create large levels. But the grey canvas is too small for me to make it larger, is there any way i can make it bigger, or are there any tips on making large levels?

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