A Flash Developer Resource Site

Results 1 to 20 of 21

Thread: Angel?

Hybrid View

  1. #1
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    if(angel=true) - typical newbie mistake

    angel will always be true !! -- use ==

  2. #2
    poet and narcisist argonauta's Avatar
    Join Date
    Nov 2001
    Location
    Under the bed
    Posts
    2,080
    Quote Originally Posted by a_modified_dog
    if(angel=true) - typical newbie mistake

    angel will always be true !! -- use ==
    actually, probably just if(angel) is better, considering angel wouldn't be
    a boolean, but an object.

    in terms of namig, it'd be better to name alienporn alienPorn, and it's a bad idea to create a variable inside an if condition, as when you need the var, you won't know if it got created (if the condition was true), and if it's going to be used, it should always contain a value. So maybe it'd be better to use

    alienPorn=(angel)? 'why not?':'';
    my blog: blog.innocuo
    Sponsored by your mom.

  3. #3
    Retired SCORM Guru PAlexC's Avatar
    Join Date
    Nov 2000
    Location
    NJ
    Posts
    1,387
    Quote Originally Posted by argonauta
    actually, probably just if(angel) is better, considering angel wouldn't be
    a boolean, but an object.

    in terms of namig, it'd be better to name alienporn alienPorn, and it's a bad idea to create a variable inside an if condition, as when you need the var, you won't know if it got created (if the condition was true), and if it's going to be used, it should always contain a value. So maybe it'd be better to use

    alienPorn=(angel)? 'why not?':'';
    No dude, you've got it wrong. Alien is a type of porn, a subclass. You need something more like this:

    if (pornObj.type == "alien") {
    // do stuff here
    }

    I mean, if we really want to get strict about it, there should be a pornTypeCatalog object that we can call and search for ALL types of porn that fit the "alien" descriptor. The example aboves assumes just one, and anyone who's spent time on the internet knows that's too limiting.

    var alienPornTypes = new Array();
    alienPornTypes = pornTypeCatalog.getTypeFromDescriptor("alien");

    for (var i=0; i<alienPornTypes.length; i++) {
    alienPornTypes[i]=(angel)? 'why not?':''
    }

    More overhead, but we need to be thorough about managing and sorting our classifications of porn.
    Last edited by PAlexC; 12-29-2008 at 09:22 PM.
    "What really bugs me is that my mom had the audacity to call Flash Kit a bunch of 'inept jack-asses'." - sk8Krog
    ...and now I have tape all over my face.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center