Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scanning a .fla file forAction Script ?

Status
Not open for further replies.

michanagel

Technical User
Jun 23, 2007
34
US
Hi,

I bought this template 'cause I wanna use certain stuff for my page.

Unfortunately when I copied out the parts that I need, they don't really work anymore, probably because some Action Script Code is missing or has to be adjusted...

I managed to adjust certain parts of code that I found so it's working partially but not all of it...

So here's my question:

Is there any way of scanning a .fla file for Action Script Code ?

I mean finding the keyframes with the 'a' on top of it is not the problem, but sometimes when u apply action script code to a movieclip the 'a' is not displayed in the timeline, which makes it super hard to find those entries...

Thanx for your help in advance !

Mike

P.S.: If anybody is interested in the detail of the problems that I have here's the info:

The part that I wanna use is a preview thumbnail bar which has an arrow on top and bottom of it - when u press them it moves the preview thumbnails bar up / down to reveal the other thumbnails.

It does it very nice & smoothly with a good portion of easing at the end that's why I wanna use this transition.

Also: if there are no more preview thumbnails to show the button stops working which is perfect.

Here's the code that is applied to the preview thumbnails (which is a movieclip) - it's all Action Script 2 :

onClipEvent (load) {
accel =0;
rate = 0.05;
trace(_y)
_root.ykoord=20.5;
}

onClipEvent(enterFrame) {
y=y*accel+(_root.ykoord-_y) * rate;
_y+=y;
if(Math.abs(_root.ykoord-_y)<1) { _y=_root.ykoord; }

}

--> I'm guessing that I'm missing some Action Script in general in that fla.

--> Is ykoord a var or what does it refer to ? I tried to find that term via the help function but a no go...

--> If it is a var it would have to be established somewhere which means i'm missing that code...


Here's the code that is applied to one of the arrow buttons:

on (rollOver) {
gotoAndPlay("S1");
}
on (releaseOutside, rollOut) {
gotoAndPlay("S2");
}
on (release) {
if (_root.ykoord>-200) {
_root.ykoord -= 308;
}
}

The rollover effect for the button is working, just when u click on them nothing is moving / transitioning.

Like I said, in the original template the code is working and unfortunately my action script skills are very, very limited....

Any help is very much appreciated !

Mike
 
when you are copying the sybmbols from this file are the instance names copying with them?

each symbol in flash is usually given an instance name so that the actionscript can locate it on the stage

by the sounds of it ykoord is a movie clip which means its instance name should be ykoord otherwise the _root.ykoord functions wont work

try just going through your movie clip with your properties panel open and click on each symbol on the stage and check its intance name against the ones your trying to copy into another .fla file

s1 and s2 sound like frame labels
which should show up as a little red flag with on the keyframe on the time line, again just check to see these are in place

because if the frame labels s1 and s2 are missing when you say on(rollover){gotoAndPlay("s1");} you are infact telling the movie to find a frame called s1 and play it - but if this frame isnt labelled, or is labelled incorrectly the script cant work
 
Under Window->Movie Explorer (assuiming the Show Actionscript tab is enabled...) you should be able to see all code in the original file... Double-clicking on a symbol in the Movie Explorer list should open up that symbol, where you'll find the code that was listed...

Regards. FLASH HELP - OPENED FOR BUSINESS!
TO GET YOUR OWN FREE WEBSITE HOSTING
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top