Welcome Guest [Log In] [Register]
Welcome to Brackenwood. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
linking from flash; getURL just opens dreamweaver!
Topic Started: Apr 11 2006, 05:16 PM (291 Views)
Foozlebugger
Member Avatar
Brackenwood Member
Hi there!

Anyone who can help me with this probllem asap would be saving my life!

I'm a newbie to the whole efficient world of actionscript and am really only getting to gribs with the new ways of movieclip buttons and controlling sound...

My problem is this:
I have a button.
When it gets pressed, I want it to link to an image outside of the swf file.
This image I don't want to just open up in a separate page - I want the user to click the 'download' icon in my movie and for them to be able to download the image to their desktop.
The page in the movie is a downloads area where the user can get screensavers, wallpapers and audio samples to put on their computer, mobile phones and mp3 players...

Any ideas?

Also, how can I link between my sections - I have for example a menu fla file published to a swf file. Then when the user clicks 'downloads' I'd like the downloads swf file to load up in the same window...does the getURL method work for this?

Many thanks you's people!

rach
Offline Profile Quote Post Goto Top
 
RWS
Member Avatar
Brackenwood Lightweight
first off

getURL("link/to/image.jpg", "_blank");

secondly, you should test it out in a HTML environment, like embedding the SWF in a HTML document
Offline Profile Quote Post Goto Top
 
Foozlebugger
Member Avatar
Brackenwood Member
Hey RWS!

Yeah, I tried that one - it's just that I'm not creating web content - this is to go onto a DVD and I'm tryng to get everything just playing in a swf movie...

Any more ideas?
Offline Profile Quote Post Goto Top
 
RWS
Member Avatar
Brackenwood Lightweight
DVD? like playable on a DVD player, or DVD-ROM? or both?
Offline Profile Quote Post Goto Top
 
Vector
Member Avatar
Resident Actionscript Guru ♂
Admin
Hey Foozlebugger,

The Actionscript that you're looking for is "loadMovie()". An example:

Code:
 
//Create a blank movieclip called myHolder to hold the image
_root.createEmptyMovieClip("myHolder", _root.getNextHighestDepth();

//Load the image into myHolder
myHolder.loadMovie("myimage.jpg");


You can move your image with code using the _x and _y properties (left and top) of myHolder. For example,

Code:
 
//Move the holder clip so the left is 50 pixels from the left of the stage
myHolder._x = 50;

//Move the holder clip so the top is halfway down the stage
myHolder._y = Stage.width / 2;


If you want to be able to find out how much your image has loaded you will need to use the MovieClipLoader() object instead, but by the sounds of it you won't need that. (Not web content, but for a DVD). If you are using this on a DVD, the image should load instantaneously.

Good luck! :bitey:

[size=-1]Moved topic to Actionscript forum ~ Vector[/size]
Offline Profile Quote Post Goto Top
 
Foozlebugger
Member Avatar
Brackenwood Member
Guys,

I can't thank you all enough for the help! I had a wee mess around with the load movie thing and it did work but only in bits - I'll give that a try vector! Just with regards to using the movieclip - is it ok then too use this method for navigating through the whole DVD? Through all the swfs?

For example, I've a swf called menu.swf, from there you can go to tuner.swf, tutorial01.swf and within these travel from section to section (or, swf to swf) so if I have this movieclip object in the menu, can I pull everything in there?

Hope that makes some sort of sense! What I had found was when I used:
this.tute_tuner.onRelease = function() {
tute_tuner.gotoAndPlay("DOWN");
loadMovie("TUNER/ctc_Tuner.swf", 0);
}
on a movieclip button in the menu, it pulled in the tuner.swf perfect, no problem.

However, when using:
this.link_mainmenu.onRelease = function() {
loadMovie("../CutTheChords.swf", 0);
}
on the movieclip button in the tuner swf, it just loaded a blank screen

I thought about using unload movie, but if the user travles from, say another section called solo.swf to the tuner, then when they unload it they will go to the solo rather than the main menu...

It's all boiling my little head red raw!

rach
Offline Profile Quote Post Goto Top
 
Vector
Member Avatar
Resident Actionscript Guru ♂
Admin
You may want to try to do it like this...

Code:
 
_root.loadMovie(myfile);

//or

loadMovie(myfile, _root);


At the moment you're not specifying a target (0), and although it should probably still work, it's best to specify where you want to load it into. :)
Offline Profile Quote Post Goto Top
 
Foozlebugger
Member Avatar
Brackenwood Member
Thanks vector!

I'll give that a try and let you know!
Offline Profile Quote Post Goto Top
 
Foozlebugger
Member Avatar
Brackenwood Member
that worked a treat Vector!

Many many thanks!

I found this and thought it was a good helper - just thought I'd pin it up here for all to look at:
http://www.senocular.com/flash/tutorials/faq

rach
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Actionscript · Next Topic »
Add Reply