Solved

Cursor Insert problem

Posted on 2004-09-20
6
148 Views
Last Modified: 2010-04-03
This function won't work - Selection.setFocus("text1");

Using Flash MX 2004
text box properties = input
instance = emailx
var = email

Also, all the code underneath it executes fine and it doesn't work on other input boxes as well.

Any ideas?
0
Comment
Question by:Docjayman
6 Comments
 
LVL 23

Expert Comment

by:Zeffer
ID: 12107336
the path ..("???")...is a literal string to the variable
it can be relative or absolute

so if the textfield is on the main timeline.. the code would be..

Selection.setFocus("email");  //relative

or

Selection.setFocus("_root.email");  //absolute

or if the field was in a clip called .. clipOne ..

Selection.setFocus("_root.clipOne.email");  //absolute

Z


0
 

Author Comment

by:Docjayman
ID: 12119702
Yeah, I tried all of those but it still doesn't work.  I also tried using other text boxes but still nothing.  I am not sure what it could be because the code is so simple.
0
 
LVL 10

Expert Comment

by:muso120999
ID: 12120360
Have you tried it without the quotes?  It seems to work equally well with or without!

Also try this before the setFocus, to check whether your path is correct:

trace(email);

and if you get "undefined" in the output window, try the other suggestions that Zeffer made ( i.e. trace(_root.email); ).  If it always comes up undefined then this is your problem, and you can use:

trace(this);

to give you the path you need.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 7

Expert Comment

by:fixitben
ID: 12128918
Just something else You won't see the cursor inside flash you will only see it once inserted into a webpage or just playing the swf by its self.  

Fixitben
0
 
LVL 7

Accepted Solution

by:
fixitben earned 125 total points
ID: 12128933
Try this Place this in the Same frame with the text box

Selection.setFocus("emailx");  

You have to point to the instance not the Var. Duh


Fixitben

0
 

Author Comment

by:Docjayman
ID: 12183449
If someone could email me at cr.c@lycos.com, I would be happy to attach the small file.  Maybe I am just missing something really dumb.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
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.

757 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now