Solved

Cursor Insert problem

Posted on 2004-09-20
6
151 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
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…
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): …
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…

920 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

15 Experts available now in Live!

Get 1:1 Help Now