[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Can't get text from a text entry

Posted on 2013-12-18
13
Medium Priority
?
317 Views
Last Modified: 2014-01-31
Hi, I have a flash template that's making me sad.  It has a search button and a text area that I'm trying to incorporate into a google search URL that is fired when I press the button.

The movie clip is called 'search' and the test input is an instance of _txt, so I tried to enter search.text in the button actionscript, but it comes up as undefined.

I'm a very occasional user of flash, am doing this for my brother's site.  Can I ask for direction?

I've attached the file for your amusement.  Let me know if I can provide more info.

Many Thanks
header-v8.fla
0
Comment
Question by:mitcht
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
13 Comments
 
LVL 43

Expert Comment

by:Rob
ID: 39758678
I'm taking a look and will post back soon :)

Is there any reason you're using flash and not a simple html / javascript form?

In other words, what's the advantage to using flash for this particular part, ie the search.  I understand about the presentation and sound but not the search.
0
 

Author Comment

by:mitcht
ID: 39759388
Thanks for responding.

Why use flash for this?  Well, it came with the template :)

Also, it works well with the visual part of the site.  But you make a good point.  If I can't get this simple thing to work, may need to fallback to a js/html solution.

But I'd sure like to make this work.
0
 
LVL 43

Expert Comment

by:Rob
ID: 39761137
Sure, I can understand that.

I'll attach the working version but first what version of flash are you using?

Your issues were due to a few things including using reserved words as "search" as an instance variable as well as not have instance names for the required movie clips.  You should see what I mean when I upload the file
0
Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

 
LVL 43

Accepted Solution

by:
Rob earned 2000 total points
ID: 39761150
I'm having some issues uploading the fla so I've attached a couple of screenshots and the updated code

on (release) {
	var search_term;
	search_term = _level0.mysearch.myterm.txt.text;
	getURL("http://www.google.com/search?q=" + search_term + " site:drmarktracy.com", "_blank");
}

Open in new window


Notice in the following that I've removed the unnecessary keyframes and renamed the movie clips variable names

Top Level (note where the timeframe indicator is at the end)
top level instance name
Middle level (again note the timeframe indicator is at the end)
instance names
text field
0
 

Author Comment

by:mitcht
ID: 39812482
Thanks for the detailed answer.  I took a shot at the solution, but it's not working here.  Will post my detailed steps on 1/28.

Again, thanks, this was a big help.  I think I'm still missing something on my side.
0
 
LVL 43

Expert Comment

by:Rob
ID: 39814792
Here is the updated file - i ended up using ee stuff as the file attachment wouldn't work here
https://filedb.experts-exchange.com/incoming/ee-stuff/8332-header.zip
0
 

Author Comment

by:mitcht
ID: 39815278
Very cool, I see the file works, but I can't open the source in Adobe CS3.  What version should I use to open the source file?  Would like to review and learn where I can do better next time.

Again, thanks!
0
 
LVL 43

Expert Comment

by:Rob
ID: 39815923
I'm using CS5.5 so I'll try and re-save to CS3 and post back
0
 

Author Comment

by:mitcht
ID: 39816181
Much Appreciated!
0
 
LVL 43

Expert Comment

by:Rob
ID: 39816434
Ive only been able to save as CS4.. if you're still unable to open it, I'm happy to go through the steps i took to get it to work
header-v8-cs4.fla
0
 

Author Closing Comment

by:mitcht
ID: 39824232
Thanks for taking the time to work with me on this.  It's very appreciated!
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

650 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