flash help
- Started
- Last post
- 10 Responses
- spiralstarez
I'm making a map type application with zoom functionality, etc. etc.
Is there a reason why Stage.height would equal 480 when I have it set to 580 in the properties?
The only thing I can see is that it was created in 8, saved to 2004 and opened in 2004 right now as I'm having the prob.
Suggestions?
Thx
- fugged0
I think Stage.height/width can return values inconsistant with what you've set in the movie properties if you are viewing it in the flash player in author mode.
Try publishing and viewing in the HTML page (?)
- UndoUndo0
Stage.height is read only, when have you set it to 580 in html?
- UndoUndo0
ignore 'when' in that last statement!
- spiralstarez0
Oh ok. I haven't published it to HTML. I thought Stage.height/width properties were what you set in the FLA
I was going to init the map size to the stage height and width but I think I'm just going to do it manually rather than taking the stage property.
Thx
- spiralstarez0
okay so I have a real question this time. Googled a bit and can't find it exactly.
the map is zoomable, and it needs to have boundaries that are the stage like this diagram
I have this already defined for the drag:
mapMovie.onPress = function() {
startDrag(this);
}
mapMovie.onRelease = function() {
stopDrag();
}how do I define the boundaries?
- spiralstarez0
bump
- UndoUndo0
you need to work out the max & min x and y positions of the boundaries. it should be something like
max x = 0
min x = stage.width - boundary._width
max y = 0
min y = stage.height- boundary._heightand use them as arguments in the startDrag() function.
look it up in the flash help and it will explain which one goes where
- spiralstarez0
ok cool thanks.
- spiralstarez0
In following up to yesterday:
I got this up and working, and the map has as startDrag(); for the panning.
I'm distributing locations from XML using attachMovie & DuplicateMovie to 'mapMC'
The locationMC has a rollOver function on it, however it doesn't work unless I remove the startDrag(); from the map it's been attached to. And the location depths are higher.
Is there an easy way around this? I've thought of so far creating another invisible overlay on top of the map that echoes its properties and attach the locations to it, but it's a hack and a lot of extra work.
How come my mouse events don't work? :-(
- spiralstarez0
bump
I think the stopDrag(); on my map is blocking out the hit area of the MCs that are attached to it at higher depths, no?
I'm getting frustrated...