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




Left Side Of Assignment Operator Must Be Variable Or Property. Error Again



Error Text:

**Error** Scene=Scene 1, layer=Action Layer, frame=1:Line 127: Left side of assignment operator must be variable or property.
return(-c * (Math.sqrt(1 - t = t / d * t) - 1) + b);

What is wrong with this code? Thanks B



FlashKit > Flash Help > Flash MX
Posted on: 10-13-2004, 03:03 AM


View Complete Forum Thread with Replies

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

Left Side Of Assignment Operator Must Be Variable Or Property Error
Hi

I have made a little countdown application from a tutorial off this site.
What i am trying to do is to make it so that when the countdown gets to 0 the movie jumps to frame three and a little movie then starts to say you have reached the countdown, As you can see by the code below i have tried a couple of things but keep getting an error of:-

code:
**Error** Scene=Scene 1, layer=actions, frame=1:Line 14: Left side of assignment operator must be variable or property.
if(length(hours2) = "0" & length(minutes2) = "0" & length(seconds2) = "0"){

Total ActionScript Errors: 1 Reported Errors: 1


And im totally confused now so any ideas would be greatful.

code:
myDate = new Date();
seconds = myDate.getSeconds();
minutes = myDate.getMinutes();
hours = myDate.getHours();
seconds2 = 59-seconds;
minutes2 = 59-minutes;
hours2 = 8759-hours;
if (length(minutes2) == 1) {
minutes2 = "0" + minutes2;
}
if (length(seconds2) == 1) {
seconds2 = "0" + seconds2;
}
if(length(hours2) = "0" & length(minutes2) = "0" & length(seconds2) = "0"){
//goto frame three wants to go here
}
else {
newyear2006 = (hours2+" Hours : "+minutes2+" Minutes : "+seconds2);
newyear20061 = ("Seconds left until 2006");
}



Thank you very much

Nook6

ERROR - Left Side Of Assignment Operator Must Be Variable Or Property
Im trying to use this for a tabbing form:

on (keypress "<Tab>") {
if (Selection.getFocus() == "_root.main_forms_stories.initials") {
Selection.setFocus("_root.main_forms_stories.name" );
} else if (Selection.getFocus() = "_root.main_forms_stories.initials") {
}
}

but im getting this error:

**Error** Symbol=stories, layer=Layer 7, frame=1:Line 4: Left side of assignment operator must be variable or property.
} else if (Selection.getFocus() = "_root.main_forms_stories.initials") {

Total ActionScript Errors: 1 Reported Errors: 1

what am i missing

Syntax Error - "Left Side Of Assignment Operator Must Be Variable Or Property"
What the...

I just updated from Flash 5 to Flash 6 and I go to publish a swf (that I've done heaps of times before) and it comes up with the following syntax error in the Output box:

Scene=Scene 1, Layer=Scrolling Bar, Frame=22: Line 4: Left side of assignment operator must be variable or property.
if (xmousepos1>xmousepos2 && ymousepos1>-76 && ymousepos1<--45) {

Scene=Scene 1, Layer=Scrolling Bar, Frame=22: Line 7: Left side of assignment operator must be variable or property.
if (xmousepos1<xmousepos2 && ymousepos1>-76 && ymousepos1<--45) {

Scene=Scene 1, Layer=Scrolling Bar, Frame=22: Line 10: Left side of assignment operator must be variable or property.
if (ymousepos1<-76 || ymousepos1>--45) {


Now, what on earth is wrong with "if (xmousepos1>xmousepos2 && ymousepos1>-76 && ymousepos1<--45) {" etc etc ????????

If somebody could let me know, then that would be great!

Thanks heaps.

Blastbum

Syntax Error - "Left Side Of Assignment Operator Must Be Variable Or Property"
What the...

I just updated from Flash 5 to Flash 6 and I go to publish a swf (that I've done heaps of times before) and it comes up with the following syntax error in the Output box:

Scene=Scene 1, Layer=Scrolling Bar, Frame=22: Line 4: Left side of assignment operator must be variable or property.
if (xmousepos1>xmousepos2 && ymousepos1>-76 && ymousepos1<--45) {

Scene=Scene 1, Layer=Scrolling Bar, Frame=22: Line 7: Left side of assignment operator must be variable or property.
if (xmousepos1<xmousepos2 && ymousepos1>-76 && ymousepos1<--45) {

Scene=Scene 1, Layer=Scrolling Bar, Frame=22: Line 10: Left side of assignment operator must be variable or property.
if (ymousepos1<-76 || ymousepos1>--45) {


Now, what on earth is wrong with the above????????

If somebody could let me know, then that would be great!

Thanks heaps.

Blastbum

Syntax Error - "Left Side Of Assignment Operator Must Be Variable Or Property"
What the...

I just updated from Flash 5 to Flash 6 and I go to publish a swf (that I've done heaps of times before) and it comes up with the following syntax error in the Output box:

Scene=Scene 1, Layer=Scrolling Bar, Frame=22: Line 4: Left side of assignment operator must be variable or property.
if (xmousepos1>xmousepos2 && ymousepos1>-76 && ymousepos1<--45) {

Scene=Scene 1, Layer=Scrolling Bar, Frame=22: Line 7: Left side of assignment operator must be variable or property.
if (xmousepos1<xmousepos2 && ymousepos1>-76 && ymousepos1<--45) {

Scene=Scene 1, Layer=Scrolling Bar, Frame=22: Line 10: Left side of assignment operator must be variable or property.
if (ymousepos1<-76 || ymousepos1>--45) {


Now, what on earth is wrong with the above????????

If somebody could let me know, then that would be great!

Thanks heaps.

Blastbum

Help The N00b: "Left Side Of Assignment Operator Must Be Variable Or Property" Error
Okay, I'm trying to teach myself actionscript by playing around with some files that were created back in the hallowed days of Flash 5. The file in particular is a goofy "toy" that plays a mc wherever you click your mouse, over and over again, until the entire scene is filled with instances of the mc. A button allows you to remove each mc one by one until the screen is clear again.

Unfortunately, MX doesn't let you use the eval function on the left hand side anymore. I've searched the web for a fix, but the ones I've tried don't work (either you're limited to one mc at a time or the clip abruptly stops and closes). Anyone want to help this noob understand what he's doing wrong?

Here's the flash 5 actionscript that launches the mc "box":


ActionScript Code:
on (press)
{
    n = n + 1;
    bn = "box" + n;
    duplicateMovieClip("box", bn, n + 16384.000000);
    setProperty(bn, _x, cursorpos_x);
    setProperty(bn, _y, cursorpos_y);
    eval(bn + ":n") = n;
}


Here's the flash 5 actionscript for the "clear" button:


ActionScript Code:
on (press)
{
    if (n > 0)
    {
        bn = "box" + n;
        removeMovieClip(bn);
        n = n - 1;
    }
}

I tried using advice from this forum to fix the problem, but I must be an idiot because I couldn't get it to work.

Left Side Of Assignment Operator Must Be Variable Or Property.
ERROR MESSAGE:
Left side of assignment operator must be variable or property.

THE CODE below produces THE ERRORS (also below).

Any ideas how to rectify, please?

THE CODE:

counter = 1;
eval (("picslot" + counter) + ".picnumber") = eval ("_level0.picnumber" + counter);
eval (("picslot" + counter) + ".picdescription") = eval ("_level0.picdescription" + counter);
ycounter = -125;
counter = counter + 1;
if (counter < _level0.piccounter) {
do {
duplicateMovieClip ("picslot1", "picslot" + counter, counter);
setProperty("picslot" + counter, _y , ycounter);
eval (("picslot" + counter) + ".picnumber") = eval ("_level0.picnumber" + counter);
eval (("picslot" + counter) + ".picdescription") = eval ("_level0.picdescription" + counter);
ycounter = ycounter + 80;
counter = counter + 1;
} while (counter < _level0.piccounter);
}
_root.picturelist.refreshPane();


PRODUCES THE ERRORS:

Symbol=Symbol 12clip, Layer=Layer 3, Frame=5: Line 2: Left side of assignment operator must be variable or property.
eval (("picslot" + counter) + ".picnumber") = eval ("_level0.picnumber" + counter);

Symbol=Symbol 12clip, Layer=Layer 3, Frame=5: Line 3: Left side of assignment operator must be variable or property.
eval (("picslot" + counter) + ".picdescription") = eval ("_level0.picdescription" + counter);

Symbol=Symbol 12clip, Layer=Layer 3, Frame=5: Line 10: Left side of assignment operator must be variable or property.
eval (("picslot" + counter) + ".picnumber") = eval ("_level0.picnumber" + counter);

Symbol=Symbol 12clip, Layer=Layer 3, Frame=5: Line 11: Left side of assignment operator must be variable or property.
eval (("picslot" + counter) + ".picdescription") = eval ("_level0.picdescription" + counter);

Left Side Of Assignment Operator Must Be Variable Or Property.
How to avoid this message "Left side of assignment operator must be variable or property."
I want write something like this

box1 = "door";
box2 = "wall";
box3 = "sky";
ball1 = "green";
ball2 = "blue";
ball3 = "red";
a = 1;
b = 2;
"box"+a = "ball"+b
if(door == blue){
//something
}

Please help

Left Side Of Assignment Operator Must Be Variable Or Property
I have a an actionscipt like this in a flash template


PHP Code:




var _loc1 = new Array();
    _loc1 = _loc1.concat([1 - 6.914000E-001 * arg / 100, --6.094000E-001 * arg / 100, --8.200000E-002 * arg / 100, 0, 0]);
    _loc1 = _loc1.concat([--3.086000E-001 * arg / 100, 1 - 3.906000E-001 * arg / 100, --8.200000E-002 * arg / 100, 0, 0]);
    _loc1 = _loc1.concat([--3.086000E-001 * arg / 100, --6.094000E-001 * arg / 100, 1 - 9.180000E-001 * arg / 100, 0, 0]);
    _loc1 = _loc1.concat([0, 0, 0, 1, 0]);







the problems lay between line 2 to 7. Could you tell me what s wrong it. I am an ignorant newbie in flash.
Thanks in advance

Left Side Of Assignment Operator Must Be Variable Or Property.
ERROR MESSAGE:
Left side of assignment operator must be variable or property.
THE CODE below produces THE ERRORS (also below).
Any ideas how to rectify, please?
THE CODE:
counter = 1;
eval (("picslot" + counter) + ".picnumber") = eval ("_level0.picnumber" + counter);
eval (("picslot" + counter) + ".picdescription") = eval ("_level0.picdescription" + counter);
ycounter = -125;
counter = counter + 1;
if (counter < _level0.piccounter) {
do {
duplicateMovieClip ("picslot1", "picslot" + counter, counter);
setProperty("picslot" + counter, _y , ycounter);
eval (("picslot" + counter) + ".picnumber") = eval ("_level0.picnumber" + counter);
eval (("picslot" + counter) + ".picdescription") = eval ("_level0.picdescription" + counter);
ycounter = ycounter + 80;
counter = counter + 1;
} while (counter < _level0.piccounter);
}
_root.picturelist.refreshPane();

PRODUCES THE ERRORS:
Symbol=Symbol 12clip, Layer=Layer 3, Frame=5: Line 2: Left side of assignment operator must be variable or property.
eval (("picslot" + counter) + ".picnumber") = eval ("_level0.picnumber" + counter);
Symbol=Symbol 12clip, Layer=Layer 3, Frame=5: Line 3: Left side of assignment operator must be variable or property.
eval (("picslot" + counter) + ".picdescription") = eval ("_level0.picdescription" + counter);
Symbol=Symbol 12clip, Layer=Layer 3, Frame=5: Line 10: Left side of assignment operator must be variable or property.
eval (("picslot" + counter) + ".picnumber") = eval ("_level0.picnumber" + counter);
Symbol=Symbol 12clip, Layer=Layer 3, Frame=5: Line 11: Left side of assignment operator must be variable or property.
eval (("picslot" + counter) + ".picdescription") = eval ("_level0.picdescription" + counter);

Left Side Of Assignment Operator Must Be Variable Or Property.
ERROR MESSAGE:
Left side of assignment operator must be variable or property.

THE CODE below produces THE ERRORS (also below).

Any ideas how to rectify, please?

THE CODE:

counter = 1;
    eval (("picslot" + counter) + ".picnumber") = eval ("_level0.picnumber" + counter);
    eval (("picslot" + counter) + ".picdescription") = eval ("_level0.picdescription" + counter);
    ycounter = -125;
    counter = counter + 1;
    if (counter < _level0.piccounter) {
        do {
            duplicateMovieClip ("picslot1", "picslot" + counter, counter);
            setProperty("picslot" + counter, _y , ycounter);
            eval (("picslot" + counter) + ".picnumber") = eval ("_level0.picnumber" + counter);
            eval (("picslot" + counter) + ".picdescription") = eval ("_level0.picdescription" + counter);
            ycounter = ycounter + 80;
            counter = counter + 1;
        } while  (counter < _level0.piccounter);
    }
    _root.picturelist.refreshPane();


PRODUCES THE ERRORS:

Symbol=Symbol 12clip, Layer=Layer 3, Frame=5: Line 2: Left side of assignment operator must be variable or property.
         eval (("picslot" + counter) + ".picnumber") = eval ("_level0.picnumber" + counter);

Symbol=Symbol 12clip, Layer=Layer 3, Frame=5: Line 3: Left side of assignment operator must be variable or property.
         eval (("picslot" + counter) + ".picdescription") = eval ("_level0.picdescription" + counter);

Symbol=Symbol 12clip, Layer=Layer 3, Frame=5: Line 10: Left side of assignment operator must be variable or property.
                 eval (("picslot" + counter) + ".picnumber") = eval ("_level0.picnumber" + counter);

Symbol=Symbol 12clip, Layer=Layer 3, Frame=5: Line 11: Left side of assignment operator must be variable or property.
                 eval (("picslot" + counter) + ".picdescription") = eval ("_level0.picdescription" + counter);



How Do I Use Enable? Left Side Of Assignment Operator Must Be Variable Or Property.
**Error** Scene=Scene 1, layer=action, frame=1:Line 160:
newStartup.large-white-button.enabled = false;

Total ActionScript Errors: 1 Reported Errors: 1



Code:
newStartup.large-white-button.enabled = false;
Glen Charles Rowell

[fmx Pro] Left Side Of Assignment Operator Must Be Variable Error Problem
I'm somewhat new and trying to learn actionscript. I'm getting and error that has me puzzled.

**Error** Scene=Scene 1, layer=actions, frame=1:Line 2: Left side of assignment operator must be variable or property.
bg-mb_mc._alpha=50;

I have a timeline with 3 jpgs on it that have been converted into symbols.

bg-gooto_mc is an instance of bg-gooto
bg-mb_mc is an instance of bg-mb
bg-lace_mc is an instance of bg-lace

When I try ... bg-mb_mc._alpha=50; I get the error.
using setproperty ("_level0.bg-mb_mc", _alpha, 45); works ok.

It would be greatly appreciated if someone would please explain the problem.

[fmx Pro] Left Side Of Assignment Operator Must Be Variable Error Problem
I'm somewhat new and trying to learn actionscript. I'm getting and error that has me puzzled.

**Error** Scene=Scene 1, layer=actions, frame=1:Line 2: Left side of assignment operator must be variable or property.
bg-mb_mc._alpha=50;

I have a timeline with 3 jpgs on it that have been converted into symbols.

bg-gooto_mc is an instance of bg-gooto
bg-mb_mc is an instance of bg-mb
bg-lace_mc is an instance of bg-lace

When I try ... bg-mb_mc._alpha=50; I get the error.
using setproperty ("_level0.bg-mb_mc", _alpha, 45); works ok.

It would be greatly appreciated if someone would please explain the problem.

Error...Left Side Of Assignment Operator...?
Can someone with more insight than I help me understand how to get this fixed?

This is my action script that is having a problem:
code:
stop ();
box_y = 50;
box_x = "50";
box_number = 5;
line_x = getProperty("/line", _x);
in_menu = 1;
Box_RollBack = 0;
Speed_box = 1.500000;
Speed_menu = 4;
Current_menu = 1;
Current_position = 0;
menu_width = 500;
menu_number = 5;
menu_totalwidth = menu_width * menu_number;
/menu_1._y = 0;
/menu_1._x = 0;
tolerance = 1;
for (counter = 1; Number(box_number) >= Number(counter); counter = Number(counter) + 1)
{
"box_" add counter._y = Number((counter - 1) * menu_width) + Number(box_y);
"box_" add counter._x = box_x;
set("box_" add counter add ":in_menu", 1);
} // end of for



Below is the output after I compile it:
code:

**Error** Scene=Scene 1, layer=Action Layer, frame=192:Line 15: Unexpected '/' encountered
/menu_1._y = 0;

**Error** Scene=Scene 1, layer=Action Layer, frame=192:Line 16: Left side of assignment operator must be variable or

property.
/menu_1._x = 0;

**Error** Scene=Scene 1, layer=Action Layer, frame=192:Line 20: Left side of assignment operator must be variable or

property.
"box_" add counter._y = Number((counter - 1) * menu_width) + Number(box_y);

**Error** Scene=Scene 1, layer=Action Layer, frame=192:Line 21: Left side of assignment operator must be variable or

property.
"box_" add counter._x = box_x;

**Error** Symbol=Symbol 148, layer=Action Layer, frame=1:Line 9: Left side of assignment operator must be variable or

property.
"/menu_" add counter._y = Number(-/:current_position) + Number((counter - 1) * /:menu_width);

**Error** Symbol=Symbol 148, layer=Action Layer, frame=1:Line 10: Left side of assignment operator must be variable or

property.
"/menu_" add counter._x = 0;

**Error** Symbol=Symbol 148, layer=Action Layer, frame=1:Line 19: Left side of assignment operator must be variable or

property.
"/menu_" add counter._y = Number(-/:current_position) + Number((counter - 1) * /:menu_width);

**Error** Symbol=Symbol 148, layer=Action Layer, frame=1:Line 20: Left side of assignment operator must be variable or

property.
"/menu_" add counter._x = 0;

**Error** Symbol=Symbol 148, layer=Action Layer, frame=1:Line 33: Left side of assignment operator must be variable or

property.
"/box_" add counter._y = Number(Number(Number(-/:current_position) + Number((counter - 1) * /:menu_width)) +

Number(/:box_y)) + Number(box_difference//:speed_box);

**Warning** Symbol=Symbol 189, layer=Action Layer, frame=1:Line 1: Case-insensitive identifier 'date' will obscure built-in

object 'Date'.
time_display = date();

Total ActionScript Errors: 10 Reported Errors: 10

Left Side Of Operator Must Be A Variable Or Property
ex.
eval("String"+varNumber)=thisProperty;

this doesn't work.
rats.
this feels like a rookie q, but in flash mx i apparently cannot create a assignment name dyamically when i set a new var.

how do i do it in flash mx?

thanks

JWT

Left Side Of Operator Must Be Variable Or Property
What if I have a completely dynamic name?

ex:

["_parent." + switches.clip[counter] + "." + switches.XorY[counter]] -= 5;

Left Side Of Assignment Operator? [Help]
function check() {
if
(unload1 && unload2 && unload3 && unload4 && unload5 = true){gotoAndPlay (3)}}

i have the previaouse code but it tells me that the Left side of assignment operator must be variable or property.

can you tell me wat this means?????

Left Side Of Assignment Operator (+i)
Hi

Please can anyone tell me how to add "i" to the left side of an assignment operator. I need to refer to multiple text fields named "text0", "text1", "text2" etc. within a loop. Something like this.....

Code:

for(i=0; i<myArray.length; i++) {

   text(+i).text = myArray[i];

}

Thanks!

[CS3] Error: Left Side Must Be Variable Or Property
I'm really confused. Now hopefully you can explain and maybe give me a better code. To start, here is my code:

onClipEvent (load){
var num1 = Math.random()*4+1;
var num2 = Math.random()*4+1;
if (num2 = num1){
num2 = Math.random()*4+1;
}else{
var num3 = Math.random()*4+1;
if ((num3 = num2)or(num3 = num1)){
num3 = Math.random()*4+1;
}else{
var num4 = Math.random()*4+1;
if ((num4 = num3)or(num4 = num2)or(num4 = num1)){
num4 = Math.random()*4=1;
}else{
var num5 = Math.Random()*4+1;
if ((num5 = num4)or(num5 = num3)or(num5 = num2)or(num5=num1)){
num5 = Math.random()*4+1;
}
}
}
}
}


Obviously, it probably isn't very good (I'm trying to make each variable random but different than each other). Now I get an error about this line:

num4 = Math.random()*4=1;

It says "Left side must be variable or property". Isn't it though?

Flash 5 - Mx Error W/ Left Side Operator -quick
hi there, i have a flash 5 file that needs to be mx 2004. when saved as a v5 swf it works fine, but as a v6 swf it breaks. the output errors with:

** Left side of assignment operator must be variable or property.

eval("o"+d4Cards[i]) = {name:d4Cards[i], group:'d4Cards', order:i, depth:61+i};

the line above is where i currently get the error.. can someone help me fix what ever v6 is angry at? s

Flash 5 To Mx Error W/ Left Side Operator -quick
hi there, i have a flash 5 file that needs to be mx 2004. when saved as a v5 swf it works fine, but as a v6 swf it breaks. the output errors with:

** Left side of assignment operator must be variable or property.

eval("o"+d4Cards[i]) = {name:d4Cards[i], group:'d4Cards', order:i, depth:61+i};

the line above is where i currently get the error.. can someone help me fix what ever v6 is angry at? s

HELP - Left Side Assignment AND SetInterval
i have the following problem:

when i use this["d" + dno] = 4; inside a function
and then set an interval it doesnt work!!!
it makes me mad... why???
try the script:
[you wont get the value for d: which should be 4]
output:
c: 1
d:
----------------------------------------------------

cno = 1;
this["c" + cno] = 1;
trace("c: " + c1);

function move() {
dno = 1;
this["d" + dno] = 4;
trace("d: " + d1);
clearInterval(moveID);
}

moveID = setInterval(move, 1);

stop();

----------------------------------------------------

...but it works if i dont use the interval...!!!!
try the script:
output:
c: 1
d: 4
----------------------------------------------------

cno = 1;
this["c" + cno] = 1;
trace("c: " + c1);

function move() {
dno = 1;
this["d" + dno] = 4;
trace("d: " + d1);
clearInterval(moveID);
}

move();

stop();

----------------------------------------------------

any idea? any help? i am really desperate...

deeno

Left Side Of The....error
**Error** Scene=Scene 1, layer=Action Layer, frame=2:Line 138: Left side of assignment operator must be variable or property.
_l1.val = _l1.end - _l1.bgn = _l3[i];



help me with this!!!!!!!!!!!!! please

Assignment Operator
Hi...

I have the following problem.
I have an array that has a name for a square.
In my i want to edit the _width value of each square by using a loop.
The first part with the for loop works and shows 4 squares.
The second loop must change the _width for each square but this doesn't work.
grafieken[g].onEnterFrame = function() { were grafieken[g] is the array does not work. However, if i change this too grafiek1.onEnterFrame = function() { this will work for only the first square.

How do make sure all the squares will change


Code:
grafieken = new Array("klant1", "klant2", "klant3", "klant4");
count = 0;

//first part

for (g=0; g<grafieken.length; g++) {
_root.grafiek1.duplicateMovieClip("grafiek"+grafieken[g], count);
trace(grafieken[g])
oCount = eval("grafiek"+grafieken[g]);
with (oCount) {
_width=10;
_height=10;
_x = (count % 16)*_width;
_y = (count % 16)*_height;
count++;
}
}

//second part

for (g=0; g<grafieken.length; g++) {
//trace(grafieken[g])

grafieken[g].onEnterFrame = function() {

if (this._width <= 99) {
this._width += ratio;
if (this._width == 100) {
grafieken[g]_uitslag = this._width;
trace("Maximum is bereikt");
}
}
}
}
thanks

Palying Side In Left Or Right Side
i know that if i put a sound on the timeline i can playsound on the left or right side
can i do the same in code?
thnaks in adbvance
peleg

Left Shift Operator Question Help Me
hi all

how to ensure that bit in variable switch on or off

for example bit 0 with << left Operator

if I use something like this

myVar = 1 << 0; // result 1 * 1 = 1

is this will switch my bit on ?

ok if so then

the next bit should be something like this

myVar = 2 << 0;// result 2 * 1 = 2

as so as myVar 4 << 0; and so on .

please someone Correct me if I am wrong ?

For Loop Problem And Property Assignment Of Object
Related to my other thread on retrieving object names from an array, I'm running into an issue where clips that are dynamically assigned names and attached to a "container" along with a _type property are getting caught up in for... loop being used to sort through all of the clips attached to "container".


PHP Code:



function collectAndSort() {    for (var obj in container) {        if (typeof container[obj] == "movieclip") {            whichType = container[obj]._type;            whichItem(whichType);            trace(whichType);        }    }} 




the whichItem function looks like this (nothing fancy):

PHP Code:



function whichItem (whichType){    //trace("whichItem function was called");    if (whichType == "1mc"){        unitItem.item_id = whichType;        unitItem.item_name = "Double Door Display";        unitItem.item_desc = "80 x 96 Display Frame"        unitItem.item_dimensions = "80 x 96";        unitItem.unit_price = 100;    }else if (whichType == "2mc"){        unitItem.item_id = whichType;        unitItem.item_name = "Single Door Display";        unitItem.item_desc = "42 x 96 Display Frame"        unitItem.item_dimensions = "42 x 96";        unitItem.unit_price = 85;    }else if (whichType == "3mc"){        unitItem.item_id = whichType;        unitItem.item_name = "Side Window Right";        unitItem.item_desc = "Side Window Panel With Right Window"        unitItem.item_dimensions = "30 x 96";        unitItem.unit_price = 150;    }else if (whichType == "4mc"){        unitItem.item_id = whichType;        unitItem.item_name = "Beam";        unitItem.item_desc = "Vertical Connector Beam"        unitItem.item_dimensions = "12 x 96";        unitItem.unit_price = 75;    }else if (whichType == "5mc"){        unitItem.item_id = whichType;        unitItem.item_name = "Side Window Left";        unitItem.item_desc = "Side Window Panel With Left Window"        unitItem.item_dimensions = "30 x 96";        unitItem.unit_price = 150;    }else if (whichType == "6mc"){        unitItem.item_id = whichType;        unitItem.item_name = "Shelf";        unitItem.item_desc = "Brochure Display Shelf"        unitItem.item_dimensions = "24 x 48";        unitItem.unit_price = 100;    }else if (whichType == "7mc"){        unitItem.item_id = whichType;        unitItem.item_name = "Poster Panel lg";        unitItem.item_desc = "Large Top Mounted Poster Panel"        unitItem.item_dimensions = "80 x 24";        unitItem.unit_price = 40;    }else if (whichType == "8mc"){        unitItem.item_id = whichType;        unitItem.item_name = "Poster Panel sm";        unitItem.item_desc = "Small Top Mounted Poster Panel"        unitItem.item_dimensions = "0 x 24";        unitItem.unit_price = 40;    }    _root.purchaseArray.push(unitItem);} 




And just for reference, here's how those pesky clips got there (again, posted in a previous thread):

PHP Code:



for (k=1; k<9; k++) {    this["btn"+k].kvar = k;    this["btn"+k].onPress = function() {        getclips(this.kvar);        trash.enabled = true;        btn_trash_all.enabled = true;    };}/******************************************************************************   Clip handling: attaching, dragging and also tracking (via "reportMe")    ******************************************************************************/   function getclips(l) {    clip = container.attachMovie(l+"mc", "mc"+i, i);    clip._type = l+"mc";// "_type" property used for clip type comparisons    reportMe = clip;    myType = reportMe._type;    //trace(reportMe._type);    addSubtotal(myType);    clip.k = l;    clip._x = 180;    clip._y = 180;    clip.onPress = doDrag;    clip.onRelease = clip.onReleaseOutside=noDrag;    cliparray.push(clip);    clip.ivar = i;    i++;} 




Now when I run it and attach a few clips, I get their proper _type, but whichType is assigned the same thing for each(?). Here's what I get in a trace after dragging out 3 clips and calling the collectAndSort function:

Code:
6mc
4mc
2mc
Single Door Display
Single Door Display
Single Door Display
clip 6mc, 4mc, and 2mc are correct but the matching for a text output via whichItem isn't and it's called in that for... loop. They shouldn't each be matched to "Single Door Display".
I'm thinking this needs to be approached differently but I don't have the option of writing out (php or whatever) and then reading back in to to split etc. (was reading the "best of" archives as saw a great one on this).

So, here's my tangled mess. I know that it is at least getting that far which is encouraging, just that the final sorting through to populate a text field as a purchase list gives me a match for the first clip attached (ie "Single Door Display").

Later edit....sorry forgot to mention that "Single Door Display" string comes from the unitItem.item_name property matched in the whichItem function (also shown above).

Can anybody help out a guy in over his head?

For Loop Problem And Property Assignment Of Object
Related to my other thread on retrieving object names from an array, I'm running into an issue where clips that are dynamically assigned names and attached to a "container" along with a _type property are getting caught up in for... loop being used to sort through all of the clips attached to "container".


PHP Code:



function collectAndSort() {    for (var obj in container) {        if (typeof container[obj] == "movieclip") {            whichType = container[obj]._type;            whichItem(whichType);            trace(whichType);        }    }} 




the whichItem function looks like this (nothing fancy):

PHP Code:



function whichItem (whichType){    //trace("whichItem function was called");    if (whichType == "1mc"){        unitItem.item_id = whichType;        unitItem.item_name = "Double Door Display";        unitItem.item_desc = "80 x 96 Display Frame"        unitItem.item_dimensions = "80 x 96";        unitItem.unit_price = 100;    }else if (whichType == "2mc"){        unitItem.item_id = whichType;        unitItem.item_name = "Single Door Display";        unitItem.item_desc = "42 x 96 Display Frame"        unitItem.item_dimensions = "42 x 96";        unitItem.unit_price = 85;    }else if (whichType == "3mc"){        unitItem.item_id = whichType;        unitItem.item_name = "Side Window Right";        unitItem.item_desc = "Side Window Panel With Right Window"        unitItem.item_dimensions = "30 x 96";        unitItem.unit_price = 150;    }else if (whichType == "4mc"){        unitItem.item_id = whichType;        unitItem.item_name = "Beam";        unitItem.item_desc = "Vertical Connector Beam"        unitItem.item_dimensions = "12 x 96";        unitItem.unit_price = 75;    }else if (whichType == "5mc"){        unitItem.item_id = whichType;        unitItem.item_name = "Side Window Left";        unitItem.item_desc = "Side Window Panel With Left Window"        unitItem.item_dimensions = "30 x 96";        unitItem.unit_price = 150;    }else if (whichType == "6mc"){        unitItem.item_id = whichType;        unitItem.item_name = "Shelf";        unitItem.item_desc = "Brochure Display Shelf"        unitItem.item_dimensions = "24 x 48";        unitItem.unit_price = 100;    }else if (whichType == "7mc"){        unitItem.item_id = whichType;        unitItem.item_name = "Poster Panel lg";        unitItem.item_desc = "Large Top Mounted Poster Panel"        unitItem.item_dimensions = "80 x 24";        unitItem.unit_price = 40;    }else if (whichType == "8mc"){        unitItem.item_id = whichType;        unitItem.item_name = "Poster Panel sm";        unitItem.item_desc = "Small Top Mounted Poster Panel"        unitItem.item_dimensions = "0 x 24";        unitItem.unit_price = 40;    }    _root.purchaseArray.push(unitItem);} 




And just for reference, here's how those pesky clips got there (again, posted in a previous thread):

PHP Code:



for (k=1; k<9; k++) {    this["btn"+k].kvar = k;    this["btn"+k].onPress = function() {        getclips(this.kvar);        trash.enabled = true;        btn_trash_all.enabled = true;    };}/******************************************************************************   Clip handling: attaching, dragging and also tracking (via "reportMe")    ******************************************************************************/   function getclips(l) {    clip = container.attachMovie(l+"mc", "mc"+i, i);    clip._type = l+"mc";// "_type" property used for clip type comparisons    reportMe = clip;    myType = reportMe._type;    //trace(reportMe._type);    addSubtotal(myType);    clip.k = l;    clip._x = 180;    clip._y = 180;    clip.onPress = doDrag;    clip.onRelease = clip.onReleaseOutside=noDrag;    cliparray.push(clip);    clip.ivar = i;    i++;} 




Now when I run it and attach a few clips, I get their proper _type, but whichType is assigned the same thing for each(?). Here's what I get in a trace after dragging out 3 clips and calling the collectAndSort function:

Code:
6mc
4mc
2mc
Single Door Display
Single Door Display
Single Door Display
clip 6mc, 4mc, and 2mc are correct but the matching for a text output via whichItem isn't and it's called in that for... loop. They shouldn't each be matched to "Single Door Display".
I'm thinking this needs to be approached differently but I don't have the option of writing out (php or whatever) and then reading back in to to split etc. (was reading the "best of" archives as saw a great one on this).

So, here's my tangled mess. I know that it is at least getting that far which is encouraging, just that the final sorting through to populate a text field as a purchase list gives me a match for the first clip attached (ie "Single Door Display").

Later edit....sorry forgot to mention that "Single Door Display" string comes from the unitItem.item_name property matched in the whichItem function (also shown above).

Can anybody help out a guy in over his head?

Can Not Get Rid Of Margins On Left Side And Top
I am having problems with the margins. My flash Movie always comes up with a small margin on the left side and top. I know there is a way to get rid of this but I can not seem to figure it out. If you know could you help me out..

Thanks
Dave

Concatenating The Left Side .. ?
is there a way to concatenate the left side of any line of actionscript? i'm able to do it using the old set() variable operation. like this:

Code:
set("_root.myClip"+i+".name", 2);
but how do you do it with any line of actionscript? this won't work, for example:

Code:
set("mySO.data.clip"+i+"name", eval("_root.clip"+i+"name"));
and you can't do anything like this either:

Code:
eval("mySO.data.clip"+i+"name")= eval("_root.clip"+i+"name");
any suggestions?

Left Side Operators
Okay, I know that in Flash 5 the following was okay:

eval("/:var1" add "/:var2") = /:varWhatever;



But in MX I get the error:

Left side of assignment operator must be variable or property.







I've never read anything about remedying this. Any suggestions? I'm sure it's something stupidly simple

Why Load Movie Always Come Out From Top-left Side?
hi guys, can anyone help me this irritating problem? i wanna use the loadmovie to load swf file, but the problem is i am frustrated by the situation that the movie alway come out from top-left of the movie screen and than steady at the position i set for it. so may i know how to make it come out at certain position which is controlable.

Vertical Scrollbar On The Left Side?
Does anyone know if it's possible to position the vertical scrollbar of a text area component to the left?

I'm using Flash MX 2004 Professional.

Thanks!

Find Left/right Side Of Movieclip
Hi All,

Can anyone tell me if there is a way with actionscript to determine the right and left side of a movie clip? I have a row of dynamiclly loaded pictures that load into a movieclip and then have arrows that scroll the photos left and right using an interval and _x +=10. The scroll works great. Only problem is, it just goes on and on and on if you keep pressing the arrow. Is there any way to tell it where the left and right side are and not to let either side go past a certain point. sorry for the long winded question.

thanks in advance!

Vertical Scrollbar On The Left Side?
Does anyone know if it's possible to position the vertical scrollbar of a text area component to the left?

I'm using Flash MX 2004 Professional.

Thanks!

OnRollOut On The Left Or Right Side Of A Button Only?
Hello,

i'm kinda new with Flash and i'm trying to work out a popup-menu.
I've been at it for over two months and it still doesn't work properly.
Last sunday i got, so to say, a revelation: i've been using buttons in buttons, and all of the sudden i figured out i should be entering each button with it's own popup in a separate frame.
It's actually quite simple (oh yes, now it is!).

But i still got one hurd to overtake.
When i move the cursor over the fist popup-button, my popup-balloons popup , like intended and when i move it sideways over to the next button, the ballons just stay put.
So i first have to go over the invisible button-area en roll out before they disapear and i can open a new popup and so on...

Is it possible for me to make some kind of 'onRollOut' for only the left and right sides of the main buttons?

If anyone has a clue how to do this or if you got another solution, your welcome.

My .fla-file can be found here:
http://www.serelsnauw.nl/users/marcel/balloon-menu.rar

Marcel.

Little Space At The Left Side Of New Popup Window
i followed the steps from the tutorial http://www.flashkit.com/tutorials/Ac...-708/index.php

but now my question is;
when i put the swf file in the popup.html then theres always a little space at the left site.
how can i get rid of this?

http://www.au-crew.de.vu
then click on movies plz and you will see...

thx

[MX] Drop Down Menu - No Line On Left Side
Hi,

I'm making a drop down menu and I've been fooling aropund with it for awhile now. Everythi8ng works fine except I can't get the mask to go over a white line that I have in the drop down.


Can anyone help me with figuring out why I can't just pull the mask over?

Thanks,
Bmcc81

Question About Variables In Left Side Of Statement
Ok, I have 5 movie clips (DEAL1 through DEAL5), each containing a loader box (ImageLoader1 through 5) which loads an image in each. These 5 images can then be flipped through like a slideshow. All that is good and works fine, pulling the filenames from an XML file:


Code:
IMAGE1=allData[0].attributes.ImageFilename;
// That line is repeated for IMAGE2 thru IMAGE5
But then I wanted the slideshow to start on a random frame, which I did with this on frame 1:


Code:
// Start on a random frame
TheNumber = Number(random(6))+1;
if (TheNumber == 1)
{
gotoAndStop(2)
}
else { gotoAndStop(_root.TheNumber) };
So in order to get the first image to load, I need to match the random starting frame number with the MC number (DEAL#), loader (ImageLoader#), and filename from the XML file (IMAGE#.jpg)... so I wanted to transform this:


Code:
DEAL1.ImageLoader1.contentPath = "DealImages/"+IMAGE1+".jpg";
DEAL2.ImageLoader2.contentPath = "DealImages/"+IMAGE2+".jpg";
DEAL3.ImageLoader3.contentPath = "DealImages/"+IMAGE3+".jpg";
DEAL4.ImageLoader4.contentPath = "DealImages/"+IMAGE4+".jpg";
DEAL5.ImageLoader5.contentPath = "DealImages/"+IMAGE5+".jpg";
into something like this:


Code:
ImgNum = TheNumber - 1;
var DealNum = "DEAL"+ImgNum;
var LoaderNum = "ImageLoader"+ImgNum;

DealNum.LoaderNum.contentPath = "DealImages/IMAGE"+ImgNum+".jpg";
... only this doesn't work. I can trace ImgNum, DealNum, and LoaderNum just fine... but put into the LEFT SIDE of the statement, DealNum.LoaderNum.contentPath is undefined. Is there a way to set those to work? Thanks!

Left Side Navigation Tree In Flash
Hi,

Can anyone please send me a tutorial file for a Javascript Tree like navigation in Flash? I can do that in javascript but dont know how to do that in Flash.
Any flash file would be greatly appreciated.

Happy new year to all.

Flash Effect On Left Side Of The Page
It is possible to do this effect http://www.pramasteel.ro/ in flash only by working frame by frame?

Left Side Navigation Tree In Flash
Hi,

Can anyone please send me a tutorial file for a Javascript Tree like navigation in Flash? I can do that in javascript but dont know how to do that in Flash.
Any flash file would be greatly appreciated.

Happy new year to all.

Why Can I Not Animate Rectangular Image To Move Left Side To Right?
Hello
I have a rectangle and i want to animate it so that the left side is moved right until the middle of the rectangle. It seems to only want to animate it so that the left side moves right and the right side moves left, at the same time

even if i drag the white dot in the middle of the rectangle, then it correctly lets me drag the left side into the centre, but when i add the motion tween it just ruins the animated so do a shrinking into itself affect

how can i achieve this?

Flash Blinks On The Left Side Of My Screen When I Use Mozilla.
If you go to http://www.womenswallstreet.com/ and you use a mozilla browser you will see flash animations blinking on the left side of the page.
I realized that this looks like a javascript issue as when I disable javascript on the page, the blinking disappears.

Does anyone have thoughts on what is happening?

Thank you.

Can I Move The Stage To The Left Side Of The Flash MX Working Area?
Hello,
Is that possible to move the Stage to the beginning of the left side of the working area in Flash MX? I have a very long movie clip(4200px wide)which actually starts out the stage of the right side. I cannot include all content because the of stage area allows me to use something not longer than 2880px wide. I am wondering if there are any settings for that or I can move the stage itself to the left side since I am not using that side.

Any ideas are highly appreciated.
Thank you in advance!

[F8] Operator '=' Followed By An Operand - Error
Hi,
I'm getting the following code error and can't figure out why so was hoping someone else might be able to shed some light on the issue:

Error msg:

Quote:




**Error** Scene=Scene 1, layer=actions, frame=1:Line 134: Operator '=' must be followed by an operand
trace("You pressed this item : " + evt_obj.target.selectedIndex);

**Error** Scene=Scene 1, layer=actions, frame=1:Line 135: Syntax error.
ns.play(tabInfo[evt_obj.target.selectedIndex].flv);

Total ActionScript Errors: 2 Reported Errors: 2




Code triggering error:

Code:
131: var changeListener:Object = new Object();
132: changeListener.change = function(evt_obj:Object)
133: {
134: trace("You pressed this item : " + evt_obj.target.selectedIndex);
135: ns.play(tabInfo[evt_obj.target.selectedIndex].flv);
136: };
137: tab_dg.addEventListener("change", changeListener);
Any advice is appreciated,
Thanks

Operator '=' Must Be Followed By An Operand - Error?
Hello.. I am using Flash 8, and I'm new to actionscript and Kirupa forums.



Problem: Everytime I try and test my mp3 player, I get these errors on output:

**Error** C:Documents and SettingsAdminMy DocumentsProjectsgotoandlearnmp3Player1mp3Play er.as: Line 49: Operator '=' must be followed by an operand
next.onRollOut = next.onReleaseOutside = ()

**Error** C:Documents and SettingsAdminMy DocumentsProjectsgotoandlearnmp3Player1mp3Play er.as: Line 50: ')' expected
{
Total ActionScript Errors: 2 Reported Errors: 2
----------------

Here's the .as script:

// Sound object
var s:Sound = new Sound();
s.onSoundComplete = playSong;
s.setVolume(75);
// Array of songs
var sa:Array = new Array();
// Currently playing song
var cps:Number = -1;
//Position of music
var pos:Number;

// Load the songs XML
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function()
{
var nodes:Array = this.firstChild.childNodes;
for(var i=0;i<nodes.length;i++)
{
sa.push(nodes[i].attributes.url);
}
playSong();
}
xml.load("songs.xml");
// Play the MP3 File
function playSong():Void
{
s = new Sound();
if(cps == sa.length - 1)
{
cps = 0;
s.loadSound(sa[cps], true);
}
else
{
s.loadSound(sa[++cps], true);
}
playPause.gotoAndStop("pause");
}
//Pauses the music
function pauseIt():Void
{
pos = s.position;
s.stop();
}
//Pauses the music
function unPauseIt():Void
{
s.start(pos/1000);
}
//Music Controls
//Play/Pause Toggle
playPause.onRollOver = function()
{
if(this._currentframe == 1)this.gotoAndStop("pauseOver");
else this.gotoAndStop("playOver");
}
playPause.onRollOut = playPause.onReleaseOutside = function()
{
if(this._currentframe == 10) this.gotoAndStop("pause");
else this.gotoAndStop("play");
}
playPause.onRelease = function()
{
if(this._currentframe == 10)
{
this.gotoAndStop("playOver");
this._parent.pauseIt();
}
else
{
this.gotoAndStop ("pauseOver");
this._parent.unPauseIt();
}
}
//Next Button
next.onRollOver = function()
{
this.gotoAndStop("nextOver");
}
next.onRollOut = next.onReleaseOutside = function()
{
this.gotoAndStop("next");
}
next.onRelease = function()
{
this._parent.playSong();
}



If someone can point out my error, I'd appreciate it.. Thanks.

Operator '=' Followed Operand - Error
Hi,
I'm getting the following code error and can't figure out why so was hoping someone else might be able to shed some light on the issue:

Error msg:
**Error** Scene=Scene 1, layer=actions, frame=1:Line 134: Operator '=' must be followed by an operand
      trace("You pressed this item : " + evt_obj.target.selectedIndex);

**Error** Scene=Scene 1, layer=actions, frame=1:Line 135: Syntax error.
      ns.play(tabInfo[evt_obj.target.selectedIndex].flv);

Total ActionScript Errors: 2 Reported Errors: 2

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