Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 4.50 average. Display Modes
Old 09-30-2004, 10:48 AM   #1
kerospu
Kerem ISERI
 
Join Date: Sep 2004
Location: Ankara
Posts: 5
Send a message via ICQ to kerospu
Question Dynamically Increase The Frame Rate

In my interaction I'm asked to put a MUTE button which will chance the sound level to 0. When user mutes the sound the whole animation and the sound takes a long time to wait. I want to double the speed of the animation. So user wont wait for a sound to finish when he/she press MUTE button. I tought only increasing the frame rate would solute my problem because of the initializations of some actions in the middle of animaitons and stuff. I will put this MUTE button to the _level0 where my engine works. All animations are seperate swf files on the _level2 where I use loadMovie function to load upto the engine.

I couldnt find any function to increase the frame speed. I need to do it somehow.

I tried to on dummy document where no sound exists. when I load faster move onto _level0, it also works faster. But when I put sound into the loaded move, it works at the _level0 speed.

I need urgent help. Any ideas about the subject please write down.
kerospu is offline   Reply With Quote
Old 09-30-2004, 01:59 PM   #2
mmm..pi..3.14..
/(bb|[^b]{2})/
 
mmm..pi..3.14..'s Avatar
 
Join Date: May 2004
Location: Denver, CO
Posts: 2,740
Default

Not possible to change the frame rate with actionscript, this has been discussed hundreds of thousands of times. The only way to "simulate" a changing frame rate is to make a tween longer or shorter than it is.

Eric
__________________
Eric Hainer
Unleaded Software
970.581.3387
Email: Eric followed by the AT symbol, unleaded software (one word) DOT com
Denver Web Design
mmm..pi..3.14.. is offline   Reply With Quote
Old 09-30-2004, 02:12 PM   #3
oldnewbie
Banned by AS.org Staff
 
Join Date: Mar 2002
Posts: 10,533
Default

What about these...

http://proto.layer51.com/d.aspx?f=832

Search for "framerate" here: http://www.flashcomponents.net/ -> FPS Controller v2

Or this old way, of doing it...

http://www.phoenix-blaze.com/flash/M...arch/day26.htm

http://www.phoenix-blaze.com/flash/M...rch/info26.htm
oldnewbie is offline   Reply With Quote
Old 09-30-2004, 02:21 PM   #4
kerospu
Kerem ISERI
 
Join Date: Sep 2004
Location: Ankara
Posts: 5
Send a message via ICQ to kerospu
Default

I can see the is no way to directly change the frame rate but there should be some tricks as I tried to explain above. when you load faster frame rated swf onto your swf, both files work faster. but when you put sound in the faster swf and load, files work slower. I am actually searching this kind of trick that will make my swf work faster when user press the mute button.
kerospu is offline   Reply With Quote
Old 09-30-2004, 02:25 PM   #5
binkyboo
Senior Member
 
binkyboo's Avatar
 
Join Date: Mar 2002
Location: Madison, Wisconsin
Posts: 1,312
Send a message via MSN to binkyboo
Default

ActionScript Code:
// adjust speed here speed = 2; _root.onEnterFrame = function() {     gotoAndPlay(_currentframe+speed);    }
binkyboo is offline   Reply With Quote
Old 09-30-2004, 02:34 PM   #6
kerospu
Kerem ISERI
 
Join Date: Sep 2004
Location: Ankara
Posts: 5
Send a message via ICQ to kerospu
Default

Quote:
Originally Posted by oldnewbie

in the exapmle you give, the guy prepared swf s for each framespeed and when you enter a number, below code loads its swf which is impossible for my product

I tried the component yesterday and in its documentery it says in order to use the component everything should be in the movieclips and it doesnt work either.

Last edited by kerospu; 09-30-2004 at 02:40 PM.
kerospu is offline   Reply With Quote
Old 09-30-2004, 02:36 PM   #7
kerospu
Kerem ISERI
 
Join Date: Sep 2004
Location: Ankara
Posts: 5
Send a message via ICQ to kerospu
Default

Quote:
Originally Posted by binkyboo
ActionScript Code:
// adjust speed here speed = 2; _root.onEnterFrame = function() {     gotoAndPlay(_currentframe+speed);    }

in this case movie clips on the root timeline dont work
kerospu is offline   Reply With Quote
Old 04-07-2005, 08:34 AM   #8
kerospu
Kerem ISERI
 
Join Date: Sep 2004
Location: Ankara
Posts: 5
Send a message via ICQ to kerospu
Thumbs up

I was searching the posts and I realized I didnt write here how I solved my problem.

I made 2 .as files : addMC.as and removeMC.as . in the .as files there is only a function call like : _level0.addMC(this); and _level0.removeMC(this);
I'll explain why I used .as files later. For each MC I needed to increase the framerate, I included the addMC.as at the first frame and removeMC.as at the last frame of the MC. Let me tell you what addMC and removeMC functions does; they simply add and remove their name and their path together into an array which holds the MCs are gonna play faster. I wasnt sure before it worked and I might need to add more codes for each MC or not. Thats the reason why I choice to use .as files to avoide manipulating every MC again and again. Anyways, after knowing the MCs was gonna play fast, at _level0 I made another function which simply makes
gotoAndStop(_currentframe+1) for every element of the Array I added the names and ofcourse the root. With the interval I called this function and my frame rate was seemed to changed. My solution was a little tricky but at least it still works fine. I can send a sample file if someone needs is.

Thanx for all help and sorry for the late response. Peace!!
kerospu is offline   Reply With Quote
Old 10-05-2007, 11:15 AM   #9
flashfrog
Registered User
 
Join Date: Sep 2007
Posts: 8
Default I would like to see this if you still have it

I am new to actionscript but I would like to see how you solved it.
flashfrog is offline   Reply With Quote
Old 10-05-2007, 02:27 PM   #10
theMonseignuer
Registered User
 
Join Date: Oct 2007
Posts: 27
Default I'd like to see it too

I'd like to see this code as well
theMonseignuer is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:06 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.