Why Won't My Function Play Nice?
For some reason, whenever I try to attach something to my movieClip, it errors out the whole application. Anyone have any ideas why?I have a class called goldStacksComponent which is basically just a big box with some buttons and text boxes in it. (eventually it will have some xml content in it)The lines that are commented out for some reason break my whole application, and I don't understand why. The MC will in fact add to stage, but doing anything else to it breaks it. Anyone have any ideas? Code: private var gs:goldStacksComponent;private function loadStacks() {gs = new goldStacksComponent();//gs.x = 22;//gs.y = 170;addChild(gs);//gs.stackName.text = "(section name)";}
ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 12-30-2008, 04:37 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Play Nice
I'm mostly having issues with SWF files that refuse to talk to each other.
It's almost as if SWF files were inherently designed not to talk to each other. Or anything else. It's insane.
I can get one file to send data using the GET command. But I can't get the other to retrieve it.
I can get both files to access the same XML file, but the file that needs to send the message refuses to save it permanently.
And nether file seems to want to talk to txt, or cmf, or html.
Now maybe I misunderstood the security protocols, but the two files are in the same domain, and onto of that I have set acceptDomain to "*" to make sure the domain is allowed.
The files I'm using are specifically in the same folder.
Basically I have used java script to call a new window, without all that extra browser stuff. If there is a way to do this in flash, I couldn't find it.
Now I have two files in two separate html docs. I just need to pass on a url that leads to a common file they'll both be sharing. And another variable that needs to be set.
If it's not a security issue, I can't think of why these files can't send and retrieve information to a common file. So I'm at a roadblock.
communication between two independent swf files
Edited: 01/15/2007 at 12:46:40 AM by Duckyofdoom.com
Play Nice
I'm mostly having issues with SWF files that refuse to talk to each other.
It's almost as if SWF files were inherently designed not to talk to each other. Or anything else. It's insane.
I can get one file to send data using the GET command. But I can't get the other to retrieve it.
I can get both files to access the same XML file, but the file that needs to send the message refuses to save it permanently.
And nether file seems to want to talk to txt, or cmf, or html.
Now maybe I misunderstood the security protocols, but the two files are in the same domain, and onto of that I have set acceptDomain to "*" to make sure the domain is allowed.
The files I'm using are specifically in the same folder.
Basically I have used java script to call a new window, without all that extra browser stuff. If there is a way to do this in flash, I couldn't find it.
Now I have two files in two separate html docs. I just need to pass on a url that leads to a common file they'll both be sharing. And another variable that needs to be set.
If it's not a security issue, I can't think of why these files can't send and retrieve information to a common file. So I'm at a roadblock.
communication between two independent swf files
Do Flash MX & Illustrator 10 Play Nice Together?
Hello Group,
New to Flash MX, Illustrator 10 & OSX.
I used to be able to copy vector art from Illustrator 8 and paste it directly into Flash 5 just using copy and paste commands.
With MX & Illustrator 10, the art gets mangled in the transfer... Jagged edges and (outlined) type looks like it went through a paper shredder.
Opened Illustrator 8 and tried it. Part of artwork got chopped off, but looked better and the type looked even worse.
Anybody know anything about this? I'm trying to avoid the extra cumbersome step of exporting out of Ill and importing into Flash.
Rock on,
Chilly in Minnesota
[F8] My .SWF's Don't Play Nice On The Internet Anymore :(
Somebody please help me!
I've been working with Flash for awhile now and I finally got used to the stupid Active X workarounds.
Now that I've migrated to Flash CS3 I am having major problems when I deploy pages and/or content to the internet.
The main problem I am having is with files that parse data (XML & .txt) to show the end user something. One of the .SWF files is an XML driven menu system and the other is a simple little news ticker that scrolls a text file.
I've played around with numerous combinations of the "Access Network Only", "Access Local Files Only" and different Flash Player target versions in the Publish Settings dialog. This got the "local" ones to play nice and then I realized I probably had to copy and paste from the Flash generated HTML into the "real" HTML I want to deploy.
The "local" files play back fine when they are in a folder on either one of my computers. However neither the "local" or "network" files show up when deployed to the internet.
I am hoping that this has nothing to do with the integration of Dreamweaver's "Sites" feature into Flash CS3 since I build my files on a PC that is not connected to the internet and then deploy them using a MacG4.
The best thing I can manage to see on a live web page is a white box where the .SWF should be. If I right click on it I get a faded "Movie not loaded" option that does nothing and an "About Adobe Flash Player 9" option. The pages load all the way and neither IE6, IE7 or FireFox 2.x show any errors.
I'm stuck! And I'm starting to get angry!
Here's an example of the HTML code:
<head>
<title>Tester</title>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
</head>
<body>
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0',
'width', '420',
'height', '90',
'src', 'news',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'news',
'bgcolor', '#ffffff',
'name', 'NEWS',
'menu', 'false',
'allowFullScreen', 'false',
'allowScriptAccess','always',
'movie', 'NEWS',
'salign', ''
); //end AC code
}
</script>
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,45,0" width="420" height="90" id="news" align="middle">
<param name="allowScriptAccess" value="always" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="NEWS.SWF" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><embed src="NEWS.SWF" menu="false" quality="high" bgcolor="#ffffff" width="420" height="90" name="news" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</noscript>
</body>
By the way, I'm using Flash Player 9.0.45.0
Any help would be greatly appreciated.
Pixel Bender Won't Play Nice With Flash?
Anyone else having trouble getting flash to play advanced Pixel Bender effects correctly?
I wrote this code to make a wave effect and it looks fine in the Pixel Bender Toolkit but it has white/background all over in the affected ring/wave area when run in Flash (yes I have the latest version). Anyone notice a problem with how the shader is written? Parts of the code have been removed but the core logic is all there. What could I be doing wrong?
Code:
version : 1;
description : "Create a splash effect where user clicks"; >
{
// define PI for the degrees to radians calculation
const float PI = 3.14159265;
// how many pixels out the wave should move per frame
parameter float speed
<
minValue:float(0.00001);
maxValue:float(2048.0);
defaultValue:float(0.05);
>;
// center of the splash effect
parameter float2 center
<
minValue:float2(0.0, 0.0);
maxValue:float2(2048.0, 2048.0);
defaultValue:float2(256.0, 256.0);
>;
// width of wave in pixels
parameter float waveLength
<
minValue:float(0.0);
maxValue:float(1024.0);
defaultValue:float(10.0);
>;
// A parameter that tells us how much time has passed so we can
// propogate the splash effect.
parameter int time
<
minValue:int(-65535);
maxValue:int(65535);
defaultValue:int(0);
>;
input image4 src;
output float4 dst;
// evaluatePixel(): The function of the filter that actually does the
// processing of the image. This function is called once
// for each pixel of the output image.
void
evaluatePixel()
{
float4 result;
// get vector to center
float2 curToCenterVec = outCoord() - center;
// get dist wave should be at at this time
float dist = length( curToCenterVec );
float targetDist = float(time)*speed; // keep it slow..?
// if we are in dist range
if( dist > targetDist && dist < targetDist + waveLength )
{
// use neighboring pixels in varying amounts depending on how close to edge of range
float waveEdge = (cos(((targetDist + waveLength) - dist / waveLength) * 2.0*PI) + 1.0) / 2.0;
// scale vector depending on waveEdge value
float2 inVec = normalize(curToCenterVec)*waveEdge*waveLength;
// find pixel at that point
pixel4 inPoint = sampleLinear(src, outCoord()+inVec);
// mix with current pixel by waveEdge value
result = mix( sampleLinear(src, outCoord()), inPoint, waveEdge );
}
else
{
result = sampleLinear(src, outCoord());
}
dst = result;
}
}
and in ActionScript 3.0:
Code:
// copyright 2008 All rights reserved
var loader6:URLLoader = new URLLoader();
loader6.dataFormat = URLLoaderDataFormat.BINARY;
loader6.addEventListener(Event.COMPLETE, onLoadComplete6);
loader6.load(new URLRequest("testPB4.pbj")); // splash when mouse down
var bmf6:ShaderFilter = new ShaderFilter(shader6);
function onLoadComplete6(event:Event):void {
shader6 = new Shader(loader6.data);
bmf6 = new ShaderFilter(shader6);
// enable the listening event
stage.addEventListener(MouseEvent.MOUSE_DOWN, onStageMouseDown);
}
// this is called every frame
function clickeds3(e:Event)
{
wood.filters = addIfNotExist(wood.filters, bmf6); // refresh filter every frame
var curTimer:int = (getTimer()%65535);
shader6.data.time.value = [(curTimer - lastMouseDownTime)%65535]; // still we can't go over 16 bit with pixel bender
lastTimer = curTimer;
}
function onStageMouseDown(me:MouseEvent)
{
shader6.data.center.value[0] = me.localX;
shader6.data.center.value[1] = me.localY;
//var invertFilter:ShaderFilter = new ShaderFilter(shader6);
wood.filters = addIfNotExist(wood.filters, bmf6);
lastMouseDownTime = getTimer()%65535;
}
function addIfNotExist(ra:Array, item:Object):Array
{
if( ra.some(isThisShader, item) == 0 )//if( wood.filters.some(isThisShader, bmf6) == 0 )
{
//trace("ShaderFilter item:"+item+" not found, so adding to array:"+ra);
var forcedFiltersCopyThanksAdobe:Array = ra;
forcedFiltersCopyThanksAdobe.push(item);
ra = forcedFiltersCopyThanksAdobe;
}
return ra;
}
var isThisShader:Function = function(item:ShaderFilter, index:int, array:Array):Boolean
{
return item.shader.data.name==this.shader.data.name;
}
[F8] How To Make Preloader And Sound Object Play Nice?
'm building this file, and it's not an unusual, or even very challenging file. It's a long keyframe timeline animation, with a mute on/off button for the one sound object, and a pause/start button to control the whole movie.
Everything works, until I try to introduce a preloader.
Seems like preloaders and soundobjects don't like each other.
I've tried:
- preloader in main file: won't display the preload animation, whether or not the soundobject is exported to first frame (from linkages menu).
- external preLoader swf, with loadClip. This works, EXCEPT that the sound will only play if it's in the timeline. If I introduce the sound in the main movie as a soundobject, it plays in the main movie, but not when it's preloaded through an external preloader swf.
Now, I can think of a few things, but I'm a little daunted by the prospects.
1) Is there a way to control sound volume (only one sound file in entire file), without introducing the mp3 in a sound object? If yes, what/where?
2) I can use Ken Bellow's tutorial code
( http://www.kennybellew.com/tutorial/...ttachsound.htm )
to create an external swf containing only the audio file, and then use loadSound in the main movie to create a preloader for the sound only, but i still have another 800k or so in the main movie that I need to preload, so I need to preload BOTH the audio and the main file, and I don't know how to create a VAR that adds both of those, and base the percentloaded on that.
Any advice/guidance greatly appreciated. There are so many flash files with audio and UI, this must be a problem people deal with all the time....
Thanks!
How To Make Preloader & Sound Object Play Nice?
I'm building this file, and it's not an unusual, or even very challenging file. It's a long keyframe timeline animation, with a mute on/off button for the one sound object, and a pause/start button to control the whole movie.
Everything works, until I try to introduce a preloader.
Seems like preloaders and soundobjects don't like each other.
I've tried:
- preloader in main file: won't display the preload animation, whether or not the soundobject is exported to first frame (from linkages menu).
- external preLoader swf, with loadClip. This works, EXCEPT that the sound will only play if it's in the timeline. If I introduce the sound in the main movie as a soundobject, it plays in the main movie, but not when it's preloaded through an external preloader swf.
Now, I can think of a few things, but I'm a little daunted by the prospects.
1) Is there a way to control sound volume (only one sound file in entire file), without introducing the mp3 in a sound object? If yes, what/where?
2) I can use Ken Bellow's tutorial code
( http://www.kennybellew.com/tutorial/...ttachsound.htm )
to create an external swf containing only the audio file, and then use loadSound in the main movie to create a preloader for the sound only, but i still have another 800k or so in the main movie that I need to preload, so I need to preload BOTH the audio and the main file, and I don't know how to create a VAR that adds both of those, and base the percentloaded on that.
Any advice/guidance greatly appreciated. There are so many flash files with audio and UI, this must be a problem people deal with all the time....
Thanks.
Play All Function...
Hi,
I have this project which is made of 3 distinct sections.
Each of these sections is composed of a certain number of MCs that are loaded manually by the user.
For instance, the user will click on section 1 and MC1_1 will start playing until it ends. Then the user will have to click the "next" button to go to MC1_2, and so on.
How would I code a play all function that would play all MCs related to a specific section, and in the order they must be played?
Also, I would like a small pause of 1 or 2 second in the switch from one MC to another.
And Finaly I want the user to be able to interrup the auto play all function by pressing the ESC key and jump back to the main menu.
Is that hard to do?
Thanks a lot
p.
[F8] Play Function
Here is my problem:
I have created a master swf file.
From the master file, I loaded a swf movie called "buttons" into level 7.
I loaded another swf movie called "slideshow" into level 6.
in "buttons", there is a play button. "slideshow" is a bunch of pictures that fade in one at a time, with a stop(); command after each picture fades in. I want to set up a play(); function on the play button in "buttons" so that when it is pushed, on level 7, it starts the swif file on level 6 playing. I cannot figure out the command to attach to the button to get the movie in level 6 to play.
Right now I have:
on(release){
[I need something here].play();
}
What do I put into the space marked [I need something here]?
Im a real rookie here guys, so go easy on me. Thanks for your help!
Play MC Within Function... How?
I have 6 movieclip buttons with actionscript. (btn1, btn2, etc)
I have 6 movieclips that fade in text. (01_mc, 02_mc, etc)
When a btn receives an onRelease it moves to the top. But I also want it to play it's corresponding movieclip. (btn1 = 01_mc, btn2 = 02_mc, etc
I know how to it like this:
PHP Code:
btn1.onRelease = function () { mc_fix.attachMovie ("01_mc", "o", 1, {_x:450, _y:-150});btn1.onRollOut = function () { mc_fix.o.removeMovieClip();
However I can not put that into my current code as it does not work. I believe this may be beyond me.
Current code:
PHP Code:
var _topXArray:Array = [90,90,90,90,90,90]var _bottomXArray:Array = [50,125,200,270,350,425]var _rotationArray:Array = [-90,-149,148,89,30,-30]var _scaleArray:Array = [50,50,50,50,50,50]// the y position when the single button moves to the topvar _topY:Number = 160;// the y position for all the other buttons moving to the bottomvar _bottomY:Number = 310;// loop through the buttons, giving each these paramatersfor (var i = 1; i <=6; i++) { var thisBtn = this["btn"+i]; this["btn"+i].filters = [myBevelFilter] thisBtn.topX = _topXArray[i-1]; thisBtn.bottomX = _bottomXArray[i-1]; thisBtn.rotationTarget = _rotationArray[i-1]; thisBtn.scaleTarget = _scaleArray[i-1]; thisBtn.onRelease = function () { doAnim(this); }}}function doAnim (whichClip:MovieClip) :Void { // loop through the buttons for (var i = 1; i <=6; i++) { var thisBtn = this["btn"+i]; // if the current button is the one moving to the top then it moves to the top if (thisBtn == whichClip) { var myXTween:Tween = new Tween(thisBtn, "_x", mx.transitions.easing.Regular.easeOut, thisBtn._x, thisBtn.topX, 1, true); var myYTween:Tween = new Tween(thisBtn, "_y", mx.transitions.easing.Regular.easeOut, thisBtn._y, _topY, 1, true); var myRotationTween:Tween = new Tween(thisBtn, "_rotation", mx.transitions.easing.Regular.easeOut, thisBtn._rotation, thisBtn.rotationTarget+180, 1, true); var myScaleTween:Tween = new Tween(thisBtn, "_xscale", mx.transitions.easing.Regular.easeOut, thisBtn._xscale, thisBtn.scaleTarget+50, 1, true); var myScaleTween:Tween = new Tween(thisBtn, "_yscale", mx.transitions.easing.Regular.easeOut, thisBtn._yscale, thisBtn.scaleTarget+50, 1, true); } // otherwise it moves to the bottom else { var myXTween:Tween = new Tween(thisBtn, "_x", mx.transitions.easing.Regular.easeOut, thisBtn._x, thisBtn.bottomX, 1, true); var myYTween:Tween = new Tween(thisBtn, "_y", mx.transitions.easing.Regular.easeOut, thisBtn._y, _bottomY, 1, true); var myRotationTween:Tween = new Tween(thisBtn, "_rotation", mx.transitions.easing.Regular.easeOut, thisBtn._rotation, thisBtn.rotationTarget, 1, true); var myScaleTween:Tween = new Tween(thisBtn, "_xscale", mx.transitions.easing.Regular.easeOut, thisBtn._xscale, thisBtn.scaleTarget, 1, true); var myScaleTween:Tween = new Tween(thisBtn, "_yscale", mx.transitions.easing.Regular.easeOut, thisBtn._yscale, thisBtn.scaleTarget, 1, true); } } }
I'm assuming I have to stick it somehow in the doAnim but I do not know how. Please assist. :confused:
Time Function? At 12:00 Go To And Play...
Hi All,
I want to be able to loop a movie, however, when the current time gets to the top of the hour, make the movie go and play another part of the movie.
E.g.
If time = 12.00 go to and play frame32
If time = 1.00 go to......... etc.
Is this possible?
Cheers,
James.
[F8] OnResize Play Function
Hi
Have a small issue, that I hope you can help me with:
I've got a fullscreen Flash website, and want to move a MC around the stage according to the browser size. This isn't the actual problem, but I want to do this with a tween animation. I'm using Fuse, to do the tweening, but I of course only want to call the animation function once. This when the user is done resizing the browser on not while the browser is resizing, as the onResize listener calls my animation function too often causing a pretty bad animation. Tried using a setInterval(), but didn't realy succeed. Hope my explanation wasn't too confusing!
Actually what I'm searching is this effect:
http://www.nigelwalker.co.uk/
Any suggestions?
Thanks in advance!
[CS3] Problems With The Play() Function...
Hello everybody!
I am working on a website right now.. and in order to explain my problem i created some simple fla files (please see the link in the bottom..)
here is the situation:
A base.swf loads the ball.swf into _level1 - the base.swf (which are in fact 3) defines a gloabal variable.. num 1 or 2 ... or nothing at all...
in the ball.swf are two movie clips.. a yellowBall_mc and greenBall_mc - i would like to control those movie clips via an if else condition.. everything works so far.. i can control the ball_mcs with for example with _alpha ... but i can't make the play() function work.. it just doesn't work in the if else condition..
here is the code:
-------------------
stop();
if (mainVariable == 1)
{
trace ("Variable is set to 1");
yellowBall_mc.play();
yellowBall_mc._alpha = 50;
}
else if (mainVariable == 2)
{
trace ("Variable is set to 2");
greenBall_mc.play();
greenBall_mc._alpha = 50;
}
else
{
trace ("no movement - no variable defined");
}
-------------------
and here are the FLA files...
http://www.loxbox.at/chris_content/flaFiles.zip
would be awesome if somebody can help.. i am clueless and spent already too much time for this simple problem..
thank you for reading and help,
chris
[CS3] Problems With The Play() Function...
Hello everybody!
I am working on a website right now.. and in order to explain my problem i created some simple fla files (please see the link in the bottom..)
here is the situation:
A base.swf loads the ball.swf into _level1 - the base.swf (which are in fact 3) defines a gloabal variable.. num 1 or 2 ... or nothing at all...
in the ball.swf are two movie clips.. a yellowBall_mc and greenBall_mc - i would like to control those movie clips via an if else condition.. everything works so far.. i can control the ball_mcs with for example with _alpha ... but i can't make the play() function work.. it just doesn't work in the if else condition..
here is the code:
-------------------
stop();
if (mainVariable == 1)
{
trace ("Variable is set to 1");
yellowBall_mc.play();
yellowBall_mc._alpha = 50;
}
else if (mainVariable == 2)
{
trace ("Variable is set to 2");
greenBall_mc.play();
greenBall_mc._alpha = 50;
}
else
{
trace ("no movement - no variable defined");
}
-------------------
and here are the FLA files...
http://www.loxbox.at/chris_content/flaFiles.zip
would be awesome if somebody can help.. i am clueless and spent already too much time for this simple problem..
thank you for reading and help,
chris
Button Function (Play One's)
Button Function
Can you help, i need this code to play one's until a another button is pressed and then it can recycle, what do i add ?
on (press){
_root.IconAni.gotoAndPlay("Frame2");
}
NEW FUNCTION?
How To Play Again Function OnEnterFrame
When I press button, variable a is growing to value "50". After this I delete this.onEnterFrame. How to run this.onEnterFrame = function() when I press some button again ?
ActionScript Code:
a = 0;
this.onEnterFrame = function() {
a += b;
trace(a);
if (a == 50) {
delete this.onEnterFrame;
}
};
my_but1.onRelease = function() {
a = 0;
b = 1;
};
my_but2.onRelease = function() {
a = 0;
b = 2;
};
Play Function After Animation
I have a function (seen below) that is supposed to play go to frame 3 (which contains a movie clip), play the animation that resides on frame 3 and then do the rest of the function.
Obviously I have not done this right because it does not play the animation on frame 3, it simply jumps through the function.
How would you write the function to gotoAndPlay a frame, then when that is complete, run the rest of the function.
ActionScript Code:
function generate (event:MouseEvent):void
{
gotoAndPlay(3);
user = userTxtField.text = "" + (Math.floor(Math.random() * 100000));
cpu = cpuTxtField.text = "" + (Math.floor(Math.random() * 100000));
if (user == cpu){
gotoAndStop(5);
}else{
gotoAndStop(4);
}
}
Pause And Play Function
I am using a stop(); gotoAndPlay with setInterval on a series of swf files that are loaded into a container movie. There is a bug in doing this, in which when one of the swfs is loaded into the container and you click on a link to load a different swf before the current swf has gotten to the frame in which you reach this function, its stops the function and nothing pauses/plays anymore.
Code:
stop(); //the last frame you want the movie played
goAgain=function(){
gotoAndPlay('62'); // "x" is the next frame will be playing
clearInterval (playAgain);
}
playAgain=setInterval(goAgain, 5000);
Function Media.play :(
Hi,
I'm reposting this in this section insteed.
I use my_media.play(100); to set a playhead to 100 seconds in my_media(media display component).
It works fine, but when I use a variable to set the playhead (i.e. my_media.play(my_var))
it just won't work. Is it the function media.play(); that doesn't support it or is there a workaround?
Cheers.
FLV Player - Play Again Function?
I'm workning on a flv player :D
How can I make end layer with "play again" and "more videos" function?
similar to youtube video player :D
Does Frame Have To Play To Activate Function?
hi all,
i have a timeline that has 1 frame with multiple layers. each layer contains a button. on release the button calls a function in the _root 1st frame to snap the button to a grid. i have the root timeline set to stop after the first frame.
my question is, in order to call a function, does the frame containing the function have to be playing. i.e. because the frame containing my function has a stop(); at the end, and therefore when the function is called the movie doesnt play through the code, is this the reason why the pesky thing isnt taking arguments?
thx in advance
bob
http://www.sensoriumdesign.net/
Play Movieclip Using A Function Call
Hi,
I'm creating a menu system with a series of buttons that have rollover and rollout states. Unfortunately, there are absolutely loads of buttons and i don't really want to have to change the code for each of them every time we make an alteration to the menu.
I want to put the functionality into a function, passing it the movieclip and button names, something like:
function rollover:Void(movieclipname, buttonname) {
_root.movieclipname.buttonname.onRollover.gotoAndP lay(2);
}
but I don't know how to include movieclipname and buttonname into the dot syntax correctly. Any help would be appreciated. (I'm using AS 2.0).
Thanks
Possible To Play A Sound On A ScaleUp Function?
i have an object that both rotates and scales up and down with hitstates. i was wondering if there is an easy way to throw code into it that have it play a noise when a mouse rolls over it? the object has buttons inside it and everywhere i try to put the code, it makes the buttons not work.. project is due in a few hours but any help would be appreciated..
thanks
[F8] Timer And Then Goto And Play Function
i'm looking for a script that tells the timeline to start to play frame 25, after 5 seconds.
i've found a few codes online but cos they are for different purposes, i just cant seem to custom it to work accordingly.
can someone pls help?
much appreciated!
Stop And Play Function In One Button
hello everyone
i have a Button that contains a Movieclip playing.. now, i want it to STOP when i click on it and then RESUME when i click it again.
dats all. thanks in advance.
How To Stop The Right Click Play Function
Hello there,
I am making a game online using flash and there are two sections, a player section, and the teacher section with private information. Well, if the player right clicks and presses play, it goes to the next frame, which is the teacher section. How do I void out this problem? Any help would be awesome! Thanks
Can I Have A Mouse-over Function To Play Sound?
Hello all,
I have a flash graphic here www.stainlessrhino.com top left corner. What I would like is for the graphic to play (soundless as it does now) when the page is loaded, however, if the user mouse over the swf a sound would play once. How would I accomplish this? Is it possible?
Thank you!
How To Disable The Rewind N Play Function
hi there.
I'm a newcomer of this forum although I've been popping in n out of kirupa for some time.
Just wondering if someone can help me on this...
How do I disable the rewind n play function of a swf? so that when i upload the swf onto the net, users are not allowed to rewind or play the swf by right clicking?
Really urgent... hope someone could help me.
Thks!
Slideshow With Pause And Play Function
I wanted to use this tutorial http://www.kirupa.com/developer/mx20..._slideshow.htm
But i need a pause and play function in it. Can somebody tell me how to do it ?
Maybe someone has a source file for this ?
And offcourse is it possible to do ?
How To Disable The Rewind N Play Function
hi there.
I'm a newcomer of this forum although I've been popping in n out of kirupa for some time.
Just wondering if someone can help me on this...
How do I disable the rewind n play function of a swf? so that when i upload the swf onto the net, users are not allowed to rewind or play the swf by right clicking?
Really urgent... hope someone could help me.
Thks!
USING FUNCTION TO PLAY SOUND WITH VOLUME CHANGER
help needed right here ...
i got a script.....well it is a function to play an attached sound ..
the problem is that i want to put a handler so i can drag it up and down to change the sound volume ... i aploaded the fla file .. it doesnt contain the handler symbols ..
wut i need ?? is how can i create a looper the can change the volume value in the function ... Coz .. wut i recognzed here is that the function is played with one set .. can i change this set .. if not .. anythin i m,ight add or remove in the function so i can activate the sound volume changer loop ( i mean that the sound parameter would read from the loop ) .. if it is possible .. if not ... any other way for this ...
thanx in advance ..
Problem With PAUSE PLAY FUNCTION For MovieClip
Hi there I have made a intro which is powered by a pause play function the problems is the function wont cancel after the intro has finished and make the movie loop and when you add a stop(); action the function overides this
my question is how do you stop the function from looping.
The code for function
function pause() {
play();
clearInterval(timer);
}
this code is added to the where you want the pause added
stop(); timer = setInterval(pause, 4800);
the code needed is to stop the function from looping of the movie
?
Many Thank Paul
Auto Slideshow, Play Btn Won't Loop Function
Hi,
I'm trying to get my Flash Movie to loop a function that advances a slideshow by one jpg. The script worked when a "back" and "forward" button was used to advance the jpgs. I'm trying to alter the script by using a function that will run through all the jpgs when a "play" button is pressed. I have added a call to the function on that button and there is a setInterval on that button as well...So far, the play button only fades out the place holder image that is loaded as soon as the movie starts (I want this image to continue to load without the play button being pressed)...the script isn't looping, it never loads another image. Would someone mind looking my code in the fla I've attached? I've attached a zip file for you to download. It includes the folder with the jpgs.
What I'm I doing wrong? I think I've just overlooked a minor detail...I'm I wrong? Thanks for your help
Using A Function To Play Outro And Change Frame
Hey all,
I'm having a problem figuring out something that should be fairly simple I believe.
Basically, I have navigation buttons ... each button has its own "section" in the timeline. The sections are basically layed out in the timeline in 10 frame intervals. Each section is loading it's own external swf that contains the content.
What I need to happen is when you click on a navigation button, it tells the currently active section content movie clip to go to a frame, play.. and then on the last frame, it needs to tell the root to go to the last clicked button.
This is the code that I am currently using on frame 1:
Code:
nextSection = link1;
link1button.onRelease=function(){
if(nextSection!=link1){
nextSection=link1;
_root.container.gotoAndPlay("outro");
}
}
link2button.onRelease=function(){
if(nextSection!=link2){
nextSection=link2;
_root.container.gotoAndPlay("outro");
}
}
link3button.onRelease=function(){
if(nextSection!=link3){
nextSection=link3;
_root.container.gotoAndPlay("outro");
}
}
And, on the final frame of each section clip, I have this code:
Code:
_root.gotoAndPlay(_root.nextSection);
I think one of the problems is that script on the main is just on the first frame, and it isn't executing througout the clip. So do I need to put it into a "control clip" so that it's continiously looping?
I am not the best programmer by any means.. I just try to hack at stuff basically. Is that function written correctly?
I was having a hard time explaining this, so I went ahead and uploaded the source files to the following location:
http://houser02.com/example.zip
Can anyone help? Thanks SOO much in advance!
CS3/AS2 Need To Add A Function To FLVPlayer Component Play Button
Hi,
I have an instance of the FLVPlayback component in a movie.
I need to assign an extra function to the play button in the component
(to tell another swf on the same page to stop, I have the function working)
how can I find out the button instance name so I can assign the function to it?
or am I on the wrong track?
mark
Can I Direct Play Head To Go To Two Positons In One Function?
I'm trying to make this script work in which two things should happen onRlease of a movie clip. The "transition" plays but frame 18 doesn't..even though the path is right. I even tried frame label even that doesn't work.
I must be doing something wrong, maybe you can detect from this script. The script is on the clip itself.
_root.navbtns_mc.webnav.onRelease = function() {
_root.transMC.gotoAndPlay("transition");
_root.navbtns_mc.webnav.gotoAndStop(18);
}
Can I Direct Play Head To Go To Two Positons In One Function?
I'm trying to make this script work in which two things should happen onRlease of a movie clip. The "transition" plays but frame 18 doesn't..even though the path is right. I even tried frame label even that doesn't work.
I must be doing something wrong, maybe you can detect from this script. The script is on the clip itself.
_root.navbtns_mc.webnav.onRelease = function() {
_root.transMC.gotoAndPlay("transition");
_root.navbtns_mc.webnav.gotoAndStop(18);
}
Timer Function Needed To Goto And Play Frame 1
Hi i need some sort of timer function, i am a newbie at flash, and would love some input.
I made a dynamix txt box which gets its data from an external source (http://radio.megamixers.net/flash.txt) i need that txt file reloaded every 60 seconds or so, so i can keep it showing whats played on the radio now.
Hope someone can help me out
My .FLA is here
http://www.codes.dk/titleupdater.fla
Hope to get some help - ive been all over the net looking for a function to handle this but no luck..
Kind regards
Cosmo
Play() Function Not Working On Loaded Swf In Target Clips
here is some code loading swfs into empty target mcs, they load
on cue (according to the timer running 25 times a sec). But the clipHolder variable holding the path to the target doesn't work
on cue i.e inside the filmFrames variable condition check. Outside of
it, it's fine but then is called continuously and therefore loops the last loaded swf.
Anyone any pointers?
many thanks
blipstation
setInterval(filmTimer,40);
Mins=0;
filmSecs=0;
filmFrames=0;
script=new Array();
//first value frame time,second playtype, third swf to loadMovie with
//fourth target clip to load into
script[0]=new Array(10,"play","swf/4.swf",target7);
script[1]=new Array(15,"play","swf/4.swf",target8);
script[2]=new Array(20,"play","swf/4.swf",target9);
script[3]=new Array(25,"play","swf/4.swf",target10);
script[4]=new Array(30,"play","swf/4.swf",target11);
script[5]=new Array(35,"play","swf/4.swf",target12);
script[6]=new Array(200,"play","swf/8.swf",target24);
script[7]=new Array(205,"play","swf/8.swf",target23);
script[8]=new Array(210,"play","swf/8.swf",target22);
script[9]=new Array(215,"play","swf/8.swf",target21);
script[10]=new Array(220,"play","swf/8.swf",target20);
script[11]=new Array(225,"play","swf/8.swf",target19);
arrayPos=0;
function filmTimer(){
filmFrames++;
filmSecs=Math.floor(filmFrames/25);
Mins=Math.floor(filmSecs/60);
Frames=filmFrames%25;
Secs=filmSecs%60;
filmTimerTxt=Mins+":"+Secs+":"+Frames;
checkScript();
}
function checkScript(){
if(filmFrames==script[arrayPos][0]){
playType=script[arrayPos][1]
switch(playType){
case "play":
loadMovie(script[arrayPos][2],script[arrayPos][3])
clipHolder=script[arrayPos][3];
//this line 'refuses' to work here but after the arrayPos++ it does
//Needs to work here else it will loop. See below.
clipHolder.play();
}
arrayPos++;
}
//Here after the if top clause it makes them play. Except for the
//last clip, which it loops since it is being executed each time the
//the function is called from the filmTimer function.
clipHolder.play();
}
Pause Play With A Function With Actionscript For Text Timings On Banner
Can any one help me to create a function to controll the timing of the text using actionscript for a banner.
The banner is set up so the text in a movie clip has a instance name of text. The function would then control the timing,
in and out of the fades, between each text appearing. I know the script needed to stop the play head is as follows.
pause("2"); this allows the playhead to hold for 2 seconds., and then it will move on. You need to place this bewteen each fade giving greater controll of the timings of text movie clip
I seen this done before and know it is possible to do so. I would extremely grateful if any can help.
Nice To Be Here
hi there,
Yes I am very new to the flash scene. In fact someone in the chat room recommended me to come here.
I have a website which looks simple, but not sure how to make something similar for church programs.
http://www.cryofthespirit.com/alone.html
Would someone tell me how to go about doing this, or where I can get a template for the same feel.
Thanks alot y'all
How Did They Do This Nice FX?
Hi experts!
I just wonder, how is this FX done? It's in the top of the main page, it's like water but in a different way from the typicall seen everywhere (than one with concentric circles). This one is really cool.
http://www.datatech.es/
Any ideas?
Thank you!
Manare
Anybody A Lil Help Would Be Nice
Works perfect locally - load everyrhing to my server and up barfs an error .. my xml file isn't being loaded any ideas?- yes the swf and xml file are in the same directory.....
Code:
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
swf = [];
name = [];
link = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
swf[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
name[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
link[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
}
firstImage();
} else {
display_txt.text = "Error loading XML!";
display_txt._y = 380;
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("swfs.xml")
Anyone Nice Enough To Help?
Basically I have 6 Layers
RedButton
Blue Button
Green Button
OrangeButton
Text
Actions
Each of the buttons corresponds to a different word which I have nested inside the "Text" movieclip which when pressed SHOULD bring up the word with a little alpha from 0-100
Each word has an instance name to be referred to as well.
Here's my action script for the first button
this.RedButton.on(release){
_parent.Text.Hello.gotoAndPlay(2);
}
When it compiles it gives me an error of "Field name expected after "." operator. Anyone know what this is or how I can fix my code....see any other errors? What's the best way to approach this movie?
Thank you for all your help...you guys are awesome.
|