dcsimg
A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 26 of 26

Thread: rollover fades

  1. #21
    Junior Member
    Join Date
    Apr 2005
    Location
    santa barbara
    Posts
    13
    i couldn't find the title object under the target icon. but i'm sure it's not in a movie clip. and the other method didn't work for me either. so i'm just going to make the file available and if you want to look at it, you can. A cut-down version is located at:

    tour file (4Mb - not sure why, the full version is smaller)

    I'm using the original MX version of DW. The rollover code is located on the "subscriber movie" layer and the button code is on the "back button" layer located down with the different "rick" layers.

    thanks!

  2. #22
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    Hi,

    I think I see the problem. Your using different textfields for each person. You would need to set each individuals textfield to "". Your also using the variable name instead of the instance name for each textfield. It is a better practice to use instance names. I tend to only use variable names for a textfield when using backend scripting while applying text to a textfield with the instance name.For a quick fix...Change the variable names for each textfield to instance names. The button rollOver and rollOut code for each button would look like....
    code:

    _root.rick.onRollOver = function() {
    _root.ricktitle.text = "JOE, Sports Enthusiast";
    _root.diannetitle.text = "";
    _root.bobtitle.text = "";
    _root.marcustitle.text = "";
    _root.saratitle.text = "";
    this._alpha = 100;
    _root.dianne._alpha = 15;
    _root.bob._alpha = 15;
    _root.marcus._alpha = 15;
    _root.sara._alpha = 15;
    }
    _root.rick.onRollOut = function() {
    _root.ricktitle.text = "";
    this._alpha = 100;
    _root.dianne._alpha = 100;
    _root.bob._alpha = 100;
    _root.marcus._alpha = 100;
    _root.sara._alpha = 100;
    }



    That should be a quick fix to your project and give you a bit of insight as to using instance names over variable names for textfields. With that said, overall project organization might be a bit simplified if you used a single textfield and populated that textfield based on character rollover. For example, a single textfield with an if statement....
    code:

    this.onEnterFrame=function(){
    if(myCharacter=="rick"){
    myTextfield.text="Rick rocks!";
    }else if(myCharacter="dianne"){
    myTextfield.text="Diane sure can dance!";
    }else if(myCharacter="NTD"){
    myTextfield.text="NTD sure can't dance!";
    }
    }


    Then, either from frame or object code, for simple demo..... object code....
    code:

    on(rollOver){
    myCharacter="rick";
    }


    Since your project is near completion, I would just adjust the instance names of the textfields and target those with your rollOver and rollOut code. I didn't look very deeply, but if you have trouble modifying the file, post back and I will take a closer look.

    hope it helps
    NTD

  3. #23
    Junior Member
    Join Date
    Apr 2005
    Location
    santa barbara
    Posts
    13
    i added _root to all the areas you mentioned. but when i changed the variable name to an instance name, the titles disappeared altogether.

    an updated file is on the server...

    thanks!

    BTW, do you ever sleep?

  4. #24
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    Hi,

    I can't get anything done if I sleep all the time!

    Here is a quick demo of updating the textfields with instance names and applying the text to each textfield with the ".text" property.

    One other thing, I was overusing "_root" as a demo for path finding. If your content is on the main timeline, _root is implied automatically so you dont really need it in the code. It is a useful reminder of how paths work though....

    _root...... main timeline(_level0 is also the main timeline)

    _root.someMC........ movieclip timeline

    _root.someMC.someOtherMC........... movieclip timeline embedded in another MC.

    http://ntdesigns.net/quickDemo/whosubscribeUpdated.fla

    hope it helps
    NTD
    Last edited by NTD; 04-14-2005 at 05:12 PM.

  5. #25
    Junior Member
    Join Date
    Apr 2005
    Location
    santa barbara
    Posts
    13
    THANK YOU...THANK YOU....THANK YOU!!

    I'll have to look closer to see what you actually did. But I'm SOOOO glad i can put this project to bed finally.

    kisses!!!

  6. #26
    Banned NTD's Avatar
    Join Date
    Feb 2004
    Posts
    3,438
    Happy to help

    keep on flashin
    NTD

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