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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

open independent html page in flash frame

Status
Not open for further replies.

dingleberry

Programmer
Dec 13, 2002
143
US
Hi,

Is it possible to open an html page in a flash movie?

More specifically, I am using geturl (' '_self', 'post');

don't think that is exact syntax cause I'm not looking at the script but it's about right.

Anyway that script is processing some variables, but the bad thing is that it's doing it in a completely different page. So the user has a hard time getting back to the movie after the processing is done. I'm trying to figure out a way for this to happen but the user not leave the movie and one way I thought of was to have the page show up on like frame 50 or something. then I could put a back button in. So in a nutshell, is it possible to open up yahoo.com (for example) in a flash frame?

tia,
dan
 
no you cant open an html page in flash

_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
thanks bill,

I didn't think so. worth a shot though. Is there any way to have a cgi script do something like this?

if ($variable == "yes")
{
send $variable to waiting flash movie;
}

and have the flash movie loop until it receives $variable, and when it does receive $varible, kick out to the next frame?

In flash 5?

Any pointers would be helpful.

Tahnks,
dan
 
yes a simple frame loop (as you are using flash 5)

frame 1

if(variable==undefined){
gotoAndPlay(2);
}else{
//do somewhere else
}

frame 2

gotoAndPlay(1);

_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
hey bill,

so If I've got a text file located at


and the contents of that text file are

input = "hi dan"

could I do a

loadVariablesNum (" 0);

on frame 1

then do a
if (input == undefined)
{
gotoAndPlay(2);
}else {
gotoAndPlay(11);
}

and it should work correct?

My question is how should the syntax of the hi.txt file look?
Also, how should my loadVariablesNum line look?

Thanks Bill,
You've been extremely helpful.
dan
 
text file

&input=Hi Dan&


the flash side looks fine

_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
Bill,

I'm currently doing this.

if (input == undefined) {
gotoAndPlay (3);
} else {
gotoAndPlay (11);
}

On frame 2.

On Frame 1, connected to a button, I have
on (press) {
loadVariablesNum ("hi.txt", 0);
gotoAndPlay (2);
}

I have hi.txt in the same directory as the .swf file
attached to frame 1, i have a stop action.

Frame 11 is a button with dynamic text called input. What happens when I run this is that I'm getting an error that says

"A script in this movie is causing macromedia flash player to run slowly. If it continues to run, your computer may become unresponsive. Do you want to cancel? yes no"

If I change the action on frame 2 to

if (input = undefined) {
gotoAndPlay (3);
} else {
gotoAndPlay (11);
}

it works great but loads frame 11 so fast that I wanted to make sure that it was receiving that variable so I changed teh name of hi.txt to h.txt and it did the same thing only the text box it brought up was empty this time theyfor telling me that it's not validating whether it has received the variable input and looping if it has not. Any ideas on what might be going on here? I've even tried

eval("input");
if (input == undefined) {
gotoAndPlay (3);
} else {
gotoAndPlay (11);
}

but no luck


 
On Frame 1 button

on (press) {
loadVariablesNum ("hi.txt", 0);
gotoAndPlay (2);
}


frame 2

if(input==undefined){
gotoAndPlay(3);
}else{
gotoAndPlay(11);
}

frame 3

gotoAndPlay(2);

_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
Bill, I have this done exactly the same way as you have indicated however I'm getting the error message

"A script in this movie is causing macromedia flash player to run slowly. If it continues to run, your computer may become unresponsive. Do you want to cancel? yes no"

when I run it. if you want the source you can grab it at


if you're comfortable checking this out, i'd appreciate it. if not, I totally understand too.
thanks for you help
dan
 
had a look and all works fine if you just omit the check on frames 2 and 3

11 frames is plenty of time for the variables to load.

the script is looping thats why the message...input is always undefined. i suspect this is a flash 5 thing as i think in 5 the variables have to go to textfields and input is never getting a value (the textfield) so the check never becomes true.



_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top