?
Solved

Cursor Insert problem

Posted on 2004-09-20
6
Medium Priority
?
169 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
[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 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 375 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
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…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
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.
Suggested Courses

801 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