PDA

View Full Version : Flash button in DW not linking to targetPath ?


javaclick
02-04-2007, 03:02 PM
Hi Forum users, i am having the following problem...

I am using Dreamweaver MX 2004.
I am using the built in flash buttons and have inserted a flash button from the DW library of Flash buttons.
I have a simple frame set design with a left frame and a main frame.
I have labelled each frame set and want the flash button to link to a page withIN the main frame.

I have set the "target path" to main frame. However when i test this out the flash button resolves to the linked page but only in a new window and not in the main frame.

If i use ordinary text as hyperlink i can resolve the problem, but i need to do this for flash button ?? :confused: :confused:
Any solutions . Thanks

Ricky55
02-04-2007, 09:49 PM
can't you create the buttons yourself in flash?

If you do and use the getURL script this will work as this is exactly how I'm working at the moment. And it will definely open in the correct window specifed, well it does for me anyway.

Never used the pre-built ones in Dreamweaver though, sorry.

Ricky55

PS
Check out this tut this will show you how.
http://www.cbtcafe.com/flash/flashframes/index.html

javaclick
02-05-2007, 08:08 PM
can't you create the buttons yourself in flash?

If you do and use the getURL script this will work as this is exactly how I'm working at the moment. And it will definely open in the correct window specifed, well it does for me anyway.

Never used the pre-built ones in Dreamweaver though, sorry.

Ricky55

PS
Check out this tut this will show you how.
http://www.cbtcafe.com/flash/flashframes/index.html

Hi Ricky55

Thanks for your reply and advice, much appreciated.
Before reading your reply i did also create a simple flash button in Flash MX and assign the get url action and i assigned the target path which i have named in dreamweaver. However when testing this out in my browser, the page which the button is linked to (when clicked) appears in a new window and not in the intended target path i.e main frame :confused: .

so both mehtods have not yielded any succesful result for me .
The syntax i have used in FlashMX is as follows
on (release){
getURL("red.htm","main");
}

Following this I also downloaded the source files which are given in the tutorial link which you posted.
I opened the source file in Flash MX2004 and i gave the same name to my frameset in dreamweaver as the target path already used in the source file.. (the source file uses a target path set to "bottomFrame".
However i have tested this out and does not work. It simply opens in a new browser window.
Surely there must be a bug with respect to this problem in
Dreamweaver mx 2004 ?, because i remember being able to succesfully carry out this function in flash version 4 many years ago .....
Could you possible send me a simple frameset file and flash button that works for you and see if you can get it to work? or any further advice will be much appreciated. My email is in my profile or you can upload to sendspace.com ?
Thanks

domedia
02-05-2007, 08:29 PM
javaclick, there's many flash proficient people on this forum. If you want the help of the community, simply provide the necessary code.

The code you used for you flash button looks fine. Can you paste your frameset so we can see if the on release commend in actionscript targets a html frame?

Ricky55
02-05-2007, 10:28 PM
This does work I know for a fact that it does as I've been doing this today.

Firstly your action script is not correct.

The best way of refering to any item is by giving it an instance name not just applying the code to the button itself but this wouldn't stop it working.

Secondly the getURL only works when the file is on a server if you are just testing locally then it won't work and thirdly you need to specify the full url not just red.html.

So i would suggest:-
This code will work if your frame in dreamweaver is called main

In flash select your button and give it an instance name of b1 (add the instance name in the lower left of the properties window)

Now remove any code your had previously on your button.

Now create a new layer and call it actions and select the first key frame of this layer and press F9 to open the actions panel.

Now enter the following code:-


b1.onRelease = function() {
getURL("http://www.yourdomain.com/yourfile.html" "main");
}

and this will work.

Remember to reference your file properly so if your file is a specifc folder and not in the root of your site use the / to locate it.

If you still can't get this to work get back to me.

Thanks

Ricky55

davidj
02-05-2007, 10:40 PM
just a quick heads up ricky

does your example require a , as a delimiter to seperate the arguments?

domedia
02-05-2007, 10:45 PM
yes it does, but the rest looks solid

Ricky55
02-05-2007, 11:48 PM
yeah it does sorry, I just wrote that out in this window easy to miss things like that just so you know javaclick

the code should read

b1.onRelease = function() {
getURL("http://www.yourdomain.com/yourfile.html", "main");
}

javaclick
02-06-2007, 02:52 PM
yeah it does sorry, I just wrote that out in this window easy to miss things like that just so you know javaclick

the code should read

b1.onRelease = function() {
getURL("http://www.yourdomain.com/yourfile.html", "main");
}


Thanks for your advice, everyone. I will work through your suggestions over the next few days and post back, hopefully, with succesful resolution.

Ricky55
02-06-2007, 02:58 PM
ok javaclick, give it a go and if you still can't get it to work I'll email you a working example for you to copy.

davidj
02-06-2007, 03:03 PM
nice one ricky

just like robin hood except you dont rob from the rich and give to the poor or that you have any thing to do with robbery or there is no monetary exchange of any kind nor do you wear green tights or any type of green hosery

so nothing like robin hood then.. !

respect!