Random Blink Code - Can Someone Show Me How To Use It?
This code comes from Claudio old post to generate random blink
Code:
tMin = 5;
tMax = 10;
function randomblips() {
randommc = Math.floor(Math.random()*5)+1;
_root["mc"+randommc].gotoAndPlay(2);
clearInterval(moveInt);
t = Math.round((Math.random()*(tMax-tMin))+tMin)*1000;
moveInt = setInterval(randomblips, t);
}
moveInt = setInterval(randomblips, 1000)
and this is the link : http://www.kirupa.com/forum/showthre...ighlight=blink
Can someone show me how to use this code?
Thank you
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX
Posted on: 01-27-2005, 07:16 AM
View Complete Forum Thread with Replies
Sponsored Links:
Random Blink Code - Can Someone Show Me How To Use It?
This code comes from Claudio old post to generate random blink
Code:
tMin = 5;
tMax = 10;
function randomblips() {
randommc = Math.floor(Math.random()*5)+1;
_root["mc"+randommc].gotoAndPlay(2);
clearInterval(moveInt);
t = Math.round((Math.random()*(tMax-tMin))+tMin)*1000;
moveInt = setInterval(randomblips, t);
}
moveInt = setInterval(randomblips, 1000)
and this is the link : http://www.kirupa.com/forum/showthre...ighlight=blink
Can someone show me how to use this code?
Thank you
View Replies !
View Related
Generate Unique Random Blink & Hide
Hello guys.. Im making a game where there are 25 tiles with corresponding questions when you click them. One of the tiles must blink at a time, once the blinking tile was selected it will be hidden and the question will appear. If he answered wrong, the game is over else we will select another blinking tile after answering correctly (but the previous tile is hidden now). So how can i make the tiles blink or change its color using AS? And how i will select the available tiles, where some tiles are already disabled/hidden (already answered)?
here is my pseudocode: (im not yet familiar with AS2 OOP concepts so im will use movie clips here & array to save the selected tiles)
Quote:
select unique random no. from 0 - 25
check if it is in the array1.length not 0 && generated rand. no. is not in the array1
else store generated rand. no. to array1
tell movieclip(array1[0]) goto blink frame
if movieclip(array1[0]) finished blink
goto not blink frame
else
hide the tile
any better idea?
thankz for the one who will reply.. thankz in advance!
View Replies !
View Related
Blink Function With Revised Code
check out this code.. still havent got it to work, but im trying to pass a movie clip object to the function to make it blink-in.. an affect ive seen on a lot of cool sites! let me know if you know how to implement this and/or improve on this code:
blink = function(object,seed,count,rate){
// Arguments for function
// object - is the movieclip
// seed - is the initial delay
// rate - is the rate of change
// Delay Method is local to the blink function
function delay(){
clearInterval(timer);
}
//--->
// Main Loop of Blink function
do{
for (i=count; i > 0; i=i-1){
//blink-node
object._visible = false;
timer = setInterval(delay, seed*1000);
object._visible = true;
//--->
}
// Reiterations-->
count = count - int(rate/5);
if(count<1){ count=4;}
seed = seed * rate
}while(seed<1);
//--->
}
THANKS FLASHERS ! lol
[Edited by SOKALPAPI on 09-07-2002 at 06:11 AM]
View Replies !
View Related
Generate Unique Random Object Blink & Hide
Hello guys.. Im making a game where there are 25 tiles with corresponding questions when you click them. One of the tiles must blink at a time, once the blinking tile was selected it will be hidden and the question will appear. If he answered wrong, the game is over else we will select another blinking tile after answering correctly (but the previous tile is hidden now). So how can i make the tiles blink or change its color using AS? And how i will select the available tiles, where some tiles are already disabled/hidden (already answered)?
here is my pseudocode: (im not yet familiar with AS2 OOP concepts so im will use movie clips here & array to save the selected tiles)
Quote:
select unique random no. from 0 - 25
check if it is in the array1.length not 0 && generated rand. no. is not in the array1
else store generated rand. no. to array1
tell movieclip(array1[0]) goto blink frame
if movieclip(array1[0]) finished blink
goto not blink frame
else
hide the tile
any better idea?
thankz for the one who will reply.. thankz in advance!
View Replies !
View Related
Show Random SWF's
On the main page of my site I have a flash movie that runs. I have created two more flash movies, and I would like them to play randomely when a the home page is opened.
So when the home page is opened, sometimes it will run movie 1, sometimes movie 2 and sometimes movie 3. Does anyone know the code to generate this? Thank you.
The following is the existing code that calls only the single movie:
width="780" height="272" id="burger-flash" align=""><param name=movie value="swf/wrap-flash.swf"><param name=quality value=high><param name=bgcolor value=#CC3300><param name=border value=#CC3300><embed src="swf/wrap-flash.swf" quality=high bgcolor=#CC3300
View Replies !
View Related
Show Random SWF's
On the main page of my site I have a flash movie that runs. I have created two more flash movies, and I would like them to play randomely when a the home page is opened.
So when the home page is opened, sometimes it will run movie 1, sometimes movie 2 and sometimes movie 3. Does anyone know the code to generate this? Thank you.
View Replies !
View Related
Show Random Frames?
Hi all
Is it possible to show frames randomly in a flash .swf file?
I can achieve the effect in javascript but I am wanting to do it in flash to tie it in better.
Any correspondence would be greatly appreciated.
Len
View Replies !
View Related
Random Slide Show Help :-(
I am trying to figure out how to make a slide show where the images show themselves randomly yet never repeating the same image but at the end they always end up on this one picture. If anyone could help that would be greatly appreciated.
thanks, James
View Replies !
View Related
Select And Show Mc At Random
Im trying to have one of two MCs show at random.
Anyone see whats wrong with my script?
The instance names are face_1 and face_2
Code:
face_1._alpha=0;
face_2._alpha=0;
stop();
/* select a random face pic from the ones available */
rand=Math.random();
trace(rand);
if (rand<=0.5){
shw=2;
}
else {
shw=1;
};
unhide=['face_'+shw];
trace(unhide);
unhide._alpha=100;
thanks
<added> FLASH MX</added>
View Replies !
View Related
Presenting A Slide Show At Random.
I'm trying to present a fade in, fade out slide show, that contains about 20 pics. So I want to present them in random order.
I'm sure this needs some actionscripting but I'm not sure how to work it out.
I'm also trying to create a menu bar like that found on www.dieselmarketing.com.
I've almost got it, but need some help on the actionscript.
View Replies !
View Related
How Do I Show A New Random Image Every 5 Seconds?
Hey I've been working on this project for a long time for my company. I've been trying to learn flash, but I just can't figure out how to START the project.
I want to show a random image, and then every 5 seconds or so I want to fade it into a different image, and let the process repeat. Does anyone know how to do this?
(I'm using Flash MX 2004)
View Replies !
View Related
Show Random Words From A Word List
Hi there. I need some help here, I need to do a text box or something that when pressing a button, displays a random word from a list of words that I'll write. I have no idea exactly how to do it, could anyone tell me what I have to do?
Thanks!
View Replies !
View Related
[MX04] Show Images In Random Order
i have a client that started out loving my simple alpha fade movie of his portfolio images.
now he has asked me if they can appear in random order.
well, i don't have a clue and his site was gonna be inexpensive.
here's the link to his format test site.
http://www.amotionstudio.com/KDC.html
any ideas out there?
thanks in advance for your time.
View Replies !
View Related
Slide Show - Random Items To Stage -help
17 slides
each slide: (each on separate layers)
image of a shool subject
static text box with subject in a second language
a button to advance to next frame
call in a picture which allows students to give a give an opinion like It's great/It's boring/I't fun etc. (this is where I need help see below)
frame label f1/f2 etc
AS on layer slpit into 17 keyframes which intructs forward button to move to the next frame (so if you are on f4 the AS says onto F5 and at frame 17 the AS sends you back to frame one again.
I have created the pictures for the opinions and made them into movieclips which only exist in the library.
How do I script it so that when I press the opinions button a random opinion movie clip comes to the stage when I run the slide show?
Make it obvious if you think you can help. It it about creating variables or and array? (a little knowledgs is a dangerous thing)
I'm running MX 2000 Educational
Cheers
Huw
View Replies !
View Related
Movies Won't Show Up, But Everything Code-wise Is Right
I've got a code that works just fine for loading external jpgs into movies in a scrollpane when used like this:
Code:
_root.scrollpane_sp.contentPath = "movieclipbox_mc" //Movieclipbox_mc is the linkage id of an empty movieclip in the library.
//Set up the MovieClipLoader listener.
var myLoader:MovieClipLoader= new MovieClipLoader();
var myListener:Object= new Object();
myListener.onLoadInit = function(mc){
_root.scrollpane_sp.invalidate();
trace("Scrollpane redrawn.");
}
myLoader.addListener(myListener);
//Load jpgs into newly created movies in movieclipbox_mc (instance name of spContentHolder) with MovieClipLoader.
myLoader.loadClip("file:////lee6/ltjones%24/Achievements/1%20Web%20Updates/Testing/FrontPageImages%20ColorChange/lezimages/fairy.jpg", scrollpane_sp.spContentHolder.createEmptyMovieClip("fairymovie_mc", scrollpane_sp.spContentHolder.getNextHighestDepth()));
myLoader.loadClip("file:////lee6/ltjones%24/Achievements/1%20Web%20Updates/Testing/FrontPageImages%20ColorChange/lezimages/stainedf.jpg", scrollpane_sp.spContentHolder.createEmptyMovieClip("stainedfmovie_mc", scrollpane_sp.spContentHolder.getNextHighestDepth()));
scrollpane_sp.spContentHolder["stainedfmovie_mc"]._x = 250;
myLoader.loadClip("file:////lee6/ltjones%24/Achievements/1%20Web%20Updates/Testing/FrontPageImages%20ColorChange/lezimages/stainedf.jpg", scrollpane_sp.spContentHolder.createEmptyMovieClip("stainedfmovie_mc2", scrollpane_sp.spContentHolder.getNextHighestDepth()));
scrollpane_sp.spContentHolder.stainedfmovie_mc2._y = 300;
But when I modify this code to make it into a formula that grabs a list of images off an .asp page and loads each one into a movie in the scrollpane, the movies won't show up!, even though the scrollpane resizes itself as if they are there. They aren't selectable either, and they should be with this code. Anyone see some common mistake I'm making here? (Hopefully!)
Code:
cacheKill = new Data().getTime();
trace(cacheKill);
myVars = new LoadVars();
myVars.load("http://development.MYSITE.com/testing/homepageimages-testing/new-images-list.asp?"+cacheKill);
myVars.onLoad = function(){
trace(myVars.images_list);
image_array = myVars.images_list.split(",");
_root.image_array_length = image_array.length - 1;
trace (image_array.length);
loadPics();
}
stop();
_root.scrollpane_sp.contentPath = "movieclipbox_mc"
//Set up the MovieClipLoader listener.
var myLoader:MovieClipLoader= new MovieClipLoader();
var myListener:Object= new Object();
myListener.onLoadInit = function(mc){
_root.scrollpane_sp.invalidate();
trace("SP redrawn for image" + i);
}
myLoader.addListener(myListener);
//Load jpgs into newly created movies in movieclipbox_mc (instance name of spContentHolder) with MovieClipLoader.
function loadPics(){
for (i=0; i<= _root.image_array_length - 1 ; i++){
myLoader.loadClip("http://development.MYSITE.com/testing/homepageimages-testing/images/new-images/" + image_array[i]+"?cb=11", this.scrollpane_sp.spContentHolder.createEmptyMovieClip("image" + i, this.scrollpane_sp.spContentHolder.getNextHighestDepth()));
//Image positioning.
myY = Math.floor(i/5);
myX = Math.floor(i%5);
trace("image"+i+" myY="+myY+" myX="+myX);
this.scrollpane_sp.spContentHolder["image"+i]._y = 344+46*myY;
this.scrollpane_sp.spContentHolder["image"+i]._x = 32+90*myX;
//Image dimesions.
this.scrollpane_sp.spContentHolder["image"+i]._yscale = 20;
this.scrollpane_sp.spContentHolder["image"+i]._xscale = 20;
}
}
//Default code.
myListener.onLoadComplete = function(targetMC){
targetMC.onPress = function() {
photoName = targetMC._name;
trace("photoname="+photoName);
photoName = photoName.slice(5);
cont.autoLoad = false;
cont.contentPath = "http://development.MYSITE.com/testing/homepageimages-testing/images/new-images/" + image_array[photoName];
pBar.source = loader;
cont.load();
this.photoname_txt.refresh()
photoname_txt.text = targetMC._name+".jpg";
}
}
View Replies !
View Related
FMX...Code For Button To Show Video
Hi everyone,
Im really struggling with this one so if any of you knows this please help. Im looking for a button code so when a user clicks on it a specific video which is included in the library will show up in the same screen. If anyone knows which code i should attach to this button to pop up the video please let me know...
thanx a lot
View Replies !
View Related
FMX...Code For Button To Show Video
Hi everyone,
Im really struggling with this one so if any of you knows this please help. Im looking for a button code so when a user clicks on it a specific video which is included in the library will show up in the same screen. If anyone knows which code i should attach to this button to pop up the video please let me know...
thanx a lot
View Replies !
View Related
Autoplay And Random Play From MX Built-in Slide Show
I've modified the FlashMX 2004 built-in slide show template as a simple banner rotation. Does anyone have any ideas on how I can get it to start autoplaying from the start rather than waiting on the user to start the autoplay? Also I'd like for it to start randomly, not always on the first picture. I've included the fla saved in MX format.
View Replies !
View Related
Loading Pics From Directory For Random Slide Show
Hi,
I am hoping to be able to use flash for what I'm trying to do...I know how to do it in php, Asp etc but I haven't learned much actionscript, yet.
Can someone help me out with how to load random images from a directory into a movie. I want to have a movie divided into squares and show the different faces of missing children as the movie reloads, php/asp would necessitate page reload and that's no good. Anyhelp would be greatly appreciated. If you're hesitant to help I'd be willing to offer my expertise in return -> php, asp, mssql, mysql
Thanks and Best
ps..I'm not a newbie fishing for people to fill in the blanks..see site/portfolio!
View Replies !
View Related
Code For Autoplay Slide Show NOT WORKING, PLEASE HELP
Hi There,
I've been working on a presentation, and in this presentation is an image slide show. I set this up to the best of my knowledge....Here is how I have it set up:
I have an MC called slide_show which resides on a frame label on the root-or main timeline....in this MC, I have the first 24 frames with an image on each frame(24 images in all). I am using the nextFrame() and prevFrame() scripts on buttons to go to the next or previous image..for manual viewing. I would also like to have the images auto play at about 3 second intervals. Right now, I have this set up so that when the auto play button is pressed, it goes to a frame labeled "auto" with the images on 24 frames (which actually starts at frame 35, after the manual images).
I would like to use the following code:
changeID = setInterval(function () {
// stop the setInterval from running again
clearInterval(changeID);
// start up 'changeFunc' which changes picture
changeFunc();
},3000);
I put this code on frame 35 or frame Label "auto" and have the autoplay button code as:
on(release) {
gotoAndPlay("auto");
}
well, this doesn't work! What am I doing wrong? And how can I get this to auto play with my current setup? I don't have much time left here! I really appreciate your help on this matter. If my setup is wrong, or if I am missing some code somewhere, please let me know. How do I do this thing right?
Thanks for the help! =)
Valerie
View Replies !
View Related
[F8] How To Use Code (not Keyframes) To Show An Image For X Seconds?
Hi,
I have searched through Flash's help files (deplorable!) the FK site and the web via Google to try and find an answer to what I think is a very simple question, but no luck so far!
What I want to do in my flash is show a sequence of photos like an automatic slideshow. (no back and forth buttons, just automatically playing.)
I want each photo to show for a few seconds before displaying the next. I already know how to do this by making lots and lots of frames of the first image that "play" and then switch to the second image and repeat that image for tons and tons of frames, and so on, but this can't be the most efficient way to do it!?
Is there a way to assign code to each image that tells it to show for a few seconds before showing the next image?
I'd like all the images to be in single keyframes next to each other on the same line.
I would greatly appreciate any help!
Thanks!
View Replies !
View Related
SUBMENUS (our History) WILL NOT SHOW What's Wrong With My Code?
THIS CODE (ABOUT_US.FLA) RUNS THROUGH TO A MASTER.FLA (WHICH IS BELOW)
/-----------<load CSS>----------- \
var cssStyles:TextField.StyleSheet = new TextField.StyleSheet();
cssStyles.load("styles/styles.css");
cssStyles.onLoad = function(success) {
if (success) {
loadedInfo.styleSheet = cssStyles;
_level0.myLV.load("vars/ourHistory2.txt");
} else {
loadedInfo.text = "There has been error loading the requested information. Please contact the Webmaster and report your error.";
}
}
//-----------</load CSS>----------- \
var scrollDirection:String;
//-----------<scroll buttons>----------- \
this.scrollDown.onPress = function() {
scrollDirection = "down";
scrollText();
}
this.scrollUp.onPress = function() {
scrollDirection = "up";
scrollText();
}
function scrollText() {
_root.onEnterFrame = function() {
if (scrollDirection == "up") {
loadedInfo.scroll -= 1;
} else if (scrollDirection == "down") {
loadedInfo.scroll += 1;
}
}
}
//-----------</scroll buttons>----------- \
// created Textformat object that defines the states of the sub-menu options
//----------------------------<SubMenu>------------------------------//
var optionDisable:TextFormat = new TextFormat("Bitstream Vera Sans", 12, null,true, true);
var optionEnable:TextFormat = new TextFormat("Bitstream Vera Sans", 11, null, false, true);
//disable the submenu option that corresponds to the current loaded section for example Our History is what you first see on the page so that menu should be disabled
this.ourHistoryMC.myText.setTextFormat(optionDisab le);
//this.ourStaffMC.myText.setTextFormat(optionEnable) ;
//-----------------------</SubMenu>------------------------------//
MASTER.FLA CODE:
stop ();
//--------------------<movieclip loader>-------------------------\
var myMCL:MovieClipLoader= new MovieClipLoader();
var myListener:Object = new Object ();
myMCL.addListener(myListener);
//-------------------</end of movieclip loader>-------------------------\
myMCL.loadClip("trigger.swf", 5);
// this step will load the shared library once it is done loading
//it will then go to kf 10 and load the splash swf file
//--------------------<LOAD VARS>-------------------------\
var myLV:LoadVars = new LoadVars();
myLV.onLoad = function(success) {
//What happens if function(success) is true, tell_level5(where ALL content loads into)the value of variable
if (success) {
_level5.loadedInfo.htmlText = myLV.info;
} else {
_level5.loadedInfo.text = "There has been error loading the requested information. Please contact the Webmaster and report your error.";
}
}
//--------------------</LOAD VARS>-------------------------\
//----------------KEYFRAME 10 CODE FOR Master.fla----------\
stop();
myMCL.loadClip("about_usJAN05.swf", 5);
///myMCL.loadClip("splash.swf", 5);
//myMCL.loadClip("frames.swf", 5);
View Replies !
View Related
Slide Show With Cue Point, Totally By Code
Hi everybody, I've got a question for you
I have to create a slide show flash file, with a video that shows a lesson and some jpg files (showing subtitles) that appears at some determinated cuepoints, I want to create that application all by code, without using flash grafic interface
In your opinion, How can I do?
I think I have to use 2 objects: MediaDisplay, MediaController and link both together by an association by code, then use the event like Behaviors panel do, but by code... All made in a slide show file...
The only real problem with that, is making and adding an instace of these objects to stage, I mean... I've done it, but I hear the audio and I don't see the video...
I'm right using these objects or I must change my ideas?
View Replies !
View Related
How To Display Photos Array In Random Way Without Repeating Till First Show
Hi!
Can anybody help me please?
I´ve got a button and an empty movie clip. I´d like to show 4 photos in a random way but wihtout repeating it till all of them are shown first.
Code:
-On the first frame I have:
last_number=0
-On the button I have:
on (release) {
do {
indice=Math.Round(Math.random()*(10/3))
}
while(indice==last_number)
last_number=indice;
switch(indice){
case 0:
container.loadMovie("img/sesion_5_3_0.jpg");
break;
case 1:
container.loadMovie("img/sesion_5_3_1.jpg");
break;
case 2:
container.loadMovie("img/sesion_5_3_2.jpg");
break;
case 3:
container.loadMovie("img/sesion_5_3_3.jpg");
}
}
View Replies !
View Related
How To Display Photos Array In Random Way Without Repeating Till First Show
Hi!
Could anybody help me please?
I´ve got a button and an empty movie clip. I´d like to show 4 photos in a random way but wihtout repeating it till all of them are shown first.
Code:
-On the first frame I have:
last_number=0
-On the button I have:
on (release) {
do {
indice=Math.Round(Math.random()*(10/3))
}
while(indice==last_number)
last_number=indice;
switch(indice){
case 0:
container.loadMovie("img/sesion_5_3_0.jpg");
break;
case 1:
container.loadMovie("img/sesion_5_3_1.jpg");
break;
case 2:
container.loadMovie("img/sesion_5_3_2.jpg");
break;
case 3:
container.loadMovie("img/sesion_5_3_3.jpg");
}
}
I don´t know how to create an array and on every Random number you check if the new Random number is already in the array. If not, you put that value in the array. If it is already in the array...you generate a new Random number. When the array contains all numbers...you reset the array and start over again.
View Replies !
View Related
How To Display Photos Array In Random Way Without Repeating Till First Show
Hi!
Could anybody help me please?
I´ve got a button and an empty movie clip. I´d like to show 4 photos in a random way but wihtout repeating it till all of them are shown first.
Code:
-On the first frame I have:
last_number=0
-On the button I have:
on (release) {
do {
indice=Math.Round(Math.random()*(10/3))
}
while(indice==last_number)
last_number=indice;
switch(indice){
case 0:
container.loadMovie("img/sesion_5_3_0.jpg");
break;
case 1:
container.loadMovie("img/sesion_5_3_1.jpg");
break;
case 2:
container.loadMovie("img/sesion_5_3_2.jpg");
break;
case 3:
container.loadMovie("img/sesion_5_3_3.jpg");
}
}
I don´t know how to create an array and on every Random number to check if the new Random number is already in the array. If not, to put that value in the array. If it is already in the array...to generate a new Random number. When the array contains all numbers...to reset the array and start over again.
View Replies !
View Related
How To Display Photos Array In Random Way Without Repeating Till First Show
Hi!
Could anybody help me please?
I´ve got a button and an empty movie clip. I´d like to show 4 photos in a random way but wihtout repeating it till all of them are shown first.
Code:
-On the first frame I have:
last_number=0
-On the button I have:
on (release) {
do {
indice=Math.Round(Math.random()*(10/3))
}
while(indice==last_number)
last_number=indice;
switch(indice){
case 0:
container.loadMovie("img/sesion_5_3_0.jpg");
break;
case 1:
container.loadMovie("img/sesion_5_3_1.jpg");
break;
case 2:
container.loadMovie("img/sesion_5_3_2.jpg");
break;
case 3:
container.loadMovie("img/sesion_5_3_3.jpg");
}
}
I don´t know how to create an array and on every Random number you check if the new Random number is already in the array. If not, you put that value in the array. If it is already in the array...you generate a new Random number. When the array contains all numbers...you reset the array and start over again.
View Replies !
View Related
Code To Show And Hide Different Elements From Differents Libraries
Hey guys,
I'm having big problem developing a game in which people can dress-up a character. I already managed to do the drag drop code.
As I want to create many clothes in different "libraries", like library t-shirt, shorts, shoes and etc.
The problem is, for instance, when I see all the t-shirt and I drag one of them to my character. Then I click on the shoes and all the t-shirts must disappear, but not the t-shirt that I dragged, in order for the shoes show up.
That`s my main problem, does any one know how to do it?
Hope you guys can help me! Thanks!!!
View Replies !
View Related
Flash 8 Caption Code Needed For Slide Show
I have a Flash Slide Show done in Flash 8. There's no xml files attach with this file. I only use Action Scripting along with this project. I'm trying to have a line of text showing as a caption for each images. Do you know if I need to create and xml file along with this document? Any help would be greatly appreciated.
Thanks,
Attach Code
_global.numOfImage = 29;
//
url = "";
//
temp = 7;
//
//
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
check.swapDepths(20000);
for (var i = 1; i<=numOfImage; i++) {
mc = this.attachMovie("btn", i, i+100);
mc._x = ((i-1)%temp)*75+30;
//
mc._y = Math.floor((i-1)/temp)*46+450;
//
mc.oldx = mc._x;
mc.oldy = mc._y;
mc.point.loadMovie(url+"image/trail/image"+i+".jpg");
mc.onRollOver = function() {
this.fade.play();
check.target = this._name;
check.onEnterFrame = function() {
this._x += (this._parent[this.target]._x-this._x)/4;
this._y += (this._parent[this.target]._y-this._y)/4;
};
};
mc.onRelease = function() {
this._parent.attachMovie("loading", "loading", 10000);
screen.original.loadMovie(url+"image/original/image"+this._name+".jpg");
this._parent.onEnterFrame = function() {
if (screen.original.getBytesTotal() == screen.original.getBytesLoaded()) {
this.loading.removeMovieClip();
screen.gotoAndPlay(2);
delete this.onEnterFrame;
}
};
};
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
init();
function init() {
this[1].pressed = 0;
this.stopDrag();
this.attachMovie("loading", "loading", 10000);
screen.original.loadMovie(url+"image/original/image1.jpg");
this.onEnterFrame = function() {
if (screen.original.getBytesTotal() == screen.original.getBytesLoaded()) {
this.loading.removeMovieClip();
screen.gotoAndPlay(2);
delete this.onEnterFrame;
}
};
check.target =1
check.onEnterFrame = function() {
this._x += (this._parent[this.target]._x-this._x)/4;
this._y += (this._parent[this.target]._y-this._y)/4;
};
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
View Replies !
View Related
Flash 8 Caption Code Needed For Slide Show
I have a Flash Slide Show done in Flash 8. There's no xml files attach with this file. I only use Action Scripting along with this project. I'm trying to have a line of text showing as a caption for each images. Do you know if I need to create and xml file along with this document? Any help would be greatly appreciated.
Thanks,
Attach Code
_global.numOfImage = 29;
//
url = "";
//
temp = 7;
//
//
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//
check.swapDepths(20000);
for (var i = 1; i<=numOfImage; i++) {
mc = this.attachMovie("btn", i, i+100);
mc._x = ((i-1)%temp)*75+30;
//
mc._y = Math.floor((i-1)/temp)*46+450;
//
mc.oldx = mc._x;
mc.oldy = mc._y;
mc.point.loadMovie(url+"image/trail/image"+i+".jpg");
mc.onRollOver = function() {
this.fade.play();
check.target = this._name;
check.onEnterFrame = function() {
this._x += (this._parent[this.target]._x-this._x)/4;
this._y += (this._parent[this.target]._y-this._y)/4;
};
};
mc.onRelease = function() {
this._parent.attachMovie("loading", "loading", 10000);
screen.original.loadMovie(url+"image/original/image"+this._name+".jpg");
this._parent.onEnterFrame = function() {
if (screen.original.getBytesTotal() == screen.original.getBytesLoaded()) {
this.loading.removeMovieClip();
screen.gotoAndPlay(2);
delete this.onEnterFrame;
}
};
};
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
init();
function init() {
this[1].pressed = 0;
this.stopDrag();
this.attachMovie("loading", "loading", 10000);
screen.original.loadMovie(url+"image/original/image1.jpg");
this.onEnterFrame = function() {
if (screen.original.getBytesTotal() == screen.original.getBytesLoaded()) {
this.loading.removeMovieClip();
screen.gotoAndPlay(2);
delete this.onEnterFrame;
}
};
check.target =1
check.onEnterFrame = function() {
this._x += (this._parent[this.target]._x-this._x)/4;
this._y += (this._parent[this.target]._y-this._y)/4;
};
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
View Replies !
View Related
Ho Wot Show Code As Sort Of Graphic In The Thread Post
Hi,
Please forgive me if this is a stupid question.
I have just posted a thread on this forum relating to a piece of action script. In the post I wanted to show the script that I was working on, so just copied and pasted it straight from the Actions window in Flash.
Having seen other posts it looks like they are displaying their script as what look more like graphic elements than just pasted text.
HOW do I ahceive this???
Please Help me!
Thanks
mrdoodle
View Replies !
View Related
Random Code Help
hi, i hope that im doing this in the right forum, i am making an educational game for a school assignment and i am in desperate need of coding help, and general flash help.
im preety new to flash, i have no diffuculty creating good looking images and animation them and stuff but i have little to no idea on how to do the coding which needs to be done. i need a code which would display a random addition equation using numbers between 1-12 and then have the veiwer put in the answer, if correct add 1 to score and play one of 5 right answer animations, if wrong play one of 5 wrong answer animations.
i hope this makes sense and i would really appreciate help with it!
thanks for ur time.
View Replies !
View Related
Random Code
hey im using mx an would like to no if it is possible for the random code to switch between selected frames i.e. 3,5,7 but not 1,2,4,6. you get the ideas im sure. I know the
frame = Number(random()); code but it only works for the frame that you enter and the ones before it. Can anyone help?
thanks in advance
cobhc
View Replies !
View Related
Random Code
I am having trouble writing some random code.
Can someone please help me write code to randomly gotoandStop in one of three frames.
I am using flash mx 2004
Cheers
View Replies !
View Related
Anyone Know A Random Code?
Hello,
I am creating a simple fishing game, I have a fisherman, when you click him he will cast a line into the screen, he is now fishing. On the next frame is an animation of him catching a fish.
I need a code basically saying every secound theres a 1/100 chance of catching a fish, or in this case going to the next frame.
If any one could please help me it would be much apprieciated, if you can't do exactly what a wrote above, any comments or suggestions would help, at least its a start.
Thanks
Danny
View Replies !
View Related
Help With A Random Code
Hello,
I am creating a simple fishing game, I have a fisherman, when you click him he will cast a line into the screen, he is now fishing. On the next frame is an animation of him catching a fish.
I need a code basically saying every secound theres a 1/100 chance of catching a fish, or in this case going to the next frame.
If any one could please help me it would be much apprieciated.
Thanks
Danny
View Replies !
View Related
Does Anyone Know A Random Code
Hello,
I am creating a simple fishing game, I have a fisherman, when you click him he will cast a line into the screen, he is now fishing. On the next frame is an animation of him catching a fish.
I need a code basically saying every secound theres a 1/100 chance of catching a fish, or in this case going to the next frame.
If any one could please help me it would be much apprieciated, if you can't do exactly what a wrote above, any comments or suggestions would help, at least its a start.
Thanks
Danny
View Replies !
View Related
Does Anyone A Random Code
Hello,
I am creating a simple fishing game, I have a fisherman, when you click him he will cast a line into the screen, he is now fishing. On the next frame is an animation of him catching a fish.
I need a code basically saying every secound theres a 1/100 chance of catching a fish, or in this case going to the next frame.
If any one could please help me it would be much apprieciated, if you can't do exactly what a wrote above, any comments or suggestions would help, at least its a start.
Thanks
Danny
View Replies !
View Related
Using Random Code
Hello,
Got a simple little problem which I can't seem to find on any of the tutorials so hope one of ya's can help me out here. I have a simple little game I have created, similar to the street game where they mix the 3 cards and you choose what its under or which card its under. I have everything working fine but what syntax do I use to have the person choose the right one? in other words, I am familiar with hit test using MC's, but what about when the person is using his mouse and clicks on the right MC, what code would I use to see if its the right one that he chose? Hope you all understand what I am asking. Thanks,
Rocker
View Replies !
View Related
|