dcsimg
A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: [RESOLVED] CS5 problem with textfields on stage

  1. #1
    Member
    Join Date
    Sep 2009
    Posts
    88

    resolved [RESOLVED] CS5 problem with textfields on stage

    I'll try to keep it simple, here's what I have:

    map // Symbol of MovieClip
    map.a1 // Symbol of Button nested in map
    map.a1.t // TextField nested in the Button

    stop();
    trace(map);
    trace(map.a1);
    trace(map.a1.t);

    [object MovieClip]
    [object Area_6]
    null

    I don't get why it says object Area_6, I do use "Area" for button names in library but never used that 6, it should just be an object Button or something no?

    Secondly, why the textfield stays null? I had a error #1009 when I coded on the same frame as where the stuff on stage is put, so I put the code on next frame and see if error would be gone, which worked, but textfields stay null?? Has anyone got through that problem or have a solution?

  2. #2
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    What datatype is your button?
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  3. #3
    Member
    Join Date
    Sep 2009
    Posts
    88
    I'm not sure if that's what you mean by data type but the button doesn't have a class made from me, it is from "F8" -> convert to symbol -> button

    Then inside that button I've put a text field and a shape

  4. #4
    Junior Member
    Join Date
    Jun 2010
    Posts
    7
    You need to create a class for your movie clips...



    When you hit F8 to change that button into a movieclip, you notice in the picture it is called Button1. When you output it it should now come out as [object Button1].

    If you don't assign a class flash will make weird names up.

  5. #5
    Member
    Join Date
    Sep 2009
    Posts
    88
    Hmmm... after switching the Button to a MC, now it works. Buttons cannot have a tf as a child? Or what am I not understanding? :s

  6. #6
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    Quote Originally Posted by ArenaFlash View Post
    Hmmm... after switching the Button to a MC, now it works. Buttons cannot have a tf as a child? Or what am I not understanding? :s
    That is why I asked about DataType. An object inside a button from the SimpleButton class cannot be accessed.
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  7. #7
    Member
    Join Date
    Sep 2009
    Posts
    88
    Alright so I'm gonna have to change 30 of those buttons into movieclips then have to buttonmode true to all of them.... small problem fixed with a long and un-instinctive solution :/

    Flash is so troublesome to work with sometimes, couldn't it give me that "An object inside a button from the SimpleButton class cannot be accessed" instead of the helpless general error 1009?

    1 day of coding lost over that :s

    edit: thanks btw cancerinform
    Last edited by ArenaFlash; 06-20-2010 at 08:05 PM.

  8. #8
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    ...but in the end you are rewarded by a nice movie.
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

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