flash loading html

  • racingsnake
  • Born
  • Born
  • No Avatar
  • Joined: Nov 26, 2006
  • Posts: 3
  • Status: Offline

Post November 26th, 2006, 5:40 pm

right

I have a flash movie with buttons. When I hit a button i want the flash movie to play out and at the end open an htm page in its place.

I have code on each button -

on (release) {
myVar = trained.htm;
play();
}

on (release) {
myVar = aboutus.htm;
play();
}

so the movie plays and on the last frame I have-


stop();
if (myVar == aboutus.htm) {
getURL("aboutus.htm");
}
if (myVar == trained.htm) {
getURL("programmes.htm#trained.htm");
}

All pages in same directory but not working?

Can any1 help please?



:?
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post November 26th, 2006, 5:40 pm

  • ScienceOfSpock
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Jul 06, 2004
  • Posts: 1890
  • Loc: Las Vegas
  • Status: Offline

Post November 26th, 2006, 6:36 pm

the only thing I can see wrong is that your myVar may not be carrying through to the getURL call. Try adding a trace(myVar); just before the getURL call and test it in flash to see if myVar is actually getting through.
If it's not, create it as an empty string in the root timeline, then when you reference it for setting or getting, use _root.myVar
  • racingsnake
  • Born
  • Born
  • No Avatar
  • Joined: Nov 26, 2006
  • Posts: 3
  • Status: Offline

Post November 26th, 2006, 7:31 pm

HeY Mastermind
Thanks for the help.

Trace? Where would it go in this code?-

stop();

if (myVar == aboutus.htm) {

getURL("aboutus.htm");

}

if (myVar == trained.htm) {

getURL("programmes.htm#trained.htm");

}
  • ScienceOfSpock
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Jul 06, 2004
  • Posts: 1890
  • Loc: Las Vegas
  • Status: Offline

Post November 26th, 2006, 9:33 pm

Actually, I just noticed you didn't wrap your strings in quotes.

Code: [ Select ]
on (release) {
myVar = "trained.htm";
play();
}

on (release) {
myVar = "aboutus.htm";
play();
}
  1. on (release) {
  2. myVar = "trained.htm";
  3. play();
  4. }
  5. on (release) {
  6. myVar = "aboutus.htm";
  7. play();
  8. }

Code: [ Select ]
stop();

if (myVar == "aboutus.htm") {

getURL("aboutus.htm");

}

if (myVar == "trained.htm") {

getURL("programmes.htm#trained.htm");

}
  1. stop();
  2. if (myVar == "aboutus.htm") {
  3. getURL("aboutus.htm");
  4. }
  5. if (myVar == "trained.htm") {
  6. getURL("programmes.htm#trained.htm");
  7. }
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Joined: Nov 05, 2004
  • Posts: 1254
  • Loc: Ro
  • Status: Offline

Post November 27th, 2006, 3:12 am

mweh ... i wonder what for is the [code]if (myVar == ....) { getURL("...");[code].
wouldn't it be more simple to set the myVar for the desired url in the onRelease and in the movie: getURL(myVar) ?
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”
  • racingsnake
  • Born
  • Born
  • No Avatar
  • Joined: Nov 26, 2006
  • Posts: 3
  • Status: Offline

Post November 27th, 2006, 1:39 pm

it works!

cheers guys- owe u a beer

j

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 49 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.