How Can One Swf Trigger Another ?
hello flashers...
here is my problem: I have a main movie which has a placeholderbox that loads an swf inside of itself ... the swf on the other end has a movieclip nestled inside of itself... this movie on "mouse down"=functions as a link to the database and triggers the execution of a PHP page. I am trying to make this nestled movie load another external swf into another placeholder on the main movie when "mouse over" is performed.... How can I actionscript this???
FlashKit > Flash Help > Flash ActionScript
Posted on: 04-16-2005, 07:13 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
MX: Trigger An MC, Then Wait, Then Trigger Another?
Hello to you all
Once again, I kind of managed to already summarize the problem in the headline... and once again, I will probably write way too much about the details in the message
I have an application done in flash- on the main Scene Level, everything has only one frame but I have MCs and the like that are triggered by actionscript.
There are quite a few nested functions on the main actions layer as well as an "onEnterFrame" function that reloads XML data in the background, etc... but that is not the problem.
The problem is, that at one point, I am calling a few MCs that kind of close up a section of the page like blinds- and then I want a text to appear ontop of that now closed area... but if I just write...
Code:
_root.TimelineFader.BlendeT1.gotoAndPlay(2);
_root.TimelineFader.BlendeT2.gotoAndPlay(2);
_root.TextAboveTimeline.theMessage_txt._visible = true;
...it all happens simultaneously, of course.
I guess I could check for "BlendeT1"'s (or T2's) current frame (since it's an MC)... but how do I wait while that MC runs / until it reached a certain frame? How can I keep the rest of the actionscript in the main function from continuing? Is there a way? I'm lost.
Any and all help is appreciated. Thanks in advance!
~Marcel
Trigger An
Hi there,
thank you all pro's for your knowledge and patience
I have another question:
I have buttons on a stage - when clicking on each one of them, a movie clip starts playing (with tell targets).
All I wonder is if it's possible to trigger an "end-movie clip" when I'm clicking on another button. I would like to have a soft "ending" to that movieclip that's running, before the other one starts.
How can I make this?
//thanks - coala
Trigger Once
Hey All,
Which function can I use, other than On clipEvent(enterFrame) to trigger the movie on the very first frame via actionscript?
I ask this coz, unfortunately, enterFrame triggers the movie over & over again at the frame rate of the movie!
Please advise!
Trigger Url
Hi there
Is there a way to to create something like this
if a specific url = then go to frame
There must be :-)
PHP Trigger Swf
Hi all
I want to use the swf_actionGotoLabel in php, but dont know
how, finding a lot on the web about it - but not how to use or the code
<?
swf_actiongotolabel ( menu1 );
?>
got a swf with a label menu1
But to use this I need a function or what?
hope for help...
Have a nice day :-)
Using A Trigger.fla
im using a trigger file that once downloaded will play "_level0.play();"
when i t has downloaded all the linked files. it still loads all the same splash page files again. How do i get it to load once and the play the splash swf file?
PHP Trigger Swf
Hi all
I want to use the swf_actionGotoLabel in php, but dont know
how, finding a lot on the web about it - but not how to use or the code
<?
swf_actiongotolabel ( menu1 );
?>
got a swf with a label menu1
But to use this I need a function or what?
hope for help...
Have a nice day :-)
Best Way To Trigger
I have a series of animations. When one finished the next one starts and so on. They are a mix of frame and actionscript tweens(this means TweenEvent listeners are not an option for them all).
At first I was triggering event dispachers but this got messy due to the number of animations and having to think up loads of names for the dispatchers.
Then I tried this
stage.addEventListener(Event.ENTER_FRAME, getFrame);
stage.addEventListener(Event.ENTER_FRAME, getWavesFrame)
function getFrame(event:Event) {
if (whiteBox_mc.currentFrame == 20) {
waves_mc.gotoAndPlay(2);
stage.removeEventListener(Event.ENTER_FRAME, getFrame);
}
}
function getWavesFrame(event:Event) {
if (waves_mc.currentFrame == 20) {
ukMap_mc.alpha = 1;
var mapTween:Tween = new Tween(ukMap_mc, "alpha", None.easeIn, 0, 1, 0.8, true);
stage.removeEventListener(Event.ENTER_FRAME, getWavesFrame);
}
This worked well but got me thinking...is there a more efficient AS3 way? Built in functions to dermine what frame an animation is on. Also is using ENTER_FRAME not causing uneccessary CPU usage?
Any alternative ways or suggestions would be apprectiated.
PHP Trigger Swf
Hi all
I want to use the swf_actionGotoLabel in php, but dont know
how, finding a lot on the web about it - but not how to use or the code
<?
swf_actiongotolabel ( menu1 );
?>
got a swf with a label menu1
But to use this I need a function or what?
hope for help...
Have a nice day :-)
Trigger
This might be a stupid question but can I activate a flash animation without a normal image outside of flash? It's just I want the images that trigger it to be a certain size.
Trigger By Any Key
Hi guys,
i would like to trigger an action by pressing any key on the keyboard.
can anyone provide the script for this??
thks..
Trigger
Hello All
Is there any way that I can trigger a movie clip from an action attached to a keyframe within another movie clip ??
Thanks in advance
I Want To Pull The Trigger...
I have a swf file containing 3 scenes:
1. preloader
2. game
3. results
After the bytes are loaded the movie plays the scene "game". No prob so far.
Now I want to make the movie go to the next scene("result") when the variable "score"=0.
I tried the following:
I made an MC "trigger" with the as inside and placed it on the scene game. The actionscript in the MC "trigger" is:
if (score==0) {
stopAllSounds ();
gotoAndPlay ("results", 1);
}
The sounds do stop but the movie does not jump to the next scene "results".
I also tested:
if (gameover==0) {
stopAllSounds ();
_root.gotoAndPlay ("results", 1);
}
Can you guys help me finishing my swf.
greetings from europe
Howdy Partner, yours TrommelUndBass
Using The Enter Key As A Trigger
Hey,
i have several movies with dropdown boxes to select model numbers and bring up parts breakdowns for our customer service reps on our company Intranet. A request was made to be able to use the enter key to activate the current selection instead of having to press an onscreen select button.
I know you can check for keypresses, but i need help understanding how to implement this regadless of what is currently selected on screen.. For example, if they press enter, no matter if the combobox is selected or some other item onscreen is selected, the enter key will still trigger the current item in the dropdown to open the correct PDF file..
FLA's are available, but they are too large to post. If you need to see one, please email me at mrobinson@devap.com
thanks,
-myk
Please Help Creating A Trigger
I have created a world map, where when u rollover the continents they light up, the continents are buttons.
What i need to do is put like an invisible button over the top of parts of the continents to trigger a timezone clock that shows the time for that part of the world. but i still need the continent button to function under it. Does anyone know any code for this, or do i need to do it differently?
Any help would be greatly appreciated thanks...
Preload Trigger
i have a movie with several buttons that load an external movie inside the original movie but i'm using one preloader. to trigger that, i use this._parent.text.dummy = 1; inside the on (release) { tag for the buttons. that works fine, but i also have a movie that loads automatically within the main movie using the code:
loadMovie("main.swf", "this.holder_mc");
holder_mc._x = 0;
holder_mc._y = 107.5;
loadMovie("main.swf", "holder_mc");
this.onEnterFrame = function(){
if(holder_mc.getBytesLoaded() == 223167){
holder_mc._width = 703;
holder_mc._height = 240;
delete this.onEnterFrame;
};
};
i need the movie that loads automatically to also use the preloader but i'm not sure how to trigger it. if that makes sense to anybody, can you please help me with the code
Trigger Reaction
ok i created the following fla in hopes to get each movie clip that is hit to play, so i used the trace function to see what works and I used this scripting
code:
this.onLoad = function() {
for (i=0; i<150; i++) {
duplicateMovieClip("ball", "ball"+i, i);
}
};
// the following for loop doesn't work when trying to use to play mcs;-_-;
this.onEnterFrame = function() {
for (i=0; i<150; i++) {
if(this["ball"+[i]].hitTest(this["ball"+[i]])&&(this["ball"+[i]]._currentframe == 7)) {
trace(this["ball"+[i]]);
}
}
};
and whatever ball is hit when another ball is exploding(animation caused by clicking ball, it traces the balls name, but when i try to say
code:
this["ball"+[i]].play();
//instead of
trace(this["ball"+[i]]);
I get no results, any suggestions??
If-Else To Trigger Graphic?
Flash MX.
I'm attempting to develop a simulated quizzing program wherein the user chooses from three T/F and multiple choices located on one frame, and the "answer" (the user selection) triggers a correct graphic or incorrect graphic (movie loop) on a target frame. The code on the selection frame (using groups of radio buttons) looks like:
code:
question1Group.setSize(100);
question2Group.setSize(300);
question3Group.setSize(300);
function onSubmit() {
formData = new LoadVars();
formData.q1 = "";
formData.q2 = "";
formData.q3 = "";
formData.q1 = question1Group.getValue();
formData.q2 = question2Group.getValue();
formData.q3 = question3Group.getValue();
gotoAndStop(45);
showstate = "";
}
function showanswer1(option) {
Q1A = ""+formData.q1;
}
function showanswer2(option) {
Q1B = ""+formData.q2;
}
function showanswer3(option) {
Q1C = ""+formData.q3;
}
The target frame includes three dynamic text fields with the following code:
code:
if (op1.getState() == true) {
showanswer1();
} else if (op2.getState() == true) {
showanswer1();
} else {
showanswer1();
}
if (questiona.getState() == true) {
showanswer2();
} else if (questionb.getState() == true) {
showanswer2();
} else {
showanswer2();
}
if (questiond.getState() == true) {
showanswer3();
} else if (questione.getState() == true) {
showanswer3();
} else {
showanswer3();
}
stop();
**This all works fine. No problems up to this point.**
Now, I also want to insert three, two-frame movie loops (one frame is a "Correct" graphic and the second is an "incorrect" graphic with Stop( ) on each frame) on this target frame. I then attempt to attach an If-Else action statement to the movie loop in order to control which frame is displayed when a certain radio option is selected. However, I cannot get it to work. Here is the actionscript I'm attempting to use on the movie loop:
code:
onClipEvent (enterFrame) {
if (Q1A == "False") {
gotoAndStop(1);
} else {
gotoAndStop(2);
}
}
This is applied as an action to the movie itself. In this example, "Q1A" is the variable name used on the dynamic text input box that *should* trigger the graphic to 'correct' or 'incorrect'. (The user does not type anything, but simply makes a radio selection that is passed to the target frame.)
Now the problem: Basically, this If-Else is being ignored. The script sort-of executes, but skips directly to the "else" and ignores the "if". If "2" is coded in the Else, the quiz shows "incorrect"; if "1" is coded in the Else, the quiz shows "correct". Obviously, there is something wrong in the logic of my If-Else statement. I'm attempting to trigger the graphic by matching it against the variable displayed inside the dynamic text box. (There are three dynamic text boxes --> one for each answer --> and one movie loop for each answer.) I've spent hours on this and tried everything I can think of...
What am I doing wrong? I have no other programming support and limited programming skills, so I'm searching for support...
Advanced thanks..
RG
EDIT: Added [ as ] tags around your code for readability. See posting guidelines. - jbum
Easy Way To Trigger MC Twice In A Row?
i'm looking for an easy way to trigger a movie clip to play again after it finishes. i only need to do it once, so playing 2x in a row won't be a regular occurrence in the movie. thanks.
HitTest Trigger
Hi
Any ideas?
I basically want to trigger an event once both mc's are in same the target area.
I am trying to do a comparison but cant get it going as I haven't done a lot of scripting.
Please let me what I'm doing wrong, particularly the comparison area as the drag is working fine.
Thanks in advance
ceezee
here's the code
===========
//drag, check and snap MC to position
letterP.onPress = function():Void{
this.startDrag();
}
letterP.onRelease = function():Void{
this.stopDrag();
var pIsIn:Boolean = this.hitTest(mpTarget);
if (pIsIn)
{
this._x = 2;
this._y = -20;
}
}
letterM.onPress = function():Void{
this.startDrag();
}
letterM.onRelease = function():Void{
this.stopDrag();
var mIsIn:Boolean = this.hitTest(mpTarget);
if (mIsIn)
{
this._x = -22;
this._y = -20;
}
}
//compare and trigger event
if ((mIsIn) && (pIsIn))
{
trace("they are both in the target area");
}
Conditional Trigger
Trying to change the position fi a cli based on the Current Frame number.
At stsrtup, the clip jumps to x 300 and does not change even after passing frame 100;
How do I create an event the move a clip based o current frame number?
Thanks
onEnterFrame=fduration;
function fduration(){
value1=_root.empty_mc._currentframe;//tarcks frame
}if(value1>=300){
_root.empty_mc.stop();
_root.empty_mc.gotoAndStop(440);
this._x=100;
}else{
if(value1<=99){
this._x=300;
}
}
Auto-trigger?
I'm loading in some audio tracks with just a simple loadMovie (into a blank clip). Is it possible to have a command that says when the loaded clip is finished to goto a new frame? I know I can make the external audio clip "stream" and bump out all the frames for the entire song length and add actions in there -- but that seems inefficient and inexact. Any ideas? I'm using MX.
Trigger Javascript
I have created a movie clip that, upon completion, I want to shake the browser window using the following javascript that I've embedded in my HTML ...
function shake_xy(n) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,i);
self.moveBy(i,0);
self.moveBy(0,-i);
self.moveBy(-i,0);
}
}
}
}
function shake_x(n) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(i,0);
self.moveBy(-i,0);
}
}
}
}
function shake_y(n) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,i);
self.moveBy(0,-i);
}
}
}
}
//-->
What would I write in my actionscript to make this happen? I've tried getURL("javascript:shake_xy(10)"), but that didn't work.
Thanks in advance -
Area Trigger
hi,
is it possible to integrate sound(mp3)-triggering with this code? (that is, to link it to an area)
if (mousex >= 2015.8 && mousex <= 2309.8 && mousey >= 2392.1 && mousey <= 2651.1) {
_global.fade_meta = 1;
} else {
_global.fade_meta = 0;
}
best,
florian
[F8]button In Mc To Trigger Another Mc
I have sliding thumbnail images in a mc. Each thumbnail is also a button within the mc. (on the first image is a button for now until I have this figured out.)
You can see it at www.freewebs.com/alexandra4JC
You can pause and play the sliding images but I can't figure out the code so that when you click on the small version of the slideshow, a larger image appears.
I tried making the larger image invisible and then found a code online to apply to the frame of the button to make it trigger the larger image to be visible but nothing happens. This is the code I found:
onRelease = function () {
//check if its visible
if (mcowen._visible == false) {
mcowen._visible = true; }
else {
//otherwise make them invisible
mcowen._visible = false;
}
}
I want to be able to do this will all the thumbnails but if I try to do something simpler like causing the button to play a certain frame it then stops the whole slide show.
Thanks and please tell me if you need more info. As you can see in the subject, I'm using flash 8.
Alex
PS The file is too large for me to attach it.
[CS3] Trigger Several Functions
Hi.
This is really basic, I guess, but I need help.
I want like to create a button which will perform three or four functions one after the other.
I don't know the syntax.
Do I have to build and write the functions first?
How do I call them from the button.onRelease?
Thanks in advance
Trigger At The End Of Movie
The following example will load a playlist from XML file and starts to play the first movie file:
ActionScript Code:
=================================
//create an XML object and a new array
var xmlMovies:XML = new XML();
var aMovies:Array = new Array();
var indexNumber:Number = 0;
var numberOfItems:Number;
var currentMovie:String;
//set up the xml loading test
xmlMovies.ignoreWhite = true;
xmlMovies.onLoad = function(success) {
if (success) {
aMovies = xmlMovies.firstChild.childNodes;
numberOfItems = aMovies.length;
currentMovie = aMovies[0].attributes.movieURL;
loadMovieNum(currentMovie, 10);
} else {
trace("XML loading error!");
}
};
//load data into the xml object
xmlMovies.load("movieList.xml");
=================================
However, when the first movie reached the end frame, it stopped. How to make it go to the next movie in the playlist and begin play?
I have been searching on "playlist"+"auto play" for a few days but no luck.
Thank you.
Dynamic Trigger
hello, i have a problem with my website that is not allowing me to finnish it, and it is vital that i get this part fixed so any help would be greatly appreciated. my problem is that i have a menu with 5 buttons on the main timeline, when i click any of the buttons, the main timeline plays, animating the menu to the side, then at the end of the animation, a movieholder loads a movie, the problem is i need the movie to be a different movie depending on the button that was originally pressed. ie: press the gallery button, movie plays 20 frames, then loads "gallery.swf" externally. how would i assign a "trigger to each button that the movieholder would look at to see which movie to load?
Trigger Javascript
I have created a movie clip that, upon completion, I want to shake the browser window using the following javascript that I've embedded in my HTML ...
function shake_xy(n) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,i);
self.moveBy(i,0);
self.moveBy(0,-i);
self.moveBy(-i,0);
}
}
}
}
function shake_x(n) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(i,0);
self.moveBy(-i,0);
}
}
}
}
function shake_y(n) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,i);
self.moveBy(0,-i);
}
}
}
}
//-->
What would I write in my actionscript to make this happen? I've tried getURL("javascript:shake_x(10)"), but that didn't work.
Thanks in advance -
How To Trigger An Event?
Hey everyone,
I have a button that, when rolled over, performs a variety of actions. However, what I want to do, is have all the action execute except the last one. The last one I want to execute after the rest have completed.
Code:
btn.onRollOver = function(){
_root.tab01.dep = _root.tab01.getDepth();
_root.tab01.swapDepths(_root.tab01.getNextHighestDepth());
_global.startMove.call(tabBtm, 12, -18, 142, 85)
_global.startMove.call(tabTop, 12, -193, 142, 211.8)
_global.startMove.call(dropShadow, 0, -19, 142, 26)
_global.startMove.call(image, 12, -18, 142, 85)
_global.startMove.call(tabText, 12, -190, null, null)
//The item below should execute after 'tabText' y pos is -190
_global.startMove.call(description,12,-140,null,null)
}
In the above script I am calling a function that moves individual items in my app. What I am looking to accomplish is after 'tabText' _y is -190, execute the _global.startMove.call(description.... code.
Any ideas how to do this? Use a listener?
Thanks
Cuepoint Trigger
Hi there
I have encoded an FLV with 3 cuepoints and have used the New NetConnection method.
Now I need to have 3 seperate text movieclips triggered at certain cuepoints. (subtitles for the deaf)
The following code didn't work.
var vidList:Object = new Object();
vidList.cuePoint = function(cues) {
subtitle1.gotoAndPlay(2);
}
vid.addEventListener("cuePoint", vidList);
I am new to AS2 and would appreciate some help
Justin
How To Trigger A Function
Hi,
How can I trigger a function when something either started or ended using actionscript 3.0, similar to the parameters use in TweenLite (onComplete - onStart)?
Could someone be so kind and show me how to do this or tell me where to find information about it.
Thanks,
fs_tigre
Trigger OnPress()?
OK, I have a xml menu that has an onPress() within it. I also have a variable getting sent into the swf that gives the current pageID via a Request.Querystring.
This menu is a 2 level deep sort of thing, so some parent menu items contain children. I want to be able to trigger my onPress() with code rather than having to actually press the parent item again if the pageID is a parent with children.... hope that makes sense.
The onPress basically contains everything BUT the getURL(), so it expands the menu onPress.
Is there a way for me to say::
Code:
IF ( pageID is a parent with children) then
getURL(pageurl, '_self')
else if(PageID is a child then don't getURL on its parent)
//so just expand the parent.. don't go there
parent.onPress()
Hope that makes some sort of sense....?!
Thanks All!
Trigger MovieClip
Hi.
I'm currently creating something in Flash.
Basically, this is what I have:
Code:
on (release) {
set(link, 1);
gotoAndStop(10);
this.gotoAndPlay("logo_main");
}
I have a colapsing/expanding menu. When I click menu, it slides out, and when I click it again it slides back in. Also, when I click any button in the menu list, it will slide back in (the above script is what is on each button in the menu). The set(link, 1); line refers to its relating scene/frame within a script on the last frame of another movie clip.
Code:
if (link==1) {
_root.gotoandplay ("_oneway","f1")
}
else if (link==2) {
_root.gotoandplay ("_oneway","owm_f2")
}
else if (link==3) {
_root.gotoandplay ("_oneway","owm_f3")
}
else if (link==4) {
_root.gotoandplay ("_oneway","owm_f4")
}
else if (link==5) {
_root.gotoandplay ("_oneway","owm_f5")
}
else if (link==6) {
_root.gotoandplay ("_oneway","owm_f6")
}
else if (link==7) {
_root.gotoandplay ("_nmt","f1_nmt")
}
else if (link==8) {
_root.gotoandplay ("_nmt","f2_cre")
}
stop();
I wish for a movieclip to be triggered (called logo_main), and then for the set(link, 1); line to refer to the last frame within the movieclip that has been triggered, and re-direct the user to the relevent scene/frame.
My problem is that I don't know how to get it to refer to a script in a movieclip other than the one it is contained in.
I'm new to Flash/ActionScript, so have tried to guess the coding. The moveclip isn't being triggered either.
I hope I'm explaining my situation right.
Could anyone help me out?
Thanks!
onlyone-jc
Cue Point Trigger
I have actionscript below that works perfectly to trigger cue points in the order they fall...
BUT...., for the life of me I can't figure out how to make it trigger from a specific cue point name. I have EVENT cue point named SPRING. I need that to trigger the timeline to go to and stop on frame 20.
ANY HELP is greatly appreciated. I have researched this and worked on it for two days now.
playback_media.contentPath = "rtmp://flash20.audiovideoweb.com/ca70fls25122/_definst_/Bouquet_400.flv";
var playback_mediaList:Object = new Object();
var playback_mediaList:Object = new Object();
playback_media.cuePoint = function(cues) {
gotoAndStop(20);
};
playback_media.addEventListener("cuepoint",playback_mediaList);TextBUTBut
Cue Point Trigger
I have actionscript below that works perfectly to trigger cue points in the order they fall...
BUT...., for the life of me I can't figure out how to make it trigger from a specific cue point name. I have EVENT cue point named SPRING. I need that to trigger the timeline to go to and stop on frame 20.
ANY HELP is greatly appreciated. I have researched this and worked on it for two days now.
playback_media.contentPath = "rtmp://flash20.audiovideoweb.com/ca70fls25122/_definst_/Bouquet_400.flv";
var playback_mediaList:Object = new Object();
var playback_mediaList:Object = new Object();
playback_media.cuePoint = function(cues) {
gotoAndStop(20);
};
playback_media.addEventListener("cuepoint",playback_mediaList);
Can't Trigger Function
Follow me if you can.
I have a shell .swf. Inside of that shell I have a frame script that inits a function:
function callPop(who){
trace("you called "+who);
}
The shell loads a few MC's. Inside one o the movie clips I am trying to call the function. But it is not working. I have a button with the following script:
on (release)
{
_root.callPop("Root call pops");
this.callPop("this popUp");
_parent.callPop("parent the call pop");
callPop("just call pop");
this._parent.callPop("this parent call pop");
trace("You did push a button");
}
As you can guess, the simple trace of "You did push a button shows. None of the others seem to fire off the function. When I debug - There is a variable called callPop, but it has no value when I click.
I am trying to make a popup window, one that will close when other menu items are opened.
I think the problem is the path, buyt I tried every option. It appears as such in debugger. I know this is hard to debug remotely - but is there a rule against calling fucntions in other swf's?
Any thoughts?
V
Edited: 08/19/2008 at 04:20:00 PM by vin-E
How To Trigger An Event Once?
I want to be able to trigger an event only once with a self terminated collision detection, such as
if (score >= 50){ money = +1};
but I keep getting stuck in the loop of "money = +1,2,3..." because it's loaded inside an on enter Frame.
I also run into this problem with if (x = y){money = +1}.
I sort of got around it by stating if (x = y && hitTest(object)) but when the numbers are variable (such as points) the money bonus ends up being variable as well.
For example, if I have 50 score points etc., then if I have an if = 50; scores in multiple of three would go straight from 48 to 51, skipping the 50,
and if I have a if >= 50; multiples of 1,2, and 5 would land on 50 precisely, but values such as 3,4,6,7 and so forth would show up at 51, 52, and 54. This has the peculiar effect of changing the number of times it scores the bonus.
Help With Wii Button Trigger
I'm fairly new to action script and struggling to get a wiimote to trigger a flash scene.
Need the scene to be triggered by the IR and B button together.
I currently have this piece of script which triggers the scene but only through the IR.
{
if (bButtonPressed)(myWiimote.ir.x1 >=0.1);
gotoAndStop(10);
}
Can anyone help me please.
Cheers
Tom
Trigger Button
How do you trigger the actions associated with a button
take for example a button called "buttonGo" that you have specific code in. When you click button b you also want buttonGo to execute its code.
I saw this done before and know it's possible... I just need some clarity as to the process.
Thanks,
Joshua
Trigger For Movement
I have a clip (1) and I am using the following code to move it
onClipEvent(enterFrame) {
speed = 5;
this._x += speed;
}
Is it possible to use another clip to trigger the movement of clip 1?
thanks
georgia
OnRollOver To Trigger Only Once?
Hi!
I'm a newbie to Flash and AS and I have tried Google and these forums for answer but I still haven't grasped it.
Here goes: I'm loading a button in an onRollOver event. It's a link with an extra option. The thing is I only want it to load only once and stay put and not repeat every time the mouse rolls over (again). I have tried with different conditions but it doesn't work. I want it to happen in ONE frame only. Any ideas greatly appreciated. One of my failed tries below:
var rolledOver:Boolean = false;
my_btn.onRollOver = function() {
if (!rolledOver) {
frame.attachMovie("btn_link1", "test", this.getNextHighestDepth);
var rolledOver:Boolean = true;
}
Thanx in advance.
/Chorug
Trigger An Activity On A Different Sfw
i am creating a presentation that involves loading different swf's above another swf by using levels. [ loadMovieNum(url, level); ]
my problem is, i successfully loaded a new sfw to the top of my main swf and on the process of loading the new swf, i intentionally hide a movie clip in my main swf. during the unloading of the loaded movie clip, i want to make the hidden movie clip on my main swf reappear... obviously i don't know how...
i've tried this code within a button on the loaded swf:
Code:
on(press){
_parent.ActiveSearch.kahon._visible = true;
}
on(release){
unloadMovie(this);
}
can you help me on this one? thanks in advance!
Btn Inside Mc To Trigger Second Mc Without
I need several buttons to be within the one mc, having an action (zoom + scale) apply to all of them together. But each button should trigger a second mc that is not within the first mc. (because the second mc should be scaled and zoomed along with the first mc.)
So: button placed within mc. What action script to assign to the button to trigger an event not within the mc. ??!!
Does that make sense?
thanks. thanks. thanks.
Trigger Event
Hey,
I have a list component, what I wish to do is when you hover on a cell, it then grabs that row index (which I can do), and then it looks at another list component to fire the roll over event.
How can I do that in AS3?
I read on on event dispatching, but still am no where closer to my goal.
Thanks
Here is my method...
PHP Code:
private function fire_event(event:ListEvent):void { mylist.getItemAt(event.rowIndex).dispatchEvent(new ListEvent(ListEvent.ITEM_ROLL_OVER));}
I just get an error...
"dispatchEvent is not a function"
How To Trigger A Function
Hi,
How can I trigger a function when something either started or ended using actionscript 3.0, similar to the parameters use in TweenLite (onComplete - onStart)?
Could someone be so kind and show me how to do this or tell me where to find information about it.
Thanks,
fs_tigre
Trigger Button
How do you trigger the actions associated with a button
take for example a button called "buttonGo" that you have specific code in. When you click button b you also want buttonGo to execute its code.
I saw this done before and know it's possible... I just need some clarity as to the process.
Thanks,
Joshua
|