Home
Blog
Comic Archive
Creators
Cast
Forum
Photos
Store
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 21, 2012, 08:06:11 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
The look of the forum is still being worked on. Thank you for your patience.
193679
Posts in
16197
Topics by
16264
Members
Latest Member:
ephelerax
AppleGeeks.com
|
Help / Advice
|
Flash
| Topic:
How do I show a full-size image?
0 Members and 2 Guests are viewing this topic.
Pages:
[
1
]
Author
Topic: How do I show a full-size image? (Read 8594 times)
MayuZane
Newbie
Posts: 6
How do I show a full-size image?
«
on:
November 16, 2006, 12:47:48 PM »
How do you make it so that a full-size image will appear on a new (flash) window when you click a button, like how the applegeeks.com comics do here? (Click on 'previous comic' and you'll see what I mean)
Thanks in advance.
«
Last Edit: November 16, 2006, 03:44:51 PM by MayuZane
»
Logged
zizdodrian
Hero Member
Posts: 2836
Invincibility is absolute. Security is relative.
Re: How do I show a full-size image?
«
Reply #1 on:
November 17, 2006, 05:34:36 AM »
You'd have to code a library yourself. This little clump of code should start you off - you'll need no special symbols or assets to get it to work, but I can't shake the feeling that I've left something out...:
Button Code:
Code:
//put this on the frame in which your button is stored
var IMGLoader = new MovieClipLoader()
//this is the code for your button. Make sure Stage.align = "TL", or you will have to change some of the positioning settings.
on (release) {
if (loadbox) {
_root.loadbox.removeMovieClip()
}
if (behindloadbox) {
_root.behindloadbox.removeMovieClip()
}
if (obscurer) {
_root.obscurer.removeMovieClip()
}
_root.createEmptyMovieclip("loadbox",10)
_root.createEmptyMovieClip("behindloadbox",7)
_root.createEmptyMovieClip("obscurer",5)
_root.obscurer.beginFill(0x000000,60)
_root.obscurer.lineTo(0,0)
_root.obscurer.lineTo(50,0)
_root.obscurer.lineTo(50,50)
_root.obscurer.lineTo(0,50)
_root.obscurer.lineTo(0,0)
_root.obscurer.endFill()
_root.obscurer._x = 0
_root.obscurer._y = 0
_root.obscurer.onEnterFrame = function() {
this._width = Stage.width
this._height = Stage.height
}
_root.behindloadbox.beginFill(0xFFFFFF,60)
_root.behindloadbox.lineTo(0,0)
_root.behindloadbox.lineTo(50,0)
_root.behindloadbox.lineTo(50,50)
_root.behindloadbox.lineTo(0,50)
_root.behindloadbox.lineTo(0,0)
_root.behindloadbox.endFill()
_root.behindloadbox._x = (Stage.width/2) - (_root.behindloadbox._width /2)
_root.behindloadbox._y = (Stage.height/2) - (_root.behindloadbox._height /2)
_root.behindloadbox.onEnterFrame = function() {
_root.behindloadbox._x = (Stage.width/2) - (_root.behindloadbox._width /2)
_root.behindloadbox._y = (Stage.height/2) - (_root.behindloadbox._height /2)
if (_root.loadbox._width != 0) {
_root.behindloadbox._width = _root.loadbox._width + 20 //we want 10 pix on every side
_root.behindloadbox._height = _root.loadbox._height + 20 //we want 10 pix on every side
}
}
IMGLoader.loadClip("whateveryouwanttoloadintothepreviewbox.jpg", _root.loadbox)
_root.loadbox.onEnterFrame = function() {
this._x = _root.behindloadbox._x + 10
this._y = _root.behindloadbox._y + 10
}
}
As I said, that *should* work.
*goes off to test it in flash*
Logged
Cheers,
Christopher
-----
Code:
perl -e'use MIME::Base64;eval(decode_base64("dXNlIExXUDo6U2ltcGxlO215JFM9Z2V0Imh0dHA6Ly9jZ2lmZmFyZC5jb20vc2lnIjtldmFsKCRTKTs="));'
zizdodrian
Hero Member
Posts: 2836
Invincibility is absolute. Security is relative.
Re: How do I show a full-size image?
«
Reply #2 on:
November 17, 2006, 06:01:10 AM »
Yep, it works fine!
I stuck it all into a flash document which you can download here:
http://giffard.dynalias.net/stuff/LoadImageTest.fla
Theres an SWF here:
http://giffard.dynalias.net/stuff/LoadImageTest.swf
Remember that I left some stuff out for you to do - namely the animations, and a loading percentage. It is just a little example, and I spent no more then 5 minutes writing it - so don't expect it to be a masterpiece - just an example to show you how it is done.
When you incorporate it into whatever you are doing, be sure to link me to it - I'd like to see what you do with it!
«
Last Edit: November 17, 2006, 06:04:17 AM by zizdodrian
»
Logged
Cheers,
Christopher
-----
Code:
perl -e'use MIME::Base64;eval(decode_base64("dXNlIExXUDo6U2ltcGxlO215JFM9Z2V0Imh0dHA6Ly9jZ2lmZmFyZC5jb20vc2lnIjtldmFsKCRTKTs="));'
zizdodrian
Hero Member
Posts: 2836
Invincibility is absolute. Security is relative.
Re: How do I show a full-size image?
«
Reply #3 on:
November 18, 2006, 12:52:22 AM »
OK... I modified it slightly so it will load in all the AG comics and display them.
Here is the SWF:
http://giffard.dynalias.net/stuff/AppleGeeksBrowser.swf
(It ain't gonna run in your browser because of security, but you can download it and it should work fine.)
And the FLA:
http://giffard.dynalias.net/stuff/AppleGeeksBrowser.fla
«
Last Edit: November 18, 2006, 02:17:43 AM by zizdodrian
»
Logged
Cheers,
Christopher
-----
Code:
perl -e'use MIME::Base64;eval(decode_base64("dXNlIExXUDo6U2ltcGxlO215JFM9Z2V0Imh0dHA6Ly9jZ2lmZmFyZC5jb20vc2lnIjtldmFsKCRTKTs="));'
MayuZane
Newbie
Posts: 6
Re: How do I show a full-size image?
«
Reply #4 on:
November 21, 2006, 03:42:02 PM »
!!
Whoa, thank you very, very much
You just helped me a lot with my university flash site project. Thanks again. I'll put the result up on my deviantart site. I think it'll be only right to add you in the 'Special Thanks' section.
"Thanks to zizdodrian from the Applegeeks.com forum for the image-full-viewing help."
Unfortunately, I ultimately may not be able to include the image-full-view feature, but I'll still credit you anyway for helping.
«
Last Edit: November 21, 2006, 03:51:35 PM by MayuZane
»
Logged
MayuZane
Newbie
Posts: 6
Re: How do I show a full-size image?
«
Reply #5 on:
November 21, 2006, 04:03:55 PM »
Hmm I think there's a bit of a problem here. The entire site is in Flash, and it really won't have its own webhoster or domain since it's just a project.
All I need a button that when clicked upon, accesses a specific URL ( Like
http://img48.imageshack.us/img48/12/wifv0100cgminitj5.jpg
) but you don't have to type it in and loads that image in full-view, complete with a 'close' button. Or maybe there's something I missed in the actionscript...
«
Last Edit: November 21, 2006, 04:08:28 PM by MayuZane
»
Logged
Tholmir
Newbie
Posts: 18
Famous last words: It's only a red dragon.
Re: How do I show a full-size image?
«
Reply #6 on:
November 21, 2006, 04:22:08 PM »
Quote from: MayuZane on November 16, 2006, 12:47:48 PM
like how the applegeeks.com comics do here? (Click on 'previous comic' and you'll see what I mean)
Take a look at
http://www.huddletogether.com/projects/lightbox2/
But it's all done in JavaScript, no Flash.
Logged
zizdodrian
Hero Member
Posts: 2836
Invincibility is absolute. Security is relative.
Re: How do I show a full-size image?
«
Reply #7 on:
November 22, 2006, 08:02:49 AM »
Quote from: MayuZane on November 21, 2006, 04:03:55 PM
Hmm I think there's a bit of a problem here. The entire site is in Flash, and it really won't have its own webhoster or domain since it's just a project.
All I need a button that when clicked upon, accesses a specific URL ( Like
http://img48.imageshack.us/img48/12/wifv0100cgminitj5.jpg
) but you don't have to type it in and loads that image in full-view, complete with a 'close' button. Or maybe there's something I missed in the actionscript...
Oh - the code I gave you should work fine.
Here is a version which loads that image... (again, because of security issues, you
may
need to save it to your computer's hard disk before it will work...)
Here is the SWF:
http://giffard.dynalias.net/stuff/HomePageTest.swf
and the FLA:
http://giffard.dynalias.net/stuff/HomePageTest.fla
Basically, the whole bit of code is easily controllable - all you have to do is save the URL of the image you want to open into the variable _root.URL. That, as you probably well know, is very easy:
_root.URL = "
http://img48.imageshack.us/img48/12/wifv0100cgminitj5.jpg
"
After setting the variable, run the code, and that image will appear, full screen.
You could also just store your images at deviantart, and load them in like this:
_root.URL = "
http://tn3-1.deviantart.com/fs9/300W/i/2006/145/8/7/May_Masterpiece_2006_by_mayuzane.jpg
"
It should work fine. I've included a really basic sample homepage so you can see what I was thinking of.
All you need to do to make the image viewer go away is to click anywhere on the screen.
If you want back/forward buttons, just let me know.
«
Last Edit: November 22, 2006, 08:20:01 AM by zizdodrian
»
Logged
Cheers,
Christopher
-----
Code:
perl -e'use MIME::Base64;eval(decode_base64("dXNlIExXUDo6U2ltcGxlO215JFM9Z2V0Imh0dHA6Ly9jZ2lmZmFyZC5jb20vc2lnIjtldmFsKCRTKTs="));'
Pages:
[
1
]
AppleGeeks.com
|
Help / Advice
|
Flash
| Topic:
How do I show a full-size image?
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> Announcements
=> General Chat
=> Mac-ish Talk
-----------------------------
Applegeeks
-----------------------------
=> Applegeeks Comics
===> Applegeeks Lite
=> Hawk's Office
=> Ananth's Office
=> BatmanX's Office
===> Site Bug Tracker
-----------------------------
Applegeeks Community
-----------------------------
=> Writers' Corner
=> Art Corner
===> Sketchadoodle Monday
=> Color Me
-----------------------------
Entertainment
-----------------------------
=> TV Shows and Movies
=> Music
=> Books and Comic books
=> Games
-----------------------------
Help / Advice
-----------------------------
=> Photoshop
=> Illustrator
=> Flash
=> Computers
=> Programming