#1 (permalink)  
Old 05-21-2008, 07:10 PM
Junior Member
 
Join Date: May 2008
Posts: 2
Default url's instead of data?

hello,
is it possible to open links when pressing an image instead of the data?
if so can u provide an explanation how?
thanks!
Reply With Quote
  #2 (permalink)  
Old 05-21-2008, 07:31 PM
Junior Member
 
Join Date: May 2008
Posts: 2
Default

got it...!

on image.as line 207:

find:
Code:
clickHandler.call(this, node.attributes.data);
replace with:
Code:
this.getURL(node.attributes.data);
thanks anyways
Reply With Quote
  #3 (permalink)  
Old 05-22-2008, 06:18 PM
Super Moderator
 
Join Date: May 2008
Posts: 519
Send a message via Skype™ to Adrian
Default

Hi,
The smart way would be :

Code:
import oxylus.folio.Image;
Image.clickHandler = function(dat){
	getURL(dat);
}
This is a more flexible aproach, but your way is good too.
Reply With Quote
  #4 (permalink)  
Old 05-25-2008, 02:27 PM
nuv nuv is offline
Junior Member
 
Join Date: May 2008
Posts: 4
Default problem with add urls

hi,

I´m having problems to change urls instead of data. I´ve changed the main .fla as you describe in the file page, the image.as as the previous posts and edited the xml file, but I´m missing some here. Can you help me posting every bit of code to change here, like in the files:

main.fla
image.as
xml file

with a working link........ or send me the file with the links instead of data?
I don´t have much knowledge of xml and as, but I realy like this file of yours and can´t see what I´m doing wrong.

thank you
my mail:
0nuvem0@sapo.pt
Reply With Quote
  #5 (permalink)  
Old 05-26-2008, 09:16 AM
Super Moderator
 
Join Date: May 2008
Posts: 519
Send a message via Skype™ to Adrian
Default

Hi,
This code

Code:
import oxylus.folio.Image;
Image.clickHandler = function(dat){
	getURL(dat);
}
has to go in the first frame actions of you main.fla file. You already have that function defined there, you'll just have to modify it.

The next and final step is to put your urls in the "data" fields inside the xml:

Code:
... data="www.mypage.com" ...
Reply With Quote
  #6 (permalink)  
Old 05-26-2008, 02:51 PM
nuv nuv is offline
Junior Member
 
Join Date: May 2008
Posts: 4
Default

so, no need to edit the image.as ?

thanks for your help
Reply With Quote
  #7 (permalink)  
Old 05-26-2008, 04:06 PM
nuv nuv is offline
Junior Member
 
Join Date: May 2008
Posts: 4
Default

it works now, thanks.

just one more thing, I want it to be a _blank url.

tried this in the xml:

<pic src="shop/01.png" title="WALLPAPER" data="http://www.site.com" target="_blank" />

but it opens in self window.

in the main. fla edited this:

import oxylus.folio.Image;
Image.clickHandler = function(dat){
getURL("_blank");

but continues in self window.

were to make it a _blank URL?
thanks
Reply With Quote
  #8 (permalink)  
Old 05-26-2008, 08:46 PM
Super Moderator
 
Join Date: May 2008
Posts: 519
Send a message via Skype™ to Adrian
Default

Code:
Image.clickHandler = function(dat){
	getURL(dat, "_blank");
}
Reply With Quote
  #9 (permalink)  
Old 05-26-2008, 11:14 PM
nuv nuv is offline
Junior Member
 
Join Date: May 2008
Posts: 4
Default

Thank you!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.