BetaArchive Logo
Navigation Home Screenshots Image Uploader Server Info FTP Servers Wiki Forum RSS Feed Rules Please Donate
UP: 6d, 21h, 8m | CPU: 44% | MEM: 2050MB of 4305MB used
{The community for beta collectors}

Forum rules


Any off topic discussions should go in this forum. Post count is not increased by posting here.
FTP Access status is required to post in this forum. Find out how to get it


Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 PostPost subject: Help with Flash 7 Actionscript        Posted: Fri Jul 11, 2008 3:50 pm 
FTP Access
User avatar
Offline

Joined
Tue Jun 17, 2008 12:47 am

Posts
28

Location
Friul, Italy
Is there a line of actionscript code for Flash 7 which randomizes between going on two different frames? If yes, please tell me what it is.


Basically all I want to do: When somebody comes to my web page, they either get Frame 1 or Frame 2 with frame 1 a more probable outcome


Top  Profile
 PostPost subject:        Posted: Fri Jul 11, 2008 4:44 pm 
FTP Access
Offline

Joined
Tue Jul 08, 2008 10:06 am

Posts
48
Frame 1: contains the actionscript:

Code:
ranNo = Math.random();
if(ranNo >= 0.25){
   gotoAndStop(2);
}else{
   gotoAndStop(3);
}


Frame 2: is the most probable frame (3 in 4)
Frame 3: the less likely (1 in 4)

you can muck around with the probability


Top  Profile
 PostPost subject: Thank You        Posted: Fri Jul 11, 2008 5:57 pm 
FTP Access
User avatar
Offline

Joined
Tue Jun 17, 2008 12:47 am

Posts
28

Location
Friul, Italy
Thank you, It works!


Top  Profile
 PostPost subject:        Posted: Mon Aug 25, 2008 7:17 am 
Thank You


Top
 PostPost subject:        Posted: Mon Aug 25, 2008 1:14 pm 
Donator
Offline

Joined
Sat Feb 24, 2007 4:14 pm

Posts
6612

Location
United Kingdom

Favourite OS
Server 2012 R2
A pointless bump. Please read the rules. Posts that consist of 'Ok', 'Thank you', etc don't count as contributing anyway.

Topic Locked

_________________
BuildFeed - the ultimate collaborative NT build list - Windows Longhorn - a look at a defining Microsoft project


Top  Profile  WWW
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 




Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  

All views expressed in these forums are those of the author and do not necessarily represent the views of the BetaArchive site owner.

Powered by phpBB® Forum Software © phpBB Group

Copyright © 2006-2018

 

Sitemap | XML | RSS