kevin wood 29 Posting Whiz

This code will display images within an email from the server. It will display an image with a choice of file extension which can be expanded to fit your needs.

this code was originally developed for a emailing system where the images to be displayed where uploaded by the user.

LastMitch commented: Thanks for sharing! +12
kevin wood 29 Posting Whiz

yes it is possible and here is how it is done.

firstly in frame one of the timeline a variable needs to be set. i set this as

var frame : String;

once this has been done you next need to add the

stop();

in the frame where you want the play head to pause. As mine then had the animation after the pause for the page exit, you will need to add this code to frame at the end of the page.

stop();
if(_level0.frame != undefined){
_level0.gotoAndPlay(_level0.frame); // or gotoAndStop(_level0.frame_to_goto)... If you want it to stop on that frame...
}else{
trace("An error as occured!");
}

this section of the code is looking for a variable to be sent to it from the button being clicked on. The code to get the variable to be sent will obviously go on to the button.

the code which goes on the button is this

on(release){
// set the variable...
_level0.frame = "_page1"; // assuming that's the frame's label...
//play the timeline from the next frame to frame 25...
play();
}

this will then pause where you want it to pause and when a button is pressed it will play the animation for the page exit then take the user to the page the have requested depending on which button is pressed.

just to clear things up a bit for any novice flashers i had a layer for the actions where all the code script went …

peter_budo commented: Good job Kevin +10
kevin wood 29 Posting Whiz

the solution to the problem that i was facing is as follows:

if you want the links from the buttons to open in the same window then the code to use looks like this:-

on (release){
getURL("../construction/index.htm");
}

the file being linked to is written the same as it would be in html code and to get the link to open in a new window then the code is:-

on (release){
getURL("../construction/index.htm" "blank");
}
peter_budo commented: Thank you for sharing +7