Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

scroll image & text within a small boundary

Posted on 2003-11-30
7
7,611 Views
Last Modified: 2013-12-24
hi, i've an image which i wanna put within a small rectangle (boundary) for scrolling. the boundary is very much smaller than the size of the movie (small box). the reason i'm doin dis is to scroll a text with pics in it.

somehow, the examples i see out there uses boundaries as big as the screen, which isn't wat i wanted, bcos the image should be seen only inside dat small rectangle, especially when scrolling it. plz help.


gildan2020
0
Comment
Question by:gildan2020
  • 4
  • 3
7 Comments
 
LVL 20

Expert Comment

by:MediaMacros
ID: 9850445
There are a few ways to do this....

1. Use imaging lingo.  By getting the image of the text and the image of hte bitmap you can create a larger image object in RAM, then as you "scroll" use copy pixels to copy that portion of the image to the bitmap on the stage.
2. Use a MIAW.  You can open this in another Director window and set the drawRect of that window to "scroll" it.
0
 

Author Comment

by:gildan2020
ID: 9855553
yup, i've thought about doing MIAW, which is a good idea...

but how do i use imaging lingo? can u explain further?
is it possible to have a scrollbar with it?


gildan2020
0
 
LVL 20

Expert Comment

by:MediaMacros
ID: 9858390
Sure.  The basic idea is to use a small bitmap on screen as sort of a viewer for a small part of a larger image.  Fisrt create the larger image.  Use a new image object to composite the text and image together into one image.  Then we set the scroll...

scrollH = 0
scrollV = 0

so if we scroll 10 pixels left then scrollH = 10, and if we scroll 20 pixels down then scrollV = 20 so we cna copy this part of hte image in...

member("viewer").image.copyPixels(compositeImage, member("viewer").rect, member("viewer").rect.offset(scrollH, scrollV))

This copies that chunk of the main image into the viewer member.  THere are custom scrollbar behaviors at www.mediamacros.com that can be tied in or you can use an Xtra like OS Control to get OS level slider bars.
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 

Author Comment

by:gildan2020
ID: 9858884
hmm...u said "Use a new image object to composite the text and image together into one image", are u saying dat i've to create an image which will house both my text and images? so, i'll b just scrolling an image instead, right?

if so...
member("viewer").image.copyPixels(compositeImage, member("viewer").rect, member("viewer").rect.offset(scrollH, scrollV))
if i'm not wrong, dis viewer member should actually be an empty image where da pixels from my composite image is transfered into dis viewer, right?

but, where would i put diz codes in? should i put it into a custom scrollbar lingo?
can u provide me with an example of an image scroller with slider bar?

gildan2020
0
 
LVL 20

Accepted Solution

by:
MediaMacros earned 125 total points
ID: 9859045
You have the base idea, yes. :)

This is getting a bit into custom code, but I can give you some resources.  For the basics on imaging lingo I have an article here...
http://www.macromedia.com/devnet/mx/director/articles/imaging_lingo.html

This will get you started in making the custom bitmap.  Yes it is ultimately a bitmap but comes from text sources at runtime so its easier to edit.

For scrolling you need to calculate a few key things...

1. The rect of the viewer image
2. THe rect of the larger image
3. The difference in the 2.  THis is the maxH and maxV scroll.  Never let the scroll go over these or below 0

Then scrolling is simply a percentage.  If you have a line 50 pixels wide and you are 30 pixels over on it then its .6 (or 60%) so if your maxScroll is 100 then 100 * .6 is 60, so the scroll value for the image is 60.

There are a lot of scroll behaviors at www.mediamacros.com  None specific to images but all easily adapated.
0
 

Author Comment

by:gildan2020
ID: 9864981
hmm...i'll probably need a lot of reading, thx 4 ur help


gildan2020
0
 
LVL 20

Expert Comment

by:MediaMacros
ID: 9866919
NP.  Ask if you get stuck in the process. :)
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
The purpose of this video is to demonstrate how to set up an RSS Feed on a WordPress Website. This will be demonstrated using a Windows 8 PC. Feedburner will be used for this demonstration. Go to your WordPress login page. This will look like the…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question