A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Please someone i need urgent help with a flash mx component

  1. #1
    Junior Member
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    24

    Please someone i need urgent help with a flash mx component

    Hello everyone,
    I really need some urgent help with a flash MX component problem. I have been trying to overcome this problem for over a month now and i have had no luck. If someone is able to help me with this i will be extremely greatfull!

    on to the problem. For a site i have been working on lately i made a navigation system but i copy and pasted instances of the original button so that i didnt have to keep making a new button. But when i did this whenever i made a change to one button it made changes to all of them. To overcome this i had some help from a mate of mine to make a component that i can add a dynamic text label to the button. This worked well but then i came across the problem of adding load movieclip function to each of the buttons. When i add it to one button it adds it to all of them. What i would like to do is somehow add a bit of code to the component that will allow me to add a dynamic load movie clip actionscript. I have pictures of each part of the component so that you guys can see what im talking about i have you will see in screenshot 2 there is the code for the component.







    Also i have copied and pasted the actionscript for the component so you guys might be able to edit it and add the part that i need.

    #initclip
    JonBurkeButtonClass = function () { this.setlabel(this.labelText);};
    JonBurkeButtonClass.prototype = new MovieClip();
    Object.registerClass("JonBurkeButtonSymbol", JonBurkeButtonClass);
    JonBurkeButtonClass.prototype.setLabel = function(label) {
    this.label.text = label;
    };
    #endinitclip


    Thankyou for takign the time to read my post. I hope that you guys can help me.

  2. #2
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food ™
    Posts
    3,789
    do each of the buttons have different instance names?

  3. #3
    Senior Bumbler
    Join Date
    Dec 2000
    Posts
    522
    Wrap an unlabelled button in a movie clip. Place a dynamic textfield over the button symbol. Then use the instance name for both the label and in related actions:
    Code:
    //Action on the movie clip load event
    onClipEvent (load) {
    	btnLabel = this._name;
    }
    
    //==========================================
    
    //Action on the button event
    //You could also use it like -- loadMovie(this._name + ".swf");
    on (release) {
    	_root.txt = this._name;
    
    }

    .fla is attached
    Attached Files Attached Files
    Easy Popup Windows 3.0 (For MX) Easy Popup Windows 2.5.2 (For Flash 5)

    Quit hassling with javascript popup windows. Basic, centered and fullscreen! Over 150,000 users.

  4. #4
    Junior Member
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    24

    Thank you

    Thankyou very much. Its all fixed now. I should of though of coming to you guys at the start instead of wasting alot of time trying to confugure the component.

  5. #5
    Junior Member
    Join Date
    Feb 2003
    Location
    Australia
    Posts
    24

    OHhhhhhh damn im back again hahaha

    Im back again. My uncle wants me to make the go to and play frame script instead of load movie clip. So i was thinking maybe i could name the frame of each of my sections and somehow make the instance name be the frame name to go and play or something. I dont know if this is makign any sense. But please try to help.

    Thankyou

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