TwelvestoneFlash

eval(0)


Sign in

  • Waiting for Godot ( 720 k posts )
    Just conversation.
  • Thunder Dome ( 23 k posts )
    Photoshop Tennis and Collabs.
  • Photography ( 4.8 k posts )
    For all you shutterbugs, sh...
  • Flash ( 18 k posts )
    ActionScripting to tweens, ...
  • Front End ( 5.8 k posts )
    general front end design an...
  • Back End ( 9.6 k posts )
    serverside scripting, progr...
  • Projects and Theory ( 12 k posts )
    This forum is for discussio...
  • FAQ ( 269 posts )
    All those nagging questions...
  • Design ( 17 k posts )
    graphics & all aspects of g...
  • Purgatory ( 3.6 k posts )
    12stone Jail, feel free to ...
Big Ern
 
2007-12-04

Right now, I am sending a number of variables to flash from my php file using swfobject. The variables I am sending are like the following...

so.addVariable("val1", "6"); so.addVariable("val2", "3"); so.addVariable("val3", "0"); so.addVariable("val4", "9"); and so on...

In my flash file I am looping through the variables like so:

for(var i=1;i<=nbrSections;i++) { var segVal = eval(pClip + ".val" + i); }

It works beautifully except for val3. In other words, whenever the value of the variable is zero, eval pukes.

Is there any way to get it to accept zero? Or do it another way?

all help appreciated

persist
 
2007-12-04

I'd be a little suspect of swfObject in this case.

However you might try

          var segVal = pClip["val" + i];
Big Ern
 
2007-12-04

um... nevermind... it was the next line that was screwing up.

D'oh.

One of these days, I'll put a problem in the Flash forum that doesn't make me look like an ass.

Don't hold your breath k

Thanks anyway, P.

Sorry, you must be a member to post to a conversation. Either log in or sign up to get involved.
TwelvestoneFlash

eval(0)