How to play a symbol ONCE at a specific scroll position?

Hello there,
I was wondering if it's possible to trigger a symbol to play when a user scrolls past a specific scroll point just once?
I've managed to create a trigger for a symbol which will fire at a specific scroll position but it fires multiple times (when the user continues to scroll)
I tried using:
'==' eqivalent to, so that it would only trigger at a certain scroll point, but this only triggers the symbol to play if the user uses their mouse scroll wheel and doesn't play if the user uses the window scrollbar.
Here's my code (apologies if it's messy I only started learning JQuery a week ago):
$(window).scroll(function() {
     var mySymbolObject = sym.getSymbol("rollHead");
      var y_scroll_pos = window.pageYOffset;
     var scroll_pos_test = 500;           
    if(y_scroll_pos > scroll_pos_test) {
          sym.$("rollHead").show();
          mySymbolObject.play(1000);
      if(y_scroll_pos < scroll_pos_test) {
   sym.$("rollHead").hide();
          mySymbolObject.stop();
I know that the '.one' handler (if that's the correct term) can cause an event to trigger just once, but I can't seem to get it to work.
Any help or advice would be much appreciated.
Thank you very much.
Jon
P.S. I just want to say a MASSIVE thank you to Adobe for making Edge. It is an incredible tool and the fact that it is free makes it a million times better.

Hello Mr Blix,
I pretty much just copied and pasted what Elaine wrote.
So, I went to my stage actions - clicked 'composition ready'
And put in this:
sym.setVariable("symbolPlayed", false);
var mySymbolObject = sym.getSymbol("rollHead");
$(window).scroll(function() {
    var y_scroll_pos = window.pageYOffset;
    var scroll_pos_test = 500;           
       if(y_scroll_pos > scroll_pos_test) {
var symbolPlayed = sym.getVariable("symbolPlayed");
if (!symbolPlayed) {
    sym.$("rollHead").show();
    mySymbolObject.play(1000);
    sym.setVariable("symbolPlayed", true);
All you'd need to change for you own composition (if that's the right word) is to replace:
var mySymbolObject = sym.getSymbol("rollHead"); - with your own symbol name.
var scroll_pos_test = 500;  - with the position you want the event to trigger.
sym.$("rollHead").show(); - with your own symbol name again.
mySymbolObject.play(1000) - with the time on your symbol's timeline that you want it to play.
I'm still learning JQuery and don't really understand how the 'SymbolPlayed' works, but I assure you it does.
Here's a screengrab of my 'stage actions' code.
Hope that helps!
Jon

Similar Messages

  • How to play a symbol animation from another Edge.html file

    All-
    So I have two Edge files
    home.html
    level1.html
    I'd like an animation to play in home.html once a button is clicked inside of level1.html
    How would I pass the click event to the loaded page?
    Thx,
    `Z

    In AS2 you can use loadmovie to load a .swf into another .swf.
    http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dic tionary423.html
    In AS3, something like this:
    http://www.kirupa.com/forum/showthread.php?t=269964
    Best wishes,
    Adninjastrator

  • Video Question, How to play all at once

    Hey everyone, I have a list of videos i'd like to play one right after the other but i cannot seem to be able to do it. Is there any way to do this? I don't see why there wouldn't be, I probably just can't figure it out. Thanks!

    Get a halfway decent system, something like:

  • How can i change element's properties at specific time position?

    Hi, as the title describes, i want to change 'product_lg' position(left,top,width,height) at time position 'product_show' and 'product' automaticly, how can i do it with js?
    thanks!

    I known your solution, but i need to change it on trigger 'compositionReady' or 'compositionComplete', actually i want to init element's trigger effects at different time position automaticly.
    code as followed can change element's properties at current time, but it can't change element's properties at next coming trigger time:
    sym.$("Ellipse").css({'top':209, 'left':251, 'height':27, 'width':27});
    Thanks!

  • Muvo V100 : how do I play a folder once?

    I've got a Muvo V00?
    I can play a track once, repeat a track, or repeat a folder, but I don't know how to play a folder once. Does anyone know how to do it's Thanks a lot in advance.

    Sure, for example: when I'm going to bed, I like to fall asleep with quiet music in the background (connected mp3 player to small speakerset). One song is too short, but the entire mp3 player would last all night.
    I noticed that other mp3 players I've seen all have this feature.
    Is there any chance your development guys can (and will) make a firmware update?
    I noticed the 'end of service life', yeah But this player isn't even one year and a half old. I surely hope CL still cares about its customers after such a short period?

  • How do I play a symbol timeline from the main timeline

    Ive created a box, turned it into a symbol called box,
    Inside box i have a left to right animation with auto play turned off.
    I then went back to the main stage, clicked the box, added action, on click to play, yet it does nothing.
    How do i Play the symbols timeline?

    On click handler for the symbol use
    sym.getComposition().getStage().getSymbol("nameofsymbol").play();
    or
    sym.getSymbol("nameofsymbol").play();
    replace the italics with the literal name of the symbol as it appears in the Elements panel.
    Some API details found here (http://www.adobe.com/devnet-docs/edgeanimate/api/current/index.html) in the Work With Symbols section.
    Darrell

  • How can I play a symbol nested twice and called from anther symbol in that nest?

    My Question involved playing a symbol inside another. I currently have 2 symbols, dirtytruck2 and splash5, inside another symbol, truck3,  all inside another sybol hole13. I am trying to get it so that when i click on dirty truck the annimation for splash plays. I cannot get this to work.
    Currently I have this onClick for Dirtytruck2 in an attempt to get splash5 to play:
    sym.$("splash5").show();
         sym.$("splash5").play();
         sym.getSymbol("splash5").play();
         sym.getComposition().getStage().getSymbol('hole1_1').getSymbol('truck').getsymbol('splash ').play('start');
         sym.getComposition().getStage().getSymbol('hole1_1').getSymbol('truck').getsymbol('splash ').play();
         sym.getComposition().getStage().getSymbol("hole1_1").getSymbol("truck").$("splash").play( );
    currently, the splash5 symbol reveals itself when I click because of the .show(); but i still cannot get it to play. Autoplay is turned off so the clip does not loop continuously as splash5 is created before it is revealed and shows itself on the click event. Please note I have read  http://forums.adobe.com/message/5142090 about calling symbol basics and have referanced and tried what i learned from the example there target-symbols. I feel my code is written the same - but i cannot get the desired outcome.
    https://drive.google.com/file/d/0BzeleqTUd2NAdTRkcVVVSm5tckU/edit?usp=sharing  is the edge file and assets.
    If anyone can provide assistance, that would be awesome.

    That's what I don't get, I have just tried switching between "generic" symbol names and the specific names when on the stage and I still am not getting any results.
    example:
    sym.getComposition().getStage().getSymbol('hole1_1').getSymbol('truck ').getsymbol('splash').play('start');
    changed to sym.getComposition().getStage().getSymbol('hole13').getSymbol('truck2').getsymbol('splash5 ').play('start');

  • Chrome playing all symbols at once despite "stop" triggers?

    Hi Everyone, I'm working on an animation (Edge Animate CC 2014) where several sets of events are grouped in symbols--each has a "stop" trigger at 0:00 and then a "play" trigger at the appropriate time. This works fine in Firefox & Safari, but Chrome plays ALL symbols simultaneously from the beginning (resulting in a complete mess). Has anyone else had this problem, and are there any solutions short of getting rid of the symbols and pasting their content to the main timeline (resulting in a HUGE and unmanageable action list)?
    Here's the animation: Untitled
    Thanks!

    If you move the Timeline trigger stop just a little rightward, it works. See capture.
    hth
    Darrell

  • Tip: How to play a playlist one song at a time from iTunes on a computer using the checkbox property

    I would like to share a tip about how to play a playlist one song at a time from iTunes on a computer. The tip I am sharing is simple, but I was not able to find it in the iTunes Help. After searching on the internet I found the idea for this solution in a discussion in which this was presented as a frustrating problem rather than a desired behavior. This tip relies on the checkbox for each song in iTunes. For a song in a playlist to play automatically, the checkbox must be checked. To keep a song from playing in a playlist, simply uncheck it. Therefore, to keep all songs from playing automatically in a playlist, simply uncheck them all. Now you have a list of desired songs in a desired order but none of them will play automatically. You can play each one when you want to play it without having to search for the next song and without having to be at the computer to stop the playing after each song.
    Step by step:
    1. Create the playlist.
    2. Uncheck all of the check boxes in the playlist (In iTunes for Windows, ctrl click one of the check marks to uncheck all of the checkboxes at once) 
    3. Now double click (or select and press spacebar) a song to play it. It will stop when finished because there is no other song checked to be played next.
    4. If you want to change back to normal sequential play, ctrl click one of the check marks again to change all of the checkboxes back to the checked status.
    Based on some discussions I found while looking for a solution (including at least one in which the questioner got bashed about why anybody would ever want to do such a thing and in which the proposed solutions were things like creating one song playlists or simply press stop after each song), some may not understand why this would ever be desired.  Here's why I wanted to do it:
    I was responsible for playing a series of songs at a dance. I needed to stop after each song to have a transition time to allow me to introduce the next song and to give new dancers time to get onto the floor and other dancers an opportunity to leave the floor. Furthermore, I was also dancing and didn't want to have to spend time searching for the next song (which is why I wanted to create a playlist in advance with just the songs I wanted to play in the order I wanted to play them) and I wanted each song to stop after playing since I was not at the computer to press stop.
    I hope this will help others who have a similar need.

    Thank you! I put some self help hypnosis tracks to listen to on my iPod. I did not want to go to the next track automatically, I wanted to listen to them individually, one at a time. (If I fell asleep, I did not want to 'wake up' in the middle of a different track.) Your information helps me understand that I need to re-load this playlist onto my iPod from my  Mac computer, only first, I need to UNCHECK the boxes in front of each track so the iPod will STOP each time after playing the selected track. It is too bad that so many functions are not availabvle within the iPod, but that is probably why they can make it so compact.

  • How to save a symbol so I can reuse it . .

    Hi to all! I want to start this discussion with an apology. I apologize if this question has asked many times or several times ago. I am really sorry.
    Now, my problem is that my schedules are tight now, I can't finish a sprite animation for a day. My sprite animations are symboled or SYMBOLS . Now, if I can't finish an animation, I doubt of closing flash, cause it will vanquish all my symbols. . I just want your help to help me determine how to save a symbol, so I can open it nex time I use flash. .
    Once again, I'm sorry, and Thank you!

    If your symbols are in the library then save your file.  Then also do a Save As and save the file under another name but do not close the new file.  Then open the file you had originally and see if your symbols are still there the way you need them to be.  If so, you can be pretty sure they will be there when you open Flash again.  IF not, then you still have the file opened that you Saved As so you can fall back into wondering how to keep the symbols

  • How can you use symbols in Windows 7 on a IMac 27

    How can you use symbols @$€%£¥ in Windows 7 on a IMac 27 mid 2011?  I tried what was normally done on Windows and got nothing.  Alt plus numbers and nothing happens, what am I missing?

    Frosted Flake,
    Are you referring to an equivalent to the Windows Character Map Application (charmap.exe) that allowed you to see the various characters available in each font, and then give you an ALT-nnn number you could key to use the character you wanted ?
    If so you can use the Special Characters from the Edit menu of most applications. Once you have located the character/symbol you want double click it and it will be entered wherever you cursor is located in your application.
    Further information can be found here :
    http://support.apple.com/kb/PH3871
    Hope this helps
    Cheers
    AF

  • How to play album video on iPhone

    I accidently stumbled onto a video of an album I was playig on my iPhone. Once I stopped the album playing, I cannotfigure out how to see the video again. It is an album I bought in iTunes that must have had a video somehow attached to the music. Can anyone tell me how to play the cd so the album video shows up? Somehow I did it from the music app of my iPhone. 
    thanks,
    Tony

    The iPhone works differently because it isn't formatted like a hard drive the way the iPod is (conversely, the iPhone works on both Macs and PCs without the need for reformatting, so there are advantages in this approach).
    If you learn to use smart playlists you'll wonder why you ever synced any other way, even for your iPods. Smart lists can do some amazing things.

  • How to Play animation on Mouseover and Reverse on Mouseout?

    0down votefavorite
    I am trying to create a simple animated navigation bar. I want to mouseover an image and have an animation play, then when you mouseout the animation will play in reverse.
    I can get the animation to play on mouseover, but as soon as I put in the mouseout code it doesn't work. I'm completely new to Edge, so if someone can give me a simple explanation on how to play/reverse an animation on mouseover/out, I would really appreciate it.
    Right now I have an image, converted to a symbol, with another image (nav_on_1) nested inside. The image nested inside is animated with the label "nav_on_1_play".
    My code for mouseover is below:
    sym.$("nav_on_1").show();
    sym.play("nav_on_1_play");

    first I recommend that you use mouseenter and mouseleave instead.
    second: if you have a symbol that has let's say one animation you can do
    on mouse enter
    sym.getSymbol('symbolname').play();
    on mouseleave:
    sym.getSymbol('symbolname').playReverse();
    you may have to add
    sym.getComposition().getStage().getSymbol('symbolname').play();
    sym.getComposition().getStage().getSymbol('symbolname').playReverse();
    or you can put the event in stage/compositionreday
    sym.getSymbol('symbolname').mouseenter(function(){
    sym.getSymbol('symbolname').play();
    sym.getSymbol('symbolname').mouseleave(function(){
    sym.getSymbol('symbolname').play();

  • How to play media form InputStream with jmf or dsj?

    the media format is avi or mp4.
    media receive from socket and put in a ring buffer.now implement InputStream to read datas from buffer and play the data.
    i want to know how to play media from inputStream

    Hi, thanks for replying.
    Im not exacly sure what year the imac is i cant seem to find it anywhere.
    I bought the machine last year on apples refurbished site. Someone at Apple support suggested once that it maybe a 2010 model. In system profiler there is a thunderbolt tab in the left hand pane but it says there are no drivers  loaded. Does that mean that thunderbolt is on the mac but i must install the drivers? If so, is it all plug and play after that or do i need to configure it all manually? If so coyuld you please point me in the right direction for instructions on how to do it. My tv for instance is saying that it cant find a server. As for vlc player, i use it all the time.Dont know what ide do without it !

  • I DONT KNOW HOW TO PLAY THE VIDEO ON MY IPOD

    i dont know how to play the video on my ipod when i select it from the menu the song starts playing but there is no video all there is is a little picture in the top right hand corner can someone help please?

    the videos of course have to be in the correct format that's why an app like ipod itunes will be helpful in making your videos viewable you can even do the encoding yourself i might suggest checking out this helpful guide http://www.macworld.com/article/48480/2005/12/convertvideo.html once your videos have been converted the videos may appear in the Movies part of your itunes desktop hopefull this helps

Maybe you are looking for