Skip to main content
Known Participant
March 15, 2009
Answered

A Mini map for a dynamic visualiation

  • March 15, 2009
  • 10 replies
  • 973 views
Hello guys
Im using "visualizer" to display dynamic visualizations, Its usually that many times things goes out of the screen, and user have to pan to experience the whole visualization.
Now i want to add a simple little visualizer (like game map) from where user will be able to drag and go to the wanted area.

My first confusion is, how to make a little image of the whole visualization.
am i suppose to employ BitmapData class or is there something other?

Please guide
Thanks
This topic has been closed for replies.
Correct answer Newsgroup_User

I don't know the component, but a general way to do such a thing would
be to:

* have the main image show everything
* capture it's image using the BitmapData class, it's draw() method and
a Bitmap object to actually show the captured data.
* the draw method needs to be called with a matrix that scales the image


thing you need to have is the 2400x2400 (!?) render fully while
capturing. Depending on the accuracy you wish in the minimap you may
only need to do that once or after each minor change in the component.
The latter may possibly bring along some problems but again, it depends
on the component and it's use...


manofspirit wrote:
> @Manno + Kglad
> Manoo is right, this is what i actually want to do,
> A minimap for panning and zooming
>
> Now there are two solutions
> 1st as mano described
> for saving cpu cycles i need to capture a small size bitmap of the whole big
> image (2400x2400)
>
> 2nd
> To make a second small (by scaling down) object which will just behave like a
> mirror, like i described before
>
> Now please , guide me by giving a good direction for a layman
>
> Thanks to u both guys
>

10 replies

ARazaAuthor
Known Participant
March 19, 2009
Thanks
works perfect
right now component has some limitations, so i have stopped further work,
will get back with a new thread after its release
thanks agaain :)
ARazaAuthor
Known Participant
March 17, 2009
@Manno Bult
Thanks for the reply, ill trying to implement things like u described
and will get back 2 u in this post
thanks once again :)
Inspiring
March 17, 2009
You're welcome.
For messing around with Bitmaps and BitmapData I'd do some test with a simple movieClip first. I had some moments of feeling completely incompetent while applying the matrix stuff while drawing bitmapdata. Hope you won't :)
Newsgroup_UserCorrect answer
Inspiring
March 16, 2009

I don't know the component, but a general way to do such a thing would
be to:

* have the main image show everything
* capture it's image using the BitmapData class, it's draw() method and
a Bitmap object to actually show the captured data.
* the draw method needs to be called with a matrix that scales the image


thing you need to have is the 2400x2400 (!?) render fully while
capturing. Depending on the accuracy you wish in the minimap you may
only need to do that once or after each minor change in the component.
The latter may possibly bring along some problems but again, it depends
on the component and it's use...


manofspirit wrote:
> @Manno + Kglad
> Manoo is right, this is what i actually want to do,
> A minimap for panning and zooming
>
> Now there are two solutions
> 1st as mano described
> for saving cpu cycles i need to capture a small size bitmap of the whole big
> image (2400x2400)
>
> 2nd
> To make a second small (by scaling down) object which will just behave like a
> mirror, like i described before
>
> Now please , guide me by giving a good direction for a layman
>
> Thanks to u both guys
>
ARazaAuthor
Known Participant
March 16, 2009
@Manno + Kglad
Manoo is right, this is what i actually want to do,
A minimap for panning and zooming

Now there are two solutions
1st as mano described
for saving cpu cycles i need to capture a small size bitmap of the whole big image (2400x2400)

2nd
To make a second small (by scaling down) object which will just behave like a mirror, like i described before

Now please , guide me by giving a good direction for a layman

Thanks to u both guys
kglad
Community Expert
Community Expert
March 16, 2009
he's using a component called visualizer.
Inspiring
March 16, 2009
Ok, but then as he says cloning it and resizing to something smaller to display as a 'minimap' would prove a too heavy load of the CPU. Then grabbing a snapshot of the main thing to save CPU cycles would still be worth a try.
kglad
Community Expert
Community Expert
March 16, 2009
check their documentation. your questions are related to a component and not actionscript.
Inspiring
March 16, 2009
I suppose manofspirit means to have a 'minimap' like, in games, a small overview of the whole map while the main screen shows a small section of that same map (zoomed in).

This does not really have a lot to do with components does it? A scaled clone of what he has would probably duplicate the CPU load as he says.

Then making a bitmapcopy of it would be a nice solution I suppose. Look at the BitmapData and Bitmap APIs to create scaled, non interactive, copies of objects on stage.
ARazaAuthor
Known Participant
March 16, 2009
set size etc are available
but question is
how can i make same copy of an object?
like if i change something in main big object, then how could it reflects changes in small object?

I want to make a mirror object, whatever we ll do with the one object, samethings will happen with the small.

Thanks
kglad
Community Expert
Community Expert
March 16, 2009
check their help files. normally components are sized using setSize(w,h).
ARazaAuthor
Known Participant
March 15, 2009
Here it is
http://lab.kapit.fr/display/visualizer/Visualizer

If i scale the visualization then there will be 2 visualizations, which will affect the performance

Secondly, i want to make a mini map, like this
http://www.flashden.net/item/zoom-map-products-v1-minimap/23194

So in this context, what do u suggest to me?
kglad
Community Expert
Community Expert
March 15, 2009
what's "visualizer"?

and you can use scaleX,scaleY or the width,height properties of displayobjects to resize your visualization.