Flash Chart Help
- Started
- Last post
- 23 Responses
- blackspade0
bump
im about to give up on this :(
- blackspade0
http://webdev1.otago.ac.nz/organ…
the blue box is a button MC, but it still wont link thru to the next chart :(
think I might have bitten of more than I can chew deciding to build this in flash.
also, if you zoom in and out youll notice the blue button doesnt re-size with the chart, it stays put.
I tried making the blue button MC inside the chart MV which didnt work.
- blackspade0
nice =)
chur!
- 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...?
:?
- blackspade0
farkin fantastic guys, thanks for the responses & tips
let u know how i got on
- 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.
- tGP0
in my example, be sure to exchange "myPath" with the correct path to these two instances...
- 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
- instantok0
if your button is called "test" then it is
test.onPress = function () {
your function goes here
}
- 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 () {
?
- blackspade0
k will try that...
- tGP0
try this:
myButton.onPress = function () {
this._parent._visible = false;
this._parent._parent.loadMovie...
};
- 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
}
- 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 ?
- 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
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?
- 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 :)
- 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
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 ?