Using Multiple Instances......
Blake Hale has produce a funky green Aqua Bubbles Button, it uses dynamic text to produce the writing on the button.
http://www.flashkit.com/movies/Inter...6642/index.php
I understand how to change the font and the text and the link on the button, but unlike other dynamic buttons it doesnt seem to let me use more than one instance of it? I want to make a nav menu with it, but I dont know how to do it.
For example if I wanted to have 5 or 6 of them one above the other in standard side nav bar format, each linking to another page and with a different link title, how would I do this in the html code?
I can sucessfully produce one button using: "?value=Yahoo&url=http://www.yahoo.com" However if I try something like: "?value=Yahoo&url=http://www.yahoo.com&value1=google&url1=http://www.google.co.uk" It doesnt work....
Would you mind please telling me the code to do this? Thanks Joe
charitiesonline<remove>@hot<remove>mail. com
FlashKit > Flash Help > Flash Newbies
Posted on: 05-20-2003, 12:48 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Multiple Flash VM Instances Running With Multiple Swfs On The Single Webpage
Hi all,
I am developing a webpage having multiple swfs interacting with eachother. Not when I load many swfs, is it the case that multiple flash VM instances are running on my machine? Is there any way to check this.
The project I am doing has one of the requirements that only one flash VM should be running.
Please help me in this.
Multiple Flash VM Instances Running With Multiple Swfs On The Single Webpage
Hi all,
I am developing a webpage having multiple swfs interacting with eachother. Not when I load many swfs, is it the case that multiple flash VM instances are running on my machine? Is there any way to check this.
The project I am doing has one of the requirements that only one flash VM should be running.
To summarize my question is:
how to check whether multiple flash VM instances are running on the system when multiple swfs are loaded on the page?
Please help me in this.
Using Multiple Instances Of LoadVars For Multiple Forms
Hi,
I've got a microsite with an Enter to Win contest page. On that first page, I ask for the user's name and e-mail. This enters them to win.
Once they've done so, they have the option to tell a friend, where I ask for the user's name, e-mail, friend's name, and friend's email. It will then use this information to send an email to the friend from the user, using asp. This code occurs on the next frame of the file.
Once they've told a friend, it goes to the next frame, which is just another tell-a-friend page, but with different text. There is a 4th frame which simply says "Entry Failed" if this process does not work.
I'm having problems getting past the first page. I've gotten this code to work before, so I'm wondering if it's because I'm using so many instances of LoadVars... I tried changing the variables associated with each page, but that didn't work. Anybody have ideas on how to successfully get through these pages?
Here's the first page:
ActionScript Code:
stop();
var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();
function f1() {
cbox.setLabel("Checked");
}
submit_btn.onRelease = function() {
status_txt.text = "";
if ((yname.text.length>1) && (yemail.text.length>1)) {
senderLoad.yname = yname.text;
senderLoad.yemail = yemail.text;
senderLoad.femail = "initial";
if (cbox.selected == true) {
senderLoad.newsletter = "Yes";
} else {
senderLoad.newsletter = "No";
}
senderLoad.sendAndLoad("form.asp",receiveLoad,"POST");
} else {
status_txt.text = "Fill out the form completely";
}
};
receiveLoad.onLoad = function() {
if (this.sentOk) {
gotoAndStop(2);
} else {
gotoAndStop(4);
}
trace(this.sentOk);
};
clear_btn.onRelease = function() {
yname.text = "";
yemail.text = "";
};
privacy_btn.onRelease = function() {
getURL("http://www.hmns.org/privacy_statement.asp?r=1", _blank);
};
rules_btn.onRelease = function() {
getURL("dino_contest_rules.pdf", _blank);
};
The second page:
ActionScript Code:
stop();
var sendLoad:LoadVars = new LoadVars();
var recLoad:LoadVars = new LoadVars();
friend_btn.onRelease = function() {
trace("you've hit the dag hum button!");
//getURL("javascript:openNewWindow('friend.html','thewin', 'height=300,width=700,toolbar=no,scrollbars=no')");
status_txt.text = "";
if ((yname.text.length>1) && (yemail.text.length>1) && (fname.text.length>1) && (femail.text.length>1)) {
sendLoad.yname = yname.text;
sendLoad.yemail = yemail.text;
sendLoad.fname = fname.text;
sendLoad.femail = femail.text;
sendLoad.sendAndLoad("form.asp",recLoad,"POST");
} else {
status_txt.text = "Fill out the form completely";
}
};
recLoad.onLoad = function() {
if (this.sentOk) {
gotoAndStop(3);
} else {
gotoAndStop(4);
}
trace(this.sentOk);
};
The third page page looks just like the second, but with different loadVars variables.
And the form.asp code:
Code:
<%@ LANGUAGE="VBScript" %>
<%
dim fs,f, namefill, notefill, body,your_name,your_email,friend_name,friend_email,newsletter,datetime
referers = Array("dinomummycsi.internal.hmns.org", "dinomummycsi.hmns.org")
smtpServer = "mail.hmns.org"
fromAddr = "webmaster@hmns.org"
subject = "“Unearth Your Own Dinosaur Mummy” giveaway!"
Response.Buffer = true
errorMsgs = Array()
'Check for form data.
if Request.ServerVariables("Content_Length") = 0 then
call AddErrorMsg("No form data submitted.")
end if
'Check if referer is allowed.
validReferer = false
referer = GetHost(Request.ServerVariables("HTTP_REFERER"))
for each host in referers
if host = referer then
validReferer = true
end if
next
if not validReferer then
call AddErrorMsg("Invalid referer: '" & referer & "'.")
end if
'get the post fields
your_name = Request.Form("yname")
your_email = Request.Form("yemail")
newsletter = Request.Form("newsletter")
friend_name = Request.Form("fname")
friend_email = Request.Form("femail")
'Check for the recipients field.
if your_email = "" then
call AddErrorMsg("Missing email recipient.")
elseif not IsValidEmail(your_email) then
call AddErrorMsg("Invalid email address: " & your_email & ".")
end if
if friend_email <> "initial" then
if friend_email = "" then
call AddErrorMsg("Missing Friend Email.")
elseif not IsValidEmail(friend_email) then
call AddErrorMsg("Invalid friend email address: " & friend_email & ".")
elseif friend_email = your_email then
call AddErrorMsg("You can't tell yourself!")
end if
end if
'If there were no errors, build the email note and send it.
if UBound(errorMsgs) < 0 then
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.OpenTextFile("N:Webleocontest.txt", 8, true)
f.WriteLine """" & your_email & """,""" & your_name & """,""" & newsletter & """,""" & now() & """"
f.Close
set f=Nothing
set fs=Nothing
'We do the tell a friend processing here
if friend_email <> "initial" then
if (trim(your_name) <> "") then
namefill = ", " & your_name & ","
end if
set fs=Server.CreateObject("Scripting.FileSystemObject")
set f=fs.OpenTextFile(Server.MapPath("efriend.html"))
body = f.readall
f.Close
set f=Nothing
set fs=Nothing
body=replace(body,"%%NAME%%",namefill)
recipients = friend_email
str=SendMail()
end if
Response.Write "sentOk=True"
Response.End
end if %>
<html>
<head>
<title>Form Mail</title>
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="body" align="center">
<div id="group">
<center>
<% if UBound(errorMsgs) >= 0 then %>
<table border=0><tr><td><font color="#cc0000" face="Arial,Helvetica" size=4><b>
Form could not be processed due to the following errors:</b></font><br>
<ul>
<% for each msg in errorMsgs %>
<li><font color="#cc0000" face="Arial,Helvetica" size=4><% = msg %></font>
<% next %>
</td></tr></table>
<% end if %>
<%=notefill%><br>
<%=namefill%><br><br>
<%=body%><br>
<font color="#cc0000" face="Arial,Helvetica" size=4><br><b><a href="#" onClick="history.go(-1)">Back</a></b></font>
</center>
</div>
</div>
</body>
</html>
<% '---------------------------------------------------------------------------
' Subroutines and functions.
'---------------------------------------------------------------------------
sub AddErrorMsg(msg)
dim n
'Add an error message to the list.
n = UBound(errorMsgs)
Redim Preserve errorMsgs(n + 1)
errorMsgs(n + 1) = msg
end sub
function GetHost(url)
Dim i, s
GetHost = ""
'Strip down to host or IP address and port number, if any.
if Left(url, 7) = "http://" then
s = Mid(url, 8)
elseif Left(url, 8) = "https://" then
s = Mid(url, 9)
end if
i = InStr(s, "/")
if i > 1 then
s = Mid(s, 1, i - 1)
end if
getHost = s
end function
function IsValidEmail(email)
dim names, name, i, c
'Check for valid syntax in an email address.
IsValidEmail = true
names = Split(email, "@")
if UBound(names) <> 1 then
IsValidEmail = false
exit function
end if
for each name in names
if Len(name) <= 0 then
IsValidEmail = false
exit function
end if
for i = 1 to Len(name)
c = Lcase(Mid(name, i, 1))
if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then
IsValidEmail = false
exit function
end if
next
if Left(name, 1) = "." or Right(name, 1) = "." then
IsValidEmail = false
exit function
end if
next
if InStr(names(1), ".") <= 0 then
IsValidEmail = false
exit function
end if
i = Len(names(1)) - InStrRev(names(1), ".")
if i <> 2 and i <> 3 then
IsValidEmail = false
exit function
end if
if InStr(email, "..") > 0 then
IsValidEmail = false
end if
end function
function FormFieldList()
dim str, i, name
'Build an array of form field names ordered as they were received.
str = ""
for i = 1 to Request.Form.Count
for each name in Request.Form
if Left(name, 1) <> "_" and Request.Form(name) is Request.Form(i) then
if str <> "" then
str = str & ","
end if
str = str & name
exit for
end if
next
next
FormFieldList = Split(str, ",")
end function
function SendMail()
dim CDOSYSMail, CDOSYSCon
Set CDOSYSMail = Server.CreateObject("CDO.Message")
Set CDOSYSCon = Server.CreateObject("CDO.Configuration")
CDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "web.hmns.org"
CDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
CDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory") = "c:InetpubmailrootPickup"
CDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
CDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
CDOSYSCon.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 0
CDOSYSCon.Fields.Update
Set CDOSYSMail.Configuration = CDOSYSCon
CDOSYSMail.From = fromAddr
CDOSYSMail.To = recipients
CDOSYSMail.Subject = subject
CDOSYSMail.htmlBody = body
CDOSYSMail.Send
SendMail = ""
Set CDOSYSMail = Nothing
Set CDOSYSCon = Nothing
end function
%>
Multiple SetRGB For Multiple MC Instances
I have an animated MC on my main timeline, and I want to globally change the color of all the instances within it onRelease of a button. I can change a single instance once, but this would be several instances simultaneously in a single MC.. and then do this with three different colors (3 buttons)..Is there a way to set the color of several instances within a MC at once? Thanks.
Multiple Instances
I have multiple instances of the same movieclip, within that movieclip I have a button with a dynamic text box controlled by variables. I know it must be possible of controlling the outcome of the button to do different things but I just can’t work out how! Can someone help?
Have a look: http://www.pantechnicon.co.uk/laggy.swf
Using Multiple Instances......
Blake Hale has produce a funky green Aqua Bubbles Button, it uses dynamic text to produce the writing on the button.
http://www.flashkit.com/movies/Inte...-6642/index.php
I understand how to change the font and the text and the link on the button, but unlike other dynamic buttons it doesnt seem to let me use more than one instance of it? I want to make a nav menu with it, but I dont know how to do it.
For example if I wanted to have 5 or 6 of them one above the other in standard side nav bar format, each linking to another page and with a different link title, how would I do this in the html code?
I can sucessfully produce one button using:
"?value=Yahoo&url=http://www.yahoo.com"
However if I try something like:
"?value=Yahoo&url=http://www.yahoo.com&value1=google&url1=http://www.google.co.uk"
It doesnt work....
Would you mind please telling me the code to do this?
Thanks Joe
charitiesonline<remove>@hot<remove>mail. com
Multiple Instances Of An Mc
I am new to AS3 and OOP
This seems very basic, but it is driving me crazy. All the examples in my books seem like they just show how to add one child from the library, like this which works.
ActionScript Code:
var myStarz_mc:Sprite = new starz_mc();
addChild(myStarz_mc);
OK, here is my problem. I am trying to duplicate this process in AS2 (procedural programming).
ActionScript Code:
for(var a = 0;a <5;a++)
{
this.attachMovieclip("starz_mc","myStarz_mc"+a,this.getNextHighestDepth())
this[myStarz_mc+a].x = a *100;
}
Here is what I am wondering. If I do this:
ActionScript Code:
var myStarz_mc:Sprite = new starz_mc();
for(var a = 0; a<3; a++)
{
addChild(myStarz_mc);
}
How do I identify the individual instances or add a enumerator to them so I can change their properties individually?
Paul
Help With Multiple Instances
i am trying to make a simple application where some boxes move accross the screen, with a random speed.
everything works, exept the boxes dont move, i figured out why, and i inserted the following code to move each instance (its inside a loop where I goes up to the current number of boxes)
ActionScript Code:
setProperty("raceythingy_"+i,_x,getProperty("raceythingy_"+i,_x)+???????("raceythingy_"+i.speed));
except i need to replace the question marks, not so that it gets a property, but instead gets an variable local to that instance (speed), but i also need it to be able to state take the instance name as a string, so that i can use "raceythingy_"+i
, but still have it work and have no errors. so far i have not been able to figure out a way to do this. any help would be appreciated. thank you.
Multiple Instances
Hello,
I need to have the same movieclip (just a square) added to the stage on each Enter_Frame. Each MC would have a different X or Y axis. I am currently doing this via drawRect, but after about a minute of this... the scene lags. If I figured out a way to do this via addChild(MovieClip), would it eliminate the lag? If so, how do I add more than 1 of the same MC to the stage without removing the previous MC added in the frame before? If it would not help the lag issue, let me know.
Thanks,
-Jake
Multiple Instances Of An FLV
I have 2004 Pro, and I'm using the Media Display and Media Controller component. An SWF loads an FLV. I'm running it on a Windows 2003 server.
It seems that only one user can access a particular FLV at a time. Even locally, if I try to open two windows of the same FLV, the second one is blank. Is this a bug?!
AS3 - Multiple Instances Of A MC
Scenario:
I have an MC in the library. It holds the content of an interactive timeline - it holds dates and information. At each label the content changes. Labels are "1900", "1920", etc
I have a class that generates copies of that MC and places them in a holding Display Object, ie, it assembles all the dates into a vertical movieclip so they can be scrolled. I then tell each of the MC instances to gotoAndStop to a specific label BUT...... they all end up on the same label.
I know this is a referencing problem. It was easy in AS2. I'd just use a For loop and use
Code:
attachMovie("linkName","newName"+i,getNextHighestDepth());
then reference with
Code:
this["newName"+i].gotoAndStop(label)
but what's the way to do it in AS3???
here is my code
Code:
public class TimeLine extends MovieClip {
public var nSectionNumber:Number = 0;
private var aTimeSegments:Array = new Array();
private var tlHolder:MovieClip;
private var tempTimeLine:MovieClip;
public function TimeLine(secNum:Number )
{
nSectionNumber = secNum;
tlHolder = new MovieClip();
addChild(tlHolder)
stackClips();
}
private function stackClips(){
if(nSectionNumber==1){
// this is the first timeline
tempTimeLine = new TimeLine1();
for(var i:uint = 0; i<tempTimeLine.currentLabels.length;i++){
var tempClip:TimeLine1 = new TimeLine1();
tempClip.gotoAndStop(tempTimeLine.currentLabels[i].name)
aTimeSegments.push(tempClip)
}
for(var j:uint = 0; j<aTimeSegments.length;j++){
tlHolder.addChild(aTimeSegments[j]);
//aTimeSegments[j].gotoAndStop(tempTimeLine.currentLabels[j].name);
aTimeSegments[j].y = j*100;
}
}
}
I also need to stack the movieclips on top of each other. The size of the information varies at each label. If I use MC.height will that report the height of the tallest part of the MC or the height of the MC just at the label that it is stopped at. Does that make sense? I hope so.
It's been a while since I did any AS3 and I feel like I'm picking it up all over again. Any help is greatly appreciated!!
thanks
Ant
Multiple Instances
hi im wondering if enyone could point me in the right direction im only a beginer
the problem is that i have created a instance that duplicates itself on press then drops on the next, once the instance has been droped it then if pressed brings up buttons for deletion etc... im having trouble with the program im making becouse i need 100+ of these instances . So ive made a menu with all the sub categories of drag and drop objects ive made but ic arnt seem to locate the instance if its not on the root ( carnt have all in main scene as there are too many). ive tried always but as soon as i put somthing in a movie on seperate frames it comes up with target not found "Target not found: Target="/staff1" Base="_level0.text.staff"
ive named the instance staff , each instance has a set number of diff variables too.
so basically id like to know how to display a large number of drag and drop movies categorically, how to have them pop up so to speak. sry its a bit hard to explain
Scripting For Multiple Var And Instances?
I'm loading 42 variables from a text file, into 42 instances of the same mc. Is there a shorter way of writing this or do I need to repeat the following 42 times? Thank you...
if (var_1 == 1) {
tellTarget ("/box_1") {
gotoAndStop (2);
}
} else if (var_1 == 2) {
tellTarget ("/box_1") {
gotoAndStop (3);
}
} else if (var_1 == 3) {
tellTarget ("/box_1") {
gotoAndStop (4);
}
} else if (var_1 == 4) {
tellTarget ("/box_1") {
gotoAndStop (5);
}
}
Unique Multiple Instances From One MC
I hope someone out there can help me out with this problem, because it is currently beyond my newbie capabilities. I have a title identifer movie clip I created to identify 10 thumbnails upon mouse rollovers. When you rollover thumbnail "1" the following text appears below it: "Title: Photo 1".
My problem occurs when I try to setup thumbnail "2" using an instance of this title identifier MC. When I change the text inside this second instance to show "Title: Photo 2" what ends up happening is that the first instance that originally showed "Title: Photo 1" also changes to show "Title: Photo 2".
Is there anyway to create 10 instances of one MC and yet still have the ability to alter the text within each individual instance so each one can be unique?
I guess this can be done using some sort of Actionscript but I'm still too new to know how to make this happen. There has got to be an easy way to make this happen.
Something I tried was making 10 duplicates of the instance and renaming each one individually. This did not work. I also tried assinging instance names inside of the instance dialog box and this did not help. If someone can provide me with some help I would greatly appreciate it.
Multiple Scrolling Instances
I have a text scrolling MC {which contains MC buttons for scrolling and a MC (named Message) containing a dynamic text box, (named message). This works.
However, I am trying to model a slide presentation where the user can open the scrolling text MC which contains the legend for that slide. The above scrolling text box accomplishes that.
However,the problem is using multiple instances of the scrolling text MC. The main timeline has 5 frames, each an individual slide. When I put instances of my scrolling text MC on each slide I am unable to change the text. I have tried multiple solution. The closest is an Empty MC on the main time line containing the legends for each slide in a series of variables ie., Legend1, Legend2, etc. Then I put an action on the first frame of the scrolling text MC which contains the following -
SlideNo = _parent._curentframe;
Message.message = _root.Legend["Legend"+SlideNo];
where Legend is the instance name of the Empty MC and "Legend"+Slide is the index number for the variables in the empty MC.
When I run the movie the first legend is in the scrolling text MC. When I go the next frame that scrolling text MC also contains the first legend. Each instance of the scrolling text MC has a different name. When I go to the next slide on the MainTime should'tn the next instance of the scrolling text MC grab the second Legend (Legend2)?
I can't figure out how to update the dynamic text field. Any thoughts?
Using SwapDepths() On Multiple Instances Of The Same MC
Ok...so I have read all the threads about the use of swapDepths(), but I am still running into the same problem.
I have created a timeline with many buttons that each display a info about a unique date. Each time a date button is clicked it sets a text variable and plays the same MC ('infobar')that contains a dynamic text box. After time the boxes eventually fade aways, the problem is when you choose new dates, the new MC does not always show up in front of the previous MC selected. I have not been able to get the below code to work:
on (release) {
infobar.text = ft1952;
infobar.swapDepths(0);
tellTarget ("infobar") {
gotoAndPlay (2);
}
}
Is there a way to do this without creating a unique infobar MC for each date (infobar1, infobar2...etc)? If not, would it have much of an impact on the size of the .swf with the addition of duplicate MCs?
Thanks!
Controlling Multiple Instances Of Mc
hi i have a map with a movie clip with an embeded button that basically flashes on and off when clicked, my problem is this, i want to use many instances of this movie, probably upto 50, and i want to tell the previoulsly selected instance to go to a frame that has a stop action in it, when the new instance has been selected. to indicate which button has been selected.
any help would be greatly appreciated.
Multiple Instances In Runtime
Hi all!
I would like to write a function in ActionScript Platform: Flash 5.
The code should be able to create dinamicly an array of Instances for a particular movieclip that is stored in the libary.
i raed the help that comes with the flash but didn't find anything than may show me how.
The big picture is that there is a movieclip symbol in the libary that acts like a snow(falls down due to the wind direction until rich the ground) and i want to the code to create those instances all the time in a loop so it will look like it's snowing.
Thanks for advanced!
Targetting Multiple Instances Of A Mc
I want to create a button that targets several instances of the same mc that are on the screen. Basically, its just a box that fades into another color. How would I name the boxes, and set up a loop that targets all the different instances?
Any help is greatly appreciated!!
thanks
JSTN
Editing Multiple Instances
I have a few maps with a bunch of restrooms designated by a mc (rr1, rr2, etc). Right now I have a button that turns _visibility on/off but I don't know how good the code is because it looks for i<=50 and some maps have 1 restroom and some have like 15. Is this a problem?
Code:
on (release){
for(i=0;i<=50;i++){
_root["rr"+i]._visible=!_root["rr"+i]._visible;
}
}
Also I would like to use the same .as file for all of the maps so is there a way I could use an array to count how many there are?
Maybe?:
Code:
on (release){
movienames=new Array(**something in here duno wat**);
for(z=0;z<=movienames.length;++z){
[movienames[z]]._visible=![movienames[z]]._visible;
}
}
Any help or direction would be greatly appreciated.
Help With Movement/multiple Instances As
I have serched high and low for this type of code, and I am at a dead stand still. Since I am not much of a coder, more of a designer, I am lost...and maybe I am using the wrong terminology.
If anyone could lend me a hand would appric greatly.
What I am trying to accomplish is:
1. with a single mc/bitmap make it grow then retract to nothing.
2. make multiple (random is fine) instances of this.
2. move those multiple instances in a upper arc from one side of the stage to the other.
3. have those instances be less dense at either side, while becoming more dense in the middle (top of the arc);
Then to loop indefinatly so it continues to happen over and over again. If there is a way to set the speed that would help too. I have a feeling this is some crazy advanced code, and all the reading I have done just doesnt touch on this kinda thing.
Thanks in advance for any help.
Multiple Instances Of A Movie
Hi,
I really need some help with action script. With this code flash shows as many buttons as I want but the RollOver works only over the last one
ButtonClass.prototype = new MovieClip();
ButtonClass.prototype.show = function(x,y,level)
{
createEmptyMovieClip("holder",level);
holder.createEmptyMovieClip("clip1",level);
holder.clip1.attachMovie("bt1Obj","but",level);
//bt1Obj is a movie in my FLA file linked for action script
holder.clip1.but.onRollOver = function()
{
//actions
}
}
Effect Multiple Instances
if i have say, ball01, ball02... ball99... is it possible to effect everything with the word "ball" in the name? for example...
Code:
with (ball##) {
_x += 5;
_y -= 10;
}
what would be the most efficient way of doing this? I've been noticing a lot of things like "ball"-i in some of my search results but haven't quite figured out how it works.
Thanks for any suggestions
Can't SetProperty Of Multiple Instances Of Same Mc
One one page I have 5 instances of a mc.
Upon entering the page the instruction is:
setProperty ("/check001", _visible, false);
setProperty ("/check002", _visible, false);
setProperty ("/check003", _visible, false);
setProperty ("/check004", _visible, false);
setProperty ("/check005", _visible, false);
This works.
The next page is identical except that the instances are named "/check006" through "/check010". These unique names (including a test name "/bob")does not respond to the setProperty action.
I've double checked the Instance Box and the code to no avail.
Any help is appreciated.
Mike
Multiple Instances And Variables Big Q
OK
my menu has an arrow follower on rollover
everything ok
I want that when i press a button the arrow does an animation and opens up the information under the menu
(i put only a rotation for the MAIN button - as an example-)
my problem
i want that the arrow state to be detected by the other buttons
if it's already open and if i press another button i want it to close and then move to emphasize the next button ( doing teh animation backwards)
so how can i make that the buttons detect the state of the arrow??????
Inputs any any kind of suggetsion appreciated
thanks in advance
Specifying Multiple Instances In A Statement
I have a movie on the stage with multiple other movies with different instance names and I am trying to tell all of them to go to a specific frame and stop. How do you do this in Flash MX without creting 20 lines of code for this one action?
Thanks
Multiple Instances Of Same Text?
This has probably been addressed before, but I've been searching and I'm not finding any answers.
What I want to do is start a movie with static text for x frames and THEN have it cue to 3D (asteroids). After the script runs, I want the text to be static for a bit and then fade out. The trouble is, whenever I add the asteroids script to the text, it carry's over to all other frames of that text. I've tryed everything I can think of and it keeps doing this.
How to I stop the script from being applied to certain frames while allowing it to be applied to others?
Any pointers in the right direction would be appreciated. I help admin some other forums and I know it can be frustrating getting the same questions time and again.
I'm actually making a sig for the creator of ezPortalPlus. That's the forums I help with. (phpBB/Smartor if you're familiar). I really want to do this right because a lot of people are likely to see it
Thanks in advance - and - super great program!
PC
Multiple Instances Of A Textfield
how can i make multiple instances of a textfield utilizing a loop and access their properties like text,format ,...? i want to make a typewriter effect using multiple text files containing only one character:
*********************
_str="djfkjhdkjsfhkjds"
for (whatever){
textfield[i].text=_str.charAt(i)
}
*******************
[F8] LocalConnection Between Multiple Instances Of The Same SWF
First off, I know this isn't standard practice. I have an swf that I want to run only on the condition that there are no other instances of it currently open; if this is not the case it will unload/display a message or whatever.
So I was wondering whether I could set up a LocalConnection that would basically send and receive within this single swf.
It would be possible to create a loader swf, and communicate between that and the main swf. However, this would leave a loophole in that 2 loader swfs could be run at the same time and therefore not detect each other.
Thank you for any thoughts on this, I'm quite stuck! I can't mange to get this working, or think of another alternative.
Multiple Instances Of The Same MovieClip
Hi All
I'm struggling a bit with the move from AS2 to AS3. I have loaded up an external SWF file which, in this case, has 58 frames. I then cast it to a MovieClip. I don't want to copy the clip. I want to create 58 instances of the same MovieClip and change each one to show each frame. A copy of each would blow the memory and just be silly. In the old days this worked fine with attachMovie. When I try to do this (see code below) it simply doesn't show up. I can trace the instances and they are unique but the MovieClips don't show up.
Many thanks
I have the following code
Code:
var item:MovieClip = MovieClip(loader.getChildAt(0)) as MovieClip;
for(var i=1; i <= 2;i++){
var myMC:MovieClip = new ((item.constructor) as Class);
this.addChild(myMC);
trace(myMC.name);
myMC.gotoAndStop(i);
myMC.x = 0;
myMC.y = 15 * i;
myMC.visible = true;
trace(myMC.y);
}
Multiple MovieClip Instances . . .
Hey!
I'm looking into something right now, and am not sure what to look for.
What I want to do is make a movie clip(that I already have made) duplicate at a different time (approx. every 10 frames) . . . I only want a total of 15 of those movie clips on the stage, and yeah.
Basically the movie clip is a butterfly graphic that follows a path. It automatically loops.
What I want to do though, is have several of them on the stage at once. I think it looks bad with just the one. I want them all in the same position as the original, and then to start playing every 10 frames or so . . . consecutively.
If you know what i want, the help would be greatly appreciated.
If there is someone with something like this, and you can point me in the right direction, I'd like that as well!!
-Bijan
One MC Multiple Instances That On (rollover)
Hey All,
I'ved looked for this tutorial or something like it and found nothing, or if I found it I didn't know what I was reading so.....
Call me confused, slow, stupid whatever but please help me if you can.
I created an MC to use on various dates of a calendar.
The AS so far is:
on (release) {
loadMovie("URL,whatever.swf", holderMc) ;
}
This works fine, movie loads no problem.
What I need help with is the following:
Since I'm going to be using the same MC for different dates with different events happening on those dates, I would like to be able to give each dates MC the name for that particular event that's happening on that day on the rollOver state, kind of a pop_up if you will.
I know I can do this in the MC's, or button's, timeline but since each date has a different event happening that wont help me.
How would I give the rollOver state this AS? I already gave the MC's their own individual Instance name (eg. Jun4, Jun12 and so on)
Help, Please
Peace
Jose Antonio
HitTest With Multiple Instances
I have attached my .fla. I would like to know how/is it possible to have multiple instances of one mc to use hitTest. If you open the fla, and run it, the trace only works if you hit the block all the way to the left (the first one created), but I want it to work on all of them, is this posible without naming each wall differently and going throught them with a for...loop?
How Do I Put Multiple Instances In One Action?
So here is what I've got:
//
on (releaseOutside, rollOver) {
gotoAndPlay("go");
}
on (rollOut) {
gotoAndPlay("out");
}
on (release) {
this.gotoAndStop(25);
if (_parent.mc1._currentframe>1) {
_parent.mc1.gotoAndPlay("out");
}
}
on (release) {
if (_parent.mc2._currentframe>1) {
_parent.mc2.gotoAndPlay("out");
}
}
on (release) {
if (_parent.mc3._currentframe>1) {
_parent.mc3.gotoAndPlay("out");
}
}
on (release) {
if (_parent.mc4._currentframe>1) {
_parent.mc4.gotoAndPlay("out");
}
}
on (release) {
if (_parent.mc5._currentframe>1) {
_parent.mc5.gotoAndPlay("out");
}
}
on (release) {
if (_parent.mc6._currentframe>1) {
_parent.mc6.gotoAndPlay("out");
}
}
//
So How do I put all of thes into one
on (release) { action?
Your help is very much appreciated. THANKS!!!
Multiple Instances In An If Statement...
how would i go about putting multiple instances into an if statement?
i have 5 square movie clips each identical with 8 frames total. their instance names are square01, square02, square03 etc...
when the mouse is rolled over a square it uses the nextframe command until it reaches frame 8 where it stops.
i want an action to occur once all the square frames reach frame 8.
right now i can get it to work with one square, but i need it to check that all squares are on frame 8. here is my script for just one square.
onEnterFrame = function() {
if(square01._currentframe == 8){
merainbow.gotoAndPlay(2);
delete this.onEnterFrame;
}
how can i go about adding all the instances to the above if statement? i tried separating them by commas like so
onEnterFrame = function() {
if(square01,square02._currentframe == 8){
merainbow.gotoAndPlay(2);
delete this.onEnterFrame;
}
but that of course didn't work. i'm new to actionscript so i would greatly appreciate the help!
Same Object, Multiple Instances
I was wondering how one would go about placing the same symbol (a ball, let's say) every time the user clicks.
I have got so far as to place the ball at the spot the user clicks. However, I have a problem, since the ball is only one object. When the user clicks again, I want the ball to duplicate itself and (while the old instance is still there), create a new instance.
I was thinking of making some kind of array, but how would I interweave it with the object name?
I'm still pretty new, so help is appreciated.
Thank you.
Multiple Instances Of The Same MovieClip
I'm struggling a bit with the move from AS2 to AS3. I have loaded up an external SWF file which, in this case, has 58 frames. I then cast it to a MovieClip. I don't want to copy the clip. I want to create 58 instances of the same MovieClip and change each one to show each frame. A copy of each would blow the memory and just be silly. In the old days this worked fine with attachMovie. When I try to do this (see code below) it simply doesn't show up. I can trace the instances and they are unique but the MovieClips don't show up.
Many thanks
I have the following code
ActionScript Code:
var item:MovieClip = MovieClip(loader.getChildAt(0)) as MovieClip;
for(var i=1; i <= 2;i++){
var myMC:MovieClip = new ((item.constructor) as Class);
this.addChild(myMC);
trace(myMC.name);
myMC.gotoAndStop(i);
myMC.x = 0;
myMC.y = 15 * i;
myMC.visible = true;
trace(myMC.y);
}
Multiple Instances Of A Class
Its been awhile since I programmed in actionscript so I am new to 3.0
I need to create several of the same class in a flash file. I cannot hard code it because the number of instances will change on what the user does (2 to 8 instances). The class is saved in an external AS file. Can this be done in a for loop? I know if I create a blank movie clip I can attach the class to it and do it that way. But I was wondering if I could create and array of the class without attaching them to blank move clips.
ClearInterval With Multiple _mc Instances
Hi, long time lurker, first time poster. I hope someone can help me with this mild coding problem. In my swf (which can be viewed at http://rwocreative.com/kMerTest/celebrity_test_b.html, use IE or Netscape, for some reason Safari messes up the load) I have multiple instances of a movie clip. Each movie clip instance on stage is named t+number, i.e., t1, t2, etc.
Inside the movie clip I have two layers, one containing a dummy button, and the other layer containing another blank_mc movie clip (named "thumb", which the dummy button controls), into which I load external JPGs. I'm controlling the _opacity (I forgot who posted the script, but thanks! You've made my life easier in that department!) using two function()s in conjunction with setInterval.
On the main timeline are these variables(forgive the use of [ php ] tags, it's just easier to my eyes to see things color-coded):
PHP Code:
//Records the value of the currently selected thumbnail
_global.selRank = 1;
//Records the value of the previously selected thumbnail
_global.prevSel = 0;
On each instance of movie clip on the main timeline is this code:
PHP Code:
onClipEvent(load) {
//this value is different on each instance of movie clip
//on the main timeline, i.e., myRank = 2, myRank = 3, etc.
var myRank = 1;
}
The actionscript that resides with the dummy button and the blank_mc looks like this :
PHP Code:
function thumbRollOver(myMC) {
if(myMC._opacity < 100) {
myMC._opacity += 10;
}
}
function thumbRollOut(myMC) {
if(myMC._opacity > 50) {
myMC._opacity -= 10;
}
}
The code on the dummy button looks like this:
PHP Code:
on(release) {
if(_global.selRank <= _global.maxCount && _global.choiceMade == 0) {
_global.prevSel = _global.selRank;
_global.selRank = myRank;
if(_global.selRank != _global.prevSel) {
//deactivate button functionality until main picture reloads
_global.choiceMade = 1;
/***************/
clearInterval(intervalID);
intervalID = setInterval(thumbRollOut, 10, _parent["t"+_global.prevSel].thumb);
/***************/
_parent.gotoAndPlay("next");
}
}
}
on(rollOver) {
if(_global.selRank != myRank && myRank <= _global.maxCount) {
clearInterval(intervalID);
intervalID = setInterval(thumbRollOver, 10, thumb);
}
}
on(rollOut) {
if(_global.selRank != myRank && myRank <= _global.maxCount) {
clearInterval(intervalID);
intervalID = setInterval(thumbRollOut, 10, thumb);
}
}
on(releaseOutside) {
if(_global.selRank != myRank) {
clearInterval(intervalID);
intervalID = setInterval(thumbRollOut, 10, thumb);
}
}
Now the problem that I'm running into is this: If you follow that link that I put above, and you click on a thumbnail, it will fade the first thumbnail properly, however, if you mouse over the first thumbnail, it doesn't adjust the opacity anymore. This behavior repeats no matter which thumbnail you choose, where the last chosen thumbnail doesn't highlight properly until you choose another thumbnail.
What I want to know is is there a problem in my code? I think I'm calling the clearInterval() command properly, but I'm not sure if I have to specify the last active thumbnail like this:
PHP Code:
clearInterval(_parent["t"+_global.prevSel].intervalID);
...or what? I think I'm mainly confused because the var intervalID is defined separately in each instance of the movie clip on-stage, and they should be mutually exclusive of each other as far as clearInterval and setInterval is concerned, right?
Thanks for your time in advance.
#Include And Multiple Instances
Hello everyone, it's a pleasure to join your forum. This is my first post, and I'm sure it won't be the last. I'm fairly new to Flash MX and haven't gotten down "talking the talk" yet, so please forgive me if my description of the question isn't as clear as it could be.
I've got a parent movie in which I'm using loadMovie several times to load instances of example_mc from the library.
example_mc uses an #include file (defined in its root timeline actions layer) to feed in the necessary parameters.
My question is: How do I assign a unique #include to each instance of example_mc? For example, I'd like...
example_mc_instance1 to use #include "include1.as"
example_mc_instance2 to use #include "include2.as"
Etc.
Thanks!
Positioning Multiple Instances At Once
OK I know this will seem elementary, but I cannot find the answer to it anywhere. I have a flash document with one layer and one symbol on that layer. There are three keyframes on that layer and the symbol is on every frame. Now if I understand the concept correctly, that means there are three separate instances of the same symbol. Now say I select each instance individually and change the coordinates of each instance, so now all three instances are in different positions.
How do I position all three instances at once so that they are in the same place on the stage (overlapping) without selecting each instance individually and manually entering the coordinates in the 'properties' pane. If I edit the master symbol, and change the coordinates there, it will affect the position of all three instances, but only relative to their previous positions, so the three instances will not get the same position after editing the master symbol. I think the answer may have to do with the registration point of the symbol but I'm not sure?
Multiple Instances Of One Object ?
Hi,
Does anybody know how to create many instances of loaded object? I need to
add preloaded image from external source (Loader class) to many MCs (using
addChild()). When I call method addChild() do second object, image
dissapears from first object because its name of instance is exactly always
the same. In order to avoid this problem I decided to clone this image each
time I adding it to MC. Unfortunately I don't know how to create another
instance of image without repeating loading it again from the network.
Thanks for the help,
Marek
Multiple Instances Of Things
I have 20 buttons that I want to duplicate and change each one slightly (numbers, animation). Is there an easy way to do this?
I tried renaming each instance and changing each one but it still changes the original instance.
Multiple Instances Of Sound
i am controlling all sounds through actionscript. does anybody know if there is a way to play multiple instances of same sound using actionscript?
thanks
Multiple Instances Of Things
I have 20 buttons that I want to duplicate and change each one slightly (numbers, animation). Is there an easy way to do this?
I tried renaming each instance and changing each one but it still changes the original instance.
Script For Multiple Instances
so right now i have something like this:
link1.onRelease = function() {
but what about link2, link3, link4 etc.
can i do it at the same time without having to copy the script 10 times and renaming link1 to link2 or link3 etc.?
any help would be great!
thanks!
austin
Multiple Instances Under The Same Function...?
hi all!
i've got some button rollout/rollon events happening under a function and for the life of me i can't figure out how to add other instance names so that they all work off of the same function.
b1.onRollOver = over;
b1.onRollOut = out;
b1.onRelease = index;
b1 is my instance name, how do i write it so i can add b2, b3, etc.
Targetting Multiple Instances With HitTest. HELP ME
I am new to Actionscript. I have created multiple instances of a movie clip with the duplicate.moviClip action and they have the names "poll" + i, with i being a number from 0 to 249. I have another script in the movie that I want to be triggered by any of the 250 instances by using if(hitTest(_root.poll*), it works if I put a specific number where the asterisk is but this means it is only triggered by one of the instances.
Is there a way I can target all of them?
Is there a character in Actionscript that can be used as a wildcard such as *.* in MS Dos?
Help me Obi-one Kenobi your my only hope.
|