dcsimg
A Flash Developer Resource Site

Results 1 to 13 of 13

Thread: Dynamic Text Invisible

  1. #1
    I can customize my title now
    Join Date
    May 2003
    Location
    Denton, TX
    Posts
    248

    Dynamic Text Invisible

    Why is it that when I place dynamic text into a movie clip it doesn't work. I just copy and paste it from the root where it does work. How can I get around that?

    I need the text to load into this text box that will be inside a movieclip scroller.

  2. #2
    Between Flash & Flashkit timothye's Avatar
    Join Date
    Dec 2003
    Location
    Sweden
    Posts
    1,666
    so hhow are you loading this text indie this mc ?
    loadVars (),
    or ?
    and what is the instance name of the textField .?
    cheers
    I want to learn .
    wannabe flasher [ Actionscript 2.0 ]

  3. #3
    I can customize my title now
    Join Date
    May 2003
    Location
    Denton, TX
    Posts
    248
    Frame 1:
    Code:
    var myVars = new LoadVars();
    myVars.onLoad = function(ok) {
    	if (ok) {
    		holdermc.box1.text = myVars.var1;
    		holdermc.box2.text = myVars.var2;
    	}
    };
    myVars.load("data.asp");
    Frame 1 holdermc movie clip:
    Code:
    onClipEvent (data) {
    	Software = Software;
    	Numbers = Numbers;
    }
    onClipEvent (load) {
    	loadVariables("data.asp", this);
    }
    Insde holdermc movieclip are two text fields: variable names = Software & Numbers. No instance names.


    All works well in this format.

    However, I want to bury it sort of deep in this scroller I've got.
    http://www.coe.unt.edu/gal/newsites/flash/software.swf

  4. #4
    OOP is one letter from OOPS kortex's Avatar
    Join Date
    Aug 2005
    Location
    New Hope, PA
    Posts
    2,668
    How are you setting the text with no intance names. Did you set a variable for the textfields?
    Jeremy Wischusen
    Flash - Flex - LAMP - Web Developer Purple Inc
    AS OOP FAQ-Best Practices Thread | Flashkit OOP Tutorials | Purple Inc (day job) | Blog


  5. #5
    I can customize my title now
    Join Date
    May 2003
    Location
    Denton, TX
    Posts
    248
    Yeah, totally sorry...forgot to paste that.

    Code:
    onEnterFrame = function () {
    	var software_array = Software.split("|");
    	var numbers_array = Numbers.split("|");
    	
    	Software = "";
    	Numbers = "";
    	for(var i=0;i<software_array.length && i<numbers_array.length;i++) {
    	   Software = Software + software_array[i] + "\n";
    	   Numbers = Numbers + numbers_array[i] + "\n";
    	}
    };

  6. #6
    OOP is one letter from OOPS kortex's Avatar
    Join Date
    Aug 2005
    Location
    New Hope, PA
    Posts
    2,668
    You are doing this on enter frame? It may just be that you are updating so often you never get to see the text since it would try to update everytime the clip enetered a frame. Not sure if this is it.

    Also, can I assume that in the properties panel for these text fields that you have them set to dynamic and you have specified that the value for the text is "Software" for one and "Numbers" for the other in the variable field?

    Otherwise, I dont see where you are telling the textfields to display any text.
    Jeremy Wischusen
    Flash - Flex - LAMP - Web Developer Purple Inc
    AS OOP FAQ-Best Practices Thread | Flashkit OOP Tutorials | Purple Inc (day job) | Blog


  7. #7
    I can customize my title now
    Join Date
    May 2003
    Location
    Denton, TX
    Posts
    248
    I attached the file I'm working with.

    Both text fields are labeled with the correct variable names. The enter frame idea may just be what I need to change. I'll check it out.
    Attached Files Attached Files

  8. #8
    OOP is one letter from OOPS kortex's Avatar
    Join Date
    Aug 2005
    Location
    New Hope, PA
    Posts
    2,668
    Without the data.asp i dont get to see much.
    Jeremy Wischusen
    Flash - Flex - LAMP - Web Developer Purple Inc
    AS OOP FAQ-Best Practices Thread | Flashkit OOP Tutorials | Purple Inc (day job) | Blog


  9. #9
    I can customize my title now
    Join Date
    May 2003
    Location
    Denton, TX
    Posts
    248
    Code:
    <%
        Set DataConn = Server.CreateObject("ADODB.Connection")
        DataConn.Open "Driver=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("software.mdb")
    
        Set cmdTemp = Server.CreateObject("ADODB.Command")
        Set rstSoftwareList = Server.CreateObject("ADODB.Recordset")
    
        cmdTemp.CommandText = "Select * From SoftwareList"
        cmdTemp.CommandType = 1
        Set cmdTemp.ActiveConnection = DataConn
    
        rstSoftwareList.Open cmdTemp, , 1, 3
    
        rstSoftwareList.Move CLng(Request("Record"))
    	
    	if not rstSoftwareList.eof then
    	software=Server.URLEncode(rstSoftwareList("Software"))
    	numbers=Server.URLEncode(rstSoftwareList("numbers"))
    	end if
    	
    	do while not rstSoftwareList.eof
        software=software& "|" &Server.URLEncode(rstSoftwareList("Software"))
        numbers=numbers& "|" &Server.URLEncode(rstSoftwareList("numbers"))
    	rstSoftwareList.MoveNext
    	loop    
        
        Response.write "Software=" & software & "&"
        Response.write "Numbers=" & numbers & "&"
        
        rstSoftwareList.Close
        DataConn.Close
    %>

  10. #10
    I can customize my title now
    Join Date
    May 2003
    Location
    Denton, TX
    Posts
    248
    I've got to head out right now, so I hope I've given you everything I can. I really really appreciate your help. Thanks a lot.

  11. #11
    OOP is one letter from OOPS kortex's Avatar
    Join Date
    Aug 2005
    Location
    New Hope, PA
    Posts
    2,668
    LOL, ok so you are connecting to a database with ASP. Well without the database, then even the ASP will do me no good.

    I looked at the texfield. You seem to have the variables correct. You had an instance name for numbers, but not one for software, not that it sould make a difference since you set the variables. I would look into the enter frame thing as you may just be updating it too often.
    Jeremy Wischusen
    Flash - Flex - LAMP - Web Developer Purple Inc
    AS OOP FAQ-Best Practices Thread | Flashkit OOP Tutorials | Purple Inc (day job) | Blog


  12. #12
    I can customize my title now
    Join Date
    May 2003
    Location
    Denton, TX
    Posts
    248
    But it just doesn't make sense that everything loads correctly outside of the moveclip. You shouldn't need the database because there is proof that it works...just not inside of another movie clip.

  13. #13
    OOP is one letter from OOPS kortex's Avatar
    Join Date
    Aug 2005
    Location
    New Hope, PA
    Posts
    2,668
    wait wait on what level are these variables declared the _root? Change the variable values in the properties panel to _root.Software and _root.Numbers since the clip is nested it is probably looking for the variables within the clip and not on the root.
    Jeremy Wischusen
    Flash - Flex - LAMP - Web Developer Purple Inc
    AS OOP FAQ-Best Practices Thread | Flashkit OOP Tutorials | Purple Inc (day job) | Blog


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