PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
Code Problem
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Code Problem

  1. #1
    Registered User
    Join Date
    Dec 2010

    Code Problem


    I am having a problem with this. The code only works for one of the more links on the page. When I click on the other they all show the same text. How would I change the text to open with different text. Hope that makes sense.

    on(rollOut, releaseOutside){gotoAndPlay(11);}
    on (release) {
    _root.scrHEIGHT = 240;
    _root.scroller._x = 250;
    _root.scroller._y = 300.69999999999999;
    _root.TM_title = "Latest News";
    _root.READ = 1;

  2. #2
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    press the picture...
    Moved to AS2 forum.
    - The right of the People to create Flash movies shall not be infringed. -
    | | Flashscript Biz Classes/Components |

  3. #3
    Member Pepember
    Join Date
    Jul 2001
    one possibility: you could have all your texts in an array. then all your buttons have a var called "itemNum" that goes from 0 to x and corresponds with the text in the array. you then fill the text field in your scroller with the respective text.
    Actionscript Code:
    _root.allTexts = ["text1", "text2", "text3"];
    button01.itemNum = 0;
    button02.itemNum = 1;
    button03.itemNum = 2;

    button01.onRelease = function(){
    // put all you stuff here, plus:
    _root.scroller.yourTextFieldName.text = _root.allTexts[this.itemNum];
    Please sign here

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