Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cannot validate external variable once in flash

Status
Not open for further replies.

level1

Programmer
Apr 16, 2002
60
GB
Dear people

I m new to action script and i have the following problem.

I have a Flash movie. Where the user can type a number in flash dinamic text field
and depending on what number they type a circle will beging to rotate.
So if the user types 90 the circle should rotate 90 degrees.

Until here all works fine.

But i wanted to embed this to an HTML page which is what i wanted.
I can make HTML and flash to communicate using a bit of Javascript found on macromedia.

So my example contains a HTML page with a text box that as you see communicates with the flash movie to get the number through this HTML text box.

Until here all is fine.

But the problem i have is that once i have the variable in flash i cannot validate it and change the control of my movie::((


//The following code doesnt work/

if (myVar==&quot;&quot;) { // variable got from HTML, i also tried myVar<> &quot;&quot; and != and &quot;ed&quot; but nothing:(((
stop();
} else if (myVar<>&quot;&quot;) {
gotoAndPlay(2);
}


I have attached two movies in this.

The first movie that done in Flash everything works fine.
can be found here for demo:
and the full source here:

but my seccond movie doesnt work as i want
and is here for the demo:
and for download here:

The event is activated by a user click.

On the seccond i managed to make HTML and flash to communicate but i cannot make the movie to go on frame 2 when i want.
And what i want is to go on frame two when the HTML number field is in Flash number field.

Sorry for my english i hope somebody will understand what i want.


Please help.
 
all i want is to understand how can i move the timeline depending on variable validation?????????
please help
 
to make thing more clear.
the first movie works fine because there is a button with the goto and play action.

but imagine this without butons.

what i want is once the movie opens to wait for the variable.

then if the variable is a number then to play.

it seems that i cannot make the movie to play with my variable validation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top