/    Sign up×
Community /Pin to ProfileBookmark

initiating lightbox inside flash

I’m trying to find exactly how to load an image through lightbox with just the the javascript lightbox functions. I’m using lightbox 2 (from [url]http://www.huddletogether.com/projects/lightbox2/#download[/url])

the most I’ve got right now is an actionscript function sending the url and title to a javascript function called “dude” to try to load the image, but it’s not working.

function dude(url,title) {
var imgLink = document.createElement(‘a’);
imgLink.setAttribute(“href”,url);
imgLink.setAttribute(“rel”,”lightbox”);
imgLink.setAttribute(“title”,title);
Lightbox.prototype.start(imgLink);
}

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@KorJul 21.2010 — ActionScript 2 or 3?

Anyway, you could get some solution straight to the source:

http://www.actionscript.org/
Copy linkTweet thisAlerts:
@Marius_MiliunasauthorJul 21.2010 — It's as3, but the actionscript's not my problem, I just need the javascript code to initiate the lightbox function with any image for now, and I can incorporate the correct image later once I figure how how to just start it without clicking a link in html with the right 'rel'.
×

Success!

Help @Marius_Miliunas spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...