Flash Chart Help
- Started
- Last post
- 23 Responses
- blackspade
Hey all
So im trying to create a flash chart of this University's Structure.
heres what I've built far...
http://webdev1.otago.ac.nz/organ…but I want each box (with blue text) to link thru to the respective chart, and still be zoomable
im having troubles achieving this. (bit of a flash novice) ...any help would be greatly appreciated
I can post the .fla's if that helps.
Thanks in advance.
- blackspade0
bump 8)
- tGP0
hi blackspade...
i dont know if i follow you completely... are you wanting it so that when the user clicks a button, the chart loads another chart into it, so the orignal chart is still intact and at the same zoom level as the user had it before making his choice?...
cheers
j
- Beech0
I'm not sure either. The zoom out function doesn't work in my browser OSX camino. Sorry i'm not much help.
- blackspade0
hi tGP,
there is a top level chart (as shown on the URL above) on which each blue heading needs to link through to the respective chart for that heading.
so I have 2 .fla's, one with the framework (banner zoom buttons etc) and one which is the chart itself.
what im thinking I need to do is create new scene's on the chart .fla, for each of the charts that would need linking to
kinda hard to explain, clear as mud ?
- unfittoprint0
don't use scenes. u save all chart sections into separeate swf files. all content should be acessed on demand only making everything work faster.
you could include a loop for the zoomable effect to be more smoother.
One would click a section, a variable would hold the content's path. When the section reached its target zoom, call its respective content by using the variable's string value within the loadMovie path.
- blackspade0
thanks unfit.
ta for tip on not using scenes
I Will look into how to call each chart as a seperate swf.
you lost me there a bit tho, ..im very much a flash novice :)
- blackspade0
hey unfit
so I have this test button going...
(green squarebutton)http://webdev1.otago.ac.nz/organ…
Which is working sweet, linking through to a seperate test .swf.
but, how then do I get the green button to load another chart, 'within' the top level swf, as the index swf is doing?
- unfittoprint0
ifwhere your main chart resides, you could make content holder MC:
this.createEmptyMovieClip(2holde... 50);
if your button exists within the chart mc you could write the following:
myButton.onPress(){
//disables main chart
this._parent._visible = false;//loads new content
this._parent._parent.loadMovie...
}
- blackspade0
yes my button exists within the chart MC
i tried applying;
myButton.onPress(){
//disables main chart
this._parent._visibl e = false;//loads new content
this._parent._parent .loadMovie("section1 .swf");
}but it gave me errors ?
- blackspade0
Symbol=Map Button, Layer=Layer 1, Frame=1: Line 3:
Statement must appear within on handler
this._parent._parent .loadMovie("operations.swf");
Symbol=Map Button, Layer=Layer 1, Frame=1: Line 4:
Unexpected '}' encountered
}
- tGP0
try this:
myButton.onPress = function () {
this._parent._visible = false;
this._parent._parent.loadMovie...
};
- blackspade0
k will try that...
- blackspade0
hmmm this is where I am fucking up...
myButton.onPress = function () {
it tells me: "Statement must appear within on handler"
so if my button is called 'test' what do i need to put in here...
myButton.onPress = function () {
?
- instantok0
if your button is called "test" then it is
test.onPress = function () {
your function goes here
}
- tGP0
blackspade, take into consideration that A) you must have your buttons instance named on the stage, and B) the syntax myButton.onPress... is assuming we are using movieclip buttons, if you are using flash buttons (with hit, up, over states) you need to put the code directly on the button and use:
on (press) {
_root.myPath.myClip1._visible = false;
_root.myPath.myClip2.loadMovie...}
as you can see, one of the advantages of using movieclips as buttons, is that you can centralize your button code and place it in a central location, such as the main timeline, and this tends to make targeting a bit less complex...
cheers.
j
- tGP0
in my example, be sure to exchange "myPath" with the correct path to these two instances...
- unfittoprint0
the handler error means that your pasting the code directly into the button. wrong. you shoudl paste into an action layer, after naming your instance.
pasting your actions into layers allow your code to be centralized. Avoid using code directly into MC's/buttons.
- blackspade0
farkin fantastic guys, thanks for the responses & tips
let u know how i got on
- blackspade0
argghhh k, bear with me guys!
I have an actions layer, now with the following AS on the index chart...
-----test.onPress = function () {
this._parent._visible = false;
this._parent._parent.loadMovie...
};Stage.align = "TL";
Stage.scaleMode = "noBorder";stop();
--------
im a bit confused as to what u mean by movie clip buttons, and flash buttons ?
The instance of the green test button ive created on the stage is called 'test'
I just went > convert to symbol, > button. ..does that make it a flash button or...?
:?