Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 05-15-2012, 07:05 AM   #1
ak1412
Registered User
 
Join Date: May 2012
Posts: 1
Default is it possible to use this script for .swf file?

//: SETUP VARIABLES
var maxVal = 4;
var oldVar = 0;
var newVar = 0;
var si = 0;

//: LOAD THE NEXT IAMGE
function getImage() {
newVar = Math.floor(Math.random() * maxVal);
if (newVar == oldVar) {
getImage();
} else {
oldVar = newVar;
container_mc.loadMovie ("fotos/foto" + newVar + ".jpg");
container_mc._alpha = 0;
this.onEnterFrame = function () {
if (container_mc._width > 0) {
container_mc._x = Stage.width / 2 - container_mc._width / 2;
container_mc.onEnterFrame = fadeIn;
delete this.onEnterFrame;
}


//: LOAD OUR FIRST IMAGE
getImage();

I use the coding from sophistikat
I already use this script and work well,..
but i need to change :

container_mc.loadMovie ("fotos/foto" + newVar + ".jpg")
become : container_mc.loadMovie ("fotos/foto" + newVar + ".swf")

its possible to use this script for .swf file?
i already try it and not worked..

anybody can help me?
many many thanks if someone can help me..
ak1412 is offline   Reply With Quote
Old 05-15-2012, 09:35 AM   #2
Prid
Prid - Outing
 
Prid's Avatar
 
Join Date: Oct 2009
Location: Halden, Norway
Posts: 1,191
Send a message via MSN to Prid Send a message via Skype™ to Prid
Default

Yes, it is possible, but do you have 4 .SWF files in the folder fotos, named foto0.swf, foto1.swf, etc.?
__________________
I have returned, and am now 18
Prid 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:09 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.