Solved

scroll image & text within a small boundary

Posted on 2003-11-30
7
7,615 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
[X]
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
  • 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
wordpress plugin to view newspaper 3 60
retrive modal form user input to database aspx with vb behind code 4 134
Web Development Tools for MVC 3 125
Gulp not seeing Changes 4 120
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…
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…

739 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