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

Using URLs 3

Status
Not open for further replies.

Anthropos

Technical User
Mar 16, 2001
72
CA
Is it possible to assign URL/web addresses to buttons? I'm assuming that it is, but the tutorials and help pages on flash don't explain how to do this. For instance, I upload a flash HTML page called index.html, can I have buttons act as links for other Flash HTML pages?..or do I have to make one huge file and let it jump from scene/frame to scene/frame? Thanks for any help you can give me. I've been in here before and you guys are great and very supportive to new-comers...it's much appreciated.
 
create the button..convert to symbol..choose button..double click on the button to change the "over" and "down" states of the button..back to scene..right click on the button and choose "actions"..double click on "on mouse event" and choose "on release"..then double click on "get url"..type in the address of the url..for window choose "same" or not if you want it to open in another window choose "self" or whatever you like..

that's it...
 
Thanks!!! I tried it and it works great. Can you tell me what the "_self" and "_blank" window choices do?
 
the self window allows the new linked page to open in it's own window..the blank i'm not quite sure..you would have to ask someone else that one..i'm still learning just like you..there's a couple old guys in here that could help ya on that one..
 
You kids amaze me!
...That you would understand each other!

From the OLD help files:

Jumping to a different URL

Use the Get URL statement to load a document from a specific URL into a specific window, or to pass variables to another application at a defined URL.

To test this action, the file to be loaded must be at the specified location. A network connection must exist for absolute URLs (for example,
The Get URL action has the following parameters:

URL specifies the URL from which to obtain the document.

Window specifies the window or HTML frame that the document should be loaded into. You can enter the name of a specific window or frame or enter an expression. You can also choose from the following reserved target names:

_self specifies the current frame in the current window.
_blank specifies a new window.
_parent specifies the parent of the current frame.
_top specifies the top-level frame in the current window.

Variables determines whether to use GET or POST to send variables, or whether to pass no variables at all. The GET method appends the variables to the end of the URL, and is used when a small number of variables are involved. The POST method sends the variables in a separate header, and is capable of sending much longer strings. See Setting and identifying variables.


;-)

Yes Dave! I do know the link doesn't work!
It's just that it is strongly suggested NOT to post any e-mails on the forum! LOL
Guess it would be hard work removing your's!
 
ok so i had it backwards.."self" is current window.."blank" is new window..that's what i meant..ok your right, i didn't beleive it and i said it..anyway,old's the man..power to the old guys..
 
Wow! Now you've gone an' confused me. The Get URL works as a basic link, right? The other variables are something more in depth and hopefully something I will get to some day. I could have a website with manouvering like any ol' website with just using the Get URL command, right? Also, once a file is published into an .exe file, can you still use the Get URL to have a window open up to the "home web address"?

Adam
 
hi adam

You might want to have a look in the help files for the LOADMOVIE action also. This may provide an alternative solution for you.

dave

dave@davdesign.co.uk

^^^^^^^^^^^^^^^^
 
Adam,

You are correct about variables & stuff... You'll get there!
As for standalone players (.exe files), let me just say they are mostly used for local playbacks, e-mails to someone who woudn't have Flash installed - on a PC in this case, or for cd authoring purposes. The use of .exe files on the web itself is a little more complicated.

If you're still interested in a very basic preloader, you can check this one:

You can download the .fla here:

This is only a 2 frames preloader, but the following scene is a bit heavy, so depending on your connection speed, it might take a few minutes to download.

In this case the important action is in frame one of the loader and is in the format:

If Frame Is Loaded (Scene 1, "moviend")
Go to and Play (Scene 1, 1)
End Frame Loaded

What this really means is that, in this case and they're other ways of scripting this, if the last frame of scene 1 (the only scene I have in there outside of the loader) I've labeled moviend is loaded... Then go ahead & play the whole thing. Otherwise just keep on loading!

Be sure to allways have your loader scene as the first one in your movie.

B-)

PS: May I suggest you become a valuable member of Tek-Tips (while it's still free!), you can then amongst other advantages, really let us know how much our answers have helped you out!
 
The reason I ask, Old, is that for the time being, I am more interested in making little "cartoons" that will be in .exe format and at the end I would like to have a button that would send the "viewer" to my website where they may view more of my cartoons. Also, if I were to use a preloader on this:


would it stop the loading time for sounds?..as you may view--at least on my 56k--it takes about 10 seconds to load little song bits, and it really interferes with the playback. Would a preloader make sure that it's fully loaded before it begins?

p.s. I signed up to become a member, but I couldn't find "ignorant newbie" so I had to use "technicaluser" LOL

Adam
 
Hey! Cool! Hope Melocco doesn't see this!
Nice animation! Hard work! One of his kid brothers might want somethin' like this!

As for preloading this... It depends!
Is this but one movie? Different scenes? Are you loading any other movies along the way, even if they're only sound movies?
If not loading movies along the way, the 2 frame preloader should work! If you are, you'll have to resort to another type of preloader, to insure every movie you're using has been preloaded before the show starts!

Is this clear?

;-)
 
Thanks, and yes it is one movie with 5 scenes. I have no idea how to load movies, or sound movies, along the way. I only started using Flash less than a month ago and have only had tutoring as far as the tutorials therein have taught me. I would upload the .fla file for you to look at but it's over 17,000 kbs. I made it with Flash 4, but I have Fash 5. If I imported the the sound files as mp3 instead of .wav would that make the .fla smaller? Thanks again for your help and support.

I also notice a lot of you speaking french here. May I ask where you're all from?...Being Canadian myself I've only learned "school french".

mon crayon est jaune. :)I

Adam
 
Hi Adam!

Well, we're both Canadians. Pat is French, but living in California I believe!

If you want to try out the preloader, do this:

Insert a new scene in your Flash 4 Napster project.
Under Window->Inspectors-> hit Scene.
Double click the new scene name, and rename it loader.
Make sure you then drag it towards the top of the list, so that it sits as the first scene.
Now double click the first key frame in the loader scene and add the following actions:

If Frame Is Loaded (Scene 5, "moviend")
Go to and Play (Scene 1, 1)
End Frame Loaded
(This assumes your last scene is scene 5, change it if it's not the case, and that your movie begins on frame 1 of scene 1 - if you have a stop action on frame 1, you should change that also to 2 or the number of your starting frame)

Now insert a new keyframe(F6) on the second frame.

Add the action:

Go to and Play (current scene, 1)

Add a new layer, and just add some text for now like "loading" covering the two actions frames.

The only thing left is to label the last frame of your last scene with "moviend" or the label you have choosen.

That's it. This loader won't be animated ( you can get into that if this one works), but it should do the trick.

Do remember you can't really test this locally. You can simulate the process by choosing Streaming under Control when testing your movie. You should see your text come up and stop, and when you hit enter, the movie should go on playing.
Best way to test it is to upload your movie. Remember to empty your cache to test this first run. Otherwise you won't see the preloader in effect since the files are already present on your machine. Same thing happens to me or any other user after a first download of your movie. After it has downloaded once, I can replay it without seeing the preloader and without interruptions.

Finally, yes using Mp3s instead of wavs should reduce the size of your fla & movie... If you carefully remove the wavs from your project. Beware deleting selected unused items is NOT reversible if you happen to save your project meanwhile!

:)






 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top