Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Invisible text and loadMovie?

Posted on 2004-09-20
12
Medium Priority
?
352 Views
Last Modified: 2012-08-13
I've created (with a little tutorial help : ) this nifty this CGI input form. It works great on it's own.
I'm having trouble when I load it into another movie. I can't see the input text....it's invisible? The form can still be submitted and the info still gets sent? My fonts are embedded. Any ideas? Thanks.



var feedbackForm:LoadVars = new LoadVars();

function sendForm() {
      feedbackForm.recipient = "my@email.com";
      feedbackForm.realname = contactForm.userName.text;
      feedbackForm.email = contactForm.userEmail.text;
      feedbackForm.comments = contactForm.userComments.text;
      
      feedbackForm.send("/cgi-bin/formmail", "_blank", "POST");
      
}



_global.style.setStyle("fontFamily", "Helvetica-Narrow");
_global.style.setStyle("fontWeight", "bold");
_global.style.setStyle("embedFonts", true);
_global.style.setStyle("fontSize", 14);
_global.style.setStyle("color", 0x000000);



this.contactForm.submitBtn.btnLabel.autoSize = "center";
this.contactForm.submitBtn.btnLabel.text = "submit";

// on RollOver
this.contactForm.submitBtn.onRollOver = function() {
      contactForm.submitBtn.gotoAndStop (2);
}

//onRollOut
this.contactForm.submitBtn.onRollOut = function() {
      contactForm.submitBtn.gotoAndStop (1);
}

//onRelease
this.contactForm.submitBtn.onRelease = function() {
      if (contactForm.userName.text == "" || contactForm.userEmail.text == "" || contactForm.userComments.text == "") {
            gotoAndStop("error");
      } else {
            sendForm();
            gotoAndStop("correct");
      }
            

}


      
      
0
Comment
Question by:dween
9 Comments
 
LVL 39

Accepted Solution

by:
blue-genie earned 500 total points
ID: 12109651
when things "break" because you load it into another movie, its usually a pathing problem as you're obviously changing the path.

whats the other movie you're loading it into? is your form in its own swf? how are you loading it?
0
 
LVL 16

Expert Comment

by:vickerleung
ID: 12110177
Do try a highlight (i.e. selecting) the text that you have typed
If you see them, then it shouldn't be the embedded font problem

Is it because of these scripts pathing problem?
_global.style.setStyle("fontFamily", "Helvetica-Narrow");
_global.style.setStyle("fontWeight", "bold");
_global.style.setStyle("embedFonts", true);
_global.style.setStyle("fontSize", 14);
_global.style.setStyle("color", 0x000000);
0
 
LVL 1

Expert Comment

by:billyvandergaw
ID: 12114040
Hey, just a thought...the input fields you have there, are they the same color as your background?  because if they are that's why you can't see them.

Goodluck!
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:dween
ID: 12116551
Thanks,

Actually...the colors being the same was the first thing I thought of. They're not the same...rats.

I tried highlighting (selecting) the text. It wont select. I removed all of the global.style script and tried it again.
Essentially the same thing....just no style attributes.


I'm pretty sure blue-genie is on the right path (no pun intended ; )    So...

Yes, the contact form is in it's own swf

From the main timline of "master.swf":
myMCL.loadClip("slide.swf", 5);

Im loading "contact_form.swf" into clip2_mc in "slide.swf" using:
this.loadMovie("contact_form.swf");

This is where the input text becomes invisible....
0
 
LVL 2

Expert Comment

by:DarkEntity
ID: 12118645
hrm.. hard to guess.

could u verify that the 'input-text field' is visible, meaning stretched across the timeline likewise other components that are visible such as ur buttons etc.

also do a trace (<input_text_instance>.text) to see that the textfield object instance is there.

:B
0
 

Author Comment

by:dween
ID: 12119966
Ive got 2 input text fields, a textarea field and a  submit button across the timeline. They are all visible.
I'm new to Flash so I dont know exactly where to put (start) the trace?
0
 
LVL 7

Assisted Solution

by:fixitben
fixitben earned 500 total points
ID: 12122450
HI  dween

1.  You Say that the info that is typed into the boxes is sent but just not seen.  So the info is being inputed right.

2.  If that is the case then Do you have any of these types of settings
 
_global.style.setStyle("fontFamily", "Helvetica-Narrow");
_global.style.setStyle("fontWeight", "bold");
_global.style.setStyle("embedFonts", true);
_global.style.setStyle("fontSize", 14);
_global.style.setStyle("color", 0x000000);

In any of your other Swfs such as the main or the slider.  

3.  You would place the trace in the time line of the form not the main or slider.  You could do it in the others but it would just be harder.

4.  Is there any way you might be able to post the Fla of the 3 file's?  

Fixitben
0
 
LVL 4

Assisted Solution

by:mrdilliard
mrdilliard earned 500 total points
ID: 12127995
inside contact_form.swf, are you referring to _root?

If you say _root from inside a movie you load, your paths will be incorrect. Inside contact_form.swf, put this._lockroot = true; on the first frame of the root movie.
0
 
LVL 2

Assisted Solution

by:DarkEntity
DarkEntity earned 500 total points
ID: 12129317
//onRelease
this.contactForm.submitBtn.onRelease = function() {
     if (contactForm.userName.text == "" || contactForm.userEmail.text == "" || contactForm.userComments.text == "") {
          gotoAndStop("error");
     } else {
          sendForm();
          gotoAndStop("correct");
     }
}
u can put the trace(contactForm.userName.text); here to see if there is any data. but upon 2nd read, i see that ur form gets sent. so that means there should be data, just that the visual eye cannot see it. another way to verify if ur text is being input, is to highlight it and hit <ctrl + c>, after u have typed it in... though we are quite certain here that the text is there, just invisible.

i'm guessing it could be to do with ur fonts, u claim u'r using embedded fonts. try using the fonts inbuilt in flash.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question