Scroll panel action script problem

Hi, I have the following action script:
and its giving me the following errors:
Location: Scene 1, Layer 'action', Frame 1, Line 11
Description: 1120: Access of undefined prperty _xmouse,
Source: if(_xmouse<b.xMin || _xmouse>b.xMax || _ymouse
<b.yMin || _ymouse>b.yMax) {
Location: Scene 1, Layer 'action', Frame 1, Line 11
Description: 1120: Access of undefined prperty _xmouse,
Source: if(_xmouse<b.xMin || _xmouse>b.xMax || _ymouse
<b.yMin || _ymouse>b.yMax) {
Location: Scene 1, Layer 'action', Frame 1, Line 11
Description: 1120: Access of undefined prperty _ymouse,
Source: if(_xmouse<b.xMin || _xmouse>b.xMax || _ymouse
<b.yMin || _ymouse>b.yMax) {
Location: Scene 1, Layer 'action', Frame 1, Line 11
Description: 1120: Access of undefined prperty _ymouse,
Source: if(_xmouse<b.xMin || _xmouse>b.xMax || _ymouse
<b.yMin || _ymouse>b.yMax) {
Location: Scene 1, Layer 'action', Frame 1, Line 24
Description: 1120: Access of undefined prperty _xmouse,
Source: var xdist = _xmouse - 185;
Location: Scene 1, Layer 'action', Frame 1, Line 8
Description: 1120: Access of undefined prperty _root,
Source: var b = stroke.getBounds(_root);
Location: Scene 1, Layer 'action', Frame 1, Line 11
Description: 1120: Access of undefined prperty _ymouse,
Source: if(_xmouse<b.xMin || _xmouse>b.xMax || _ymouse
<b.yMin || _ymouse>b.yMax) {
HERE IS MY ACTION SCRIPT
HERE IS MY FILE
flash5.fla
I used the following tutorial
http://www.gotoandlearn.com/
Scrolling Thumbnail Panel.
Please help as to what I should do to fix it please.

I can't be certain, because I don't have Flash CS3 on my
computer, but it reads as though your publish settings are set to
the wrong version of Actionscript. The code you have attached is
Actionscript 2, and those errors sound like something that would be
spit out if you are trying to publish to Actionscript 3. Check your
publish settings, and change to AS2. If you are already on AS2,
reply, and will look into further.
Hope this helps.

Similar Messages

  • Action Script problem with scrolling images

    doing a tutorial and got to the stage of action scripting mouse control for scrolling images.
    checked the script in Actions. And said it was ok...No errors found.
    Tested the movie and there were 2 compiler errors reported.
    Scene 1. layer 'action script', Frame 1, line 1: 1120:Access of undefined property _root. _root.onEnterFrame=funtion(){
    Scene 1. layer 'action script', Frame 1, line 2: 1120:Access of undefined property _root. _if(_root._xmouse<50){
    Scene 1. layer 'action script', Frame 1, line 1: Warning: 1058: Migration issue: The property _root.onEnterFrame=funtion(){
    Can anyone help me understand this.
    thanks

    It sounds like you are mixing up AS2 code with AS3 compiling.  You may need to change you publish settings to AS2.

  • Scroll bar actions script issue

    I am having a problem with the action script for a scroll bar
    the code is complex and I did not write it but have managed to make
    other adjustments to get it to work...think we got the wrong raw
    file to work from because the scroll bar works in the file on the
    seller's server. Can't find the programmer now. If someone could
    please tell me what I am missing. The scroll bar works if you use
    the solid scroller in the middle but does not move the information
    and the arrows do not work at all. You can check this out at
    http://74.53.228.34/~jacob753/vocab/
    Just click on crossword and then load a topic and you will
    see that the scroll bar does not work at all. The floating window
    is another issue and I will put this in another message after this
    is fixed.
    The code is below:
    initClueListScroll = function(y){
    // y : hauteur de la cluelist (height of the cluelist)
    _global.clueListHeight = y
    _global.clueListScroll = true
    var c = clScrollClip
    c._x = Math.floor(cluelistClip._x+cluelistClip._width)
    c.scrollBG._height = gridSize*cellSize-40
    c.scrdownClip._y = c.scrollBG._y+c.scrollBG._height
    c.scroller._height =
    c.scrollBG._height*(gridSize*cellSize/y)
    // ---- on définit les actions (action definitions)
    c.scrdownClip.onRollOver = c.scrupClip.onRollOver =
    function(){
    this.gotoAndPlay(2)
    c.scrdownClip.onRollOut = c.scrupClip.onRollOut =
    function(){
    this.gotoAndStop(1)
    c.scrdownClip.onReleaseOutside = c.scrdownClip.onRelease =
    function(){
    this.gotoAndStop(1)
    var c = getMain().clScrollClip
    c.scrollBG.onRelease()
    c.scrupClip.onReleaseOutside = c.scrdownClip.onRelease =
    function(){
    this.gotoAndStop(1)
    var c = getMain().clScrollClip
    c.scrollBG.onRelease()
    c.scroller.onRollOver = function(){
    this.gotoAndStop(2)
    c.scroller.onRollOut = function(){
    this.gotoAndStop(1)
    c.scroller.onPress = function(){
    this.gotoAndStop(2)
    var c = getMain().clScrollClip
    var yMin = c.scrollBG._y
    var yMax =
    c.scrollBG._y+Math.floor(c.scrollBG._height-c.scroller._height)
    this.startDrag(false,0,yMin,0,yMax)
    getMain().onMouseMove = function(){
    var c = getMain().clScrollClip
    var yDes = c.scroller._y-20
    var yMax = Math.floor(c.scrollBG._height-c.scroller._height)
    var yFin = 20+Math.min(yDes,yMax)
    c.scroller.setGoTo(c.scroller._x,yFin,100,c.scroller._yscale,100,0,4)
    var yDiff =
    (yFin-c.scrollBG._y)*(gridSize*cellSize/c.scrollBG._height)
    if(yFin==yMax+20){
    var ymn = 0
    var ymx = clueListHeight-(gridSize*cellSize)
    yDiff = (ymx - ymn)*(yFin/(yMax+20))
    // pX, pY, pW, pH, pA, pR, pSpeed
    var cl = getMain().cluelistClip.contClip
    cl.setGoTo(cl._x,-yDiff+gridPosition.y,100,100,100,0,4)
    c.scroller.onRelease = c.scroller.onReleaseOutside =
    function(){
    stopDrag()
    this.gotoAndStop(1)
    delete getMain().onMouseMove
    c.scrollBG.onRelease = function(){
    var c = getMain().clScrollClip
    var yDes = c._ymouse-20<c.scroller._height ? 0 :
    c._ymouse-20
    var yMax = Math.floor(c.scrollBG._height-c.scroller._height)
    var yFin = 20+Math.min(yDes,yMax)
    c.scroller.setGoTo(c.scroller._x,yFin,100,c.scroller._yscale,100,0,4)
    var yDiff =
    (yFin-c.scrollBG._y)*(gridSize*cellSize/c.scrollBG._height)
    if(yFin==yMax+20){
    var ymn = 0
    var ymx = clueListHeight-(gridSize*cellSize)
    yDiff = (ymx - ymn)*(yFin/(yMax+20))
    // pX, pY, pW, pH, pA, pR, pSpeed
    var cl = getMain().cluelistClip.contClip
    cl.setGoTo(cl._x,-yDiff+gridPosition.y,100,100,100,0,4)
    c.scrollBG.onReleaseOutside = c.scrollBG.onRelease

    Try it in a simple test case.  I don't think that is default behavior.

  • Action script problem for audio player

    i have made a introduction with a  audio and controller. I am facing one problem. I will like to play as  soon as some one enter the page but it does not.
    My action script is pasted below and kindly advise me for any changes that can be done
    var soundReq:URLRequest = new URLRequest("Sonu Nigam_Alka Yagnik - Suraj Hua M.mp3");
    var sound:Sound = new Sound();
    var soundControl:SoundChannel = new SoundChannel();
    var volumeControl:SoundTransform = new SoundTransform();
    var resumeTime:Number = 0;
    sound.load(soundReq); sound.addEventListener(Event.COMPLETE, onComplete);
    up_btn.addEventListener(MouseEvent.CLICK, increaseVolume);
    down_btn.addEventListener(MouseEvent.CLICK, decreaseVolume);
    function onComplete(event:Event):void
    play_btn.addEventListener(MouseEvent.CLICK, playSound);
    stop_btn.addEventListener(MouseEvent.CLICK, stopSound);
    function playSound(event:MouseEvent):void
    { soundControl = sound.play(resumeTime);
    pause_btn.visible = true;
    pause_btn.addEventListener(MouseEvent.CLICK, pauseSound);
    play_btn.visible = false; play_btn.removeEventListener(MouseEvent.CLICK, playSound);
    function pauseSound(event:MouseEvent):void {
    resumeTime = soundControl.position;
    soundControl.stop();
    play_btn.visible = true;
    play_btn.addEventListener(MouseEvent.CLICK, playSound);
    pause_btn.visible = false;
    pause_btn.removeEventListener(MouseEvent.CLICK, pauseSound);
    function stopSound(event:MouseEvent):void {
    soundControl.stop();
    play_btn.visible = true;
    play_btn.addEventListener(MouseEvent.CLICK, playSound);
    pause_btn.visible = false; pause_btn.removeEventListener(MouseEvent.CLICK, pauseSound);
    function increaseVolume(event:MouseEvent):void {
    volumeControl.volume += .5;
    soundControl.soundTransform = volumeControl;
    function decreaseVolume(event:MouseEvent):void {
    volumeControl.volume -= .5;
    soundControl.soundTransform = volumeControl;
    pause_btn.visible = false;

    i am having big problem with the coding below with the sound. As it we enter the site, the music auto start very loud which is not good at all for the ear drums. How do i adjust that?
    www.hitenkajal.co.uk
    var soundReq:URLRequest = new URLRequest("10 Kabhi Alvida Naa Kehna_0.mp3");
    var sound:Sound = new Sound();
    var soundControl:SoundChannel = new SoundChannel();
    var volumeControl:SoundTransform = new SoundTransform();
    var resumeTime:Number = 0;
    sound.load(soundReq);
    sound.addEventListener(Event.COMPLETE, onComplete);
    up_btn.addEventListener(MouseEvent.CLICK, increaseVolume);
    down_btn.addEventListener(MouseEvent.CLICK, decreaseVolume);
    function onComplete(event:Event):void
    play_btn.addEventListener(MouseEvent.CLICK, playSound);
    stop_btn.addEventListener(MouseEvent.CLICK, stopSound);
    function playSound(event:MouseEvent):void
    soundControl = sound.play(resumeTime);
    pause_btn.visible = true;
    pause_btn.addEventListener(MouseEvent.CLICK, pauseSound);
    play_btn.visible = false;
    play_btn.removeEventListener(MouseEvent.CLICK, playSound);
    function pauseSound(event:MouseEvent):void
    resumeTime = soundControl.position;
    soundControl.stop();
    play_btn.visible = true;
    play_btn.addEventListener(MouseEvent.CLICK, playSound);
    pause_btn.visible = false;
    pause_btn.removeEventListener(MouseEvent.CLICK, pauseSound);
    function stopSound(event:MouseEvent):void
    soundControl.stop();
    play_btn.visible = true;
    play_btn.addEventListener(MouseEvent.CLICK, playSound);
    pause_btn.visible = false;
    pause_btn.removeEventListener(MouseEvent.CLICK, pauseSound);
    function increaseVolume(event:MouseEvent):void
    volumeControl.volume = 1;
    soundControl.soundTransform = volumeControl;
    function decreaseVolume(event:MouseEvent):void
    volumeControl.volume = 0.1;
    soundControl.soundTransform = volumeControl;
    pause_btn.visible = false;
    playSound(null);

  • Tower Defense Action Script Problem

    Hi, I've been working my way through a tutorial to create a tower defense game. I've ran into a slight problem with a bit of code:
    package{
              imporProxy-Connection: keep-alive
              Cache-Control: max-age=0
    I get an Identifier 1078 error, I was hoping that someone might be able to tell me a little more about what this is doing, and
    if anyone knows of a solution. Any help would be greatly appreciated!
    Here is the link for the tutorial
    http://www.flashgametuts.com/tutorials/as3/how-to-create-a-tower-defense-game-in-as3-part- 2/

    Remove the 2 lines. They're not AS.
    imporProxy-Connection: keep-alive
    Cache-Control: max-age=0

  • Action script problem

    I have an .as file with this code within it
    so when the send_pb button is pushed then onSendMessage
    causes the message to be sent.....I'd like the enter key on the
    keyboard to do the same thing. I tried various ways to do it within
    the .as file but nothing seems to work.

    Hi,
    Just try to add the listener Object for the KeyBoard
    And in the KeyPress Enter, you just check out the Focus,
    if it is in the target movieclip , you just call the same
    function what you have in the button on
    Release......function....

  • Pathing within Action Script Problems

    I have code that uses multiple button functions within different movie clips, here is a sample of the code in the last frame of the last movie clip:
    stop();
    var xmlholderNewsNetwork:URLLoader=new URLLoader(new URLRequest("NewsNetwork.xml"));
    xmlholderNewsNetwork.addEventListener(Event.COMPLETE,onloadNewsNetwork);
    function onloadNewsNetwork(e:Event):void {
        feed.text="";
         var xml:XML=new XML(xmlholderNewsNetwork.data);
         for (var i:Number=0; i<xml.story.length(); i++) {
             feed.appendText(xml.story[i].storyname+"\n"+xml.story[i].body+"\n\n");
    topmenu.home.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandlerHomeNewsNetwork);
    function mouseDownHandlerHomeNewsNetwork(event:MouseEvent){
         Content.ContentHome.gotoAndPlay(17);   
    topmenu.Enlist.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandlerEnlistNewsNetwork);
    function mouseDownHandlerEnlistNewsNetwork(event:MouseEvent){
             navigateToURL(new URLRequest("https://spreadsheets.google.com/viewform?key=psvc5aYhLuFoImejmLioWew&hl=en"));
         topmenu.Roster.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandlerRosterNewsNetwork);
    function mouseDownHandlerRosterNewsNetwork(event:MouseEvent){
             Content.ContentRoster.gotoAndStop(36);   
         topmenu.Forums.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandlerForumsNewsNetwork);
    function mouseDownHandlerForumsNewsNetwork(event:MouseEvent){
          navigateToURL(new URLRequest("http://fifthfleetforums.proboards.com/index.cgi"));
         topmenu.Commendations.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandlerCommenNewsNetwork);
    function mouseDownHandlerCommenNewsNetwork(event:MouseEvent){
         Content.ContentCommendations.gotoAndStop(36);   
             topmenu.Forms.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandlerFormsNewsNetwork);
    function mouseDownHandlerFormsNewsNetwork(event:MouseEvent){
         Content.ContentForms.gotoAndStop(36);   
        ect....
    This code is in Scene1->Content (the instance name)->ContentNewsNetworkd(the instance name, it is a movie clip)
    The path, as I think of it is, Scene1.Content.ContentNewsNetwork.  However I am getting errors saying that:
    1120: Access of undefined property Content.
    and
    1120: Access of undefined property topmenu.
    The buttons are contanted in Scene1->topmenu (instance name)-> then each button, is its own button.
    Can someone help me, and if you are confused please tell me and I will try to explain better.
    Thanks
    Faedother

    I'll whittle it down to one of each...
    root - Content - ContentNewsNetwork <code is in this timeline>
    root - Content - ContentHome
    roott- topmenu - home
    The least mind boggling way to command the ContentHome and home timelines/contents would be to use a root reference...
    MovieClip(this.root).Content.ContentHome.gotoAndPlay(...
    MovieClip(this.root).topmenu.home.alpha = ....
    The next approach could be a little more relative to the current location...
    MovieClip(this.parent).ContentHome.gotoAndStop(...
    MovieClip(this.parent.parent).topmenu.home.visible = ....
    And the more mind boggling/time consuming/oo-politically correct way would be to add event dispatchers and listeners so that you in no way utilize root or parent references in your code.  I'll spare you that one, but if you are interested, here's a link to learn a little more about it:  http://forums.adobe.com/thread/470135?tstart=120

  • Maths Problem in Action Script 2.0

    Hi surfers,
    We have a problem in Action Script 2.0 to solve the maths equation given below:
    write a code in Action Script 2.0 to solve these two equation.
    Aim: To know the value of "a" in both different equations.
    1. 2a + 5 = 3a + 1
    2. 4a + 3 = 11
    Thanks in Advance.
    Pls give me ASAP, i'm struggle here.

    Hello, you are at the wrong forum. for AS 2.o questions, hop on there: http://forums.adobe.com/community/flash/flash_actionscript
    BTY, people answer when they can, not when you want...

  • CS3 action script 2.0: compiled clip components do not appear in the component panel

    Hi,
    I have a FLA file containing 3 compiled clip components.
    I use a MXP file to copy this file to the components panel,
    this works fine when using Macromedia Flash 8 or Macromedia MX
    2004, but when using CS# the components do not appear in the
    components panel, only if a use regular component or SWC component
    it appears in the panel, any reason why?any ideas?
    Thanks
    Maya

    I can use this code from html. I'm able to say where the swf
    and xml file are. I just don't know how to do this using action
    script.
    <object
    classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
    http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
    width="768" height="576" id="tech" align="middle">
    <param name="movie"
    value="slideshow.swf?xml_path=musicbox_slideshow/slideshow.xml"
    />
    <param name="quality" value="high" />
    <embed
    src="slideshow.swf?xml_path=musicbox_slideshow/slideshow.xml"
    quality="high" width="768" height="576" name="tech" align="middle"
    allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
    pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    />
    </object>.

  • CS4 Action Script display problems

    I've just used Flash CS4 for the first time after using CS3 for some time.  When using the Action Script window to write code I had the strangest problem.  When writing or pasting code in the AS window the last couple of letters or characters get cut off.  I checked my preferences and they were they same as they were in CS3 (just to be sure).  Both CS3 & CS4 both have the Monaco font as the default.  I solved the problem by changing the fint to Arial.  Now the AS displays properly.
    Wondered if anyone has seen this happen and if they knew if it was a bug or something?
    I'm using CS4 with a newer MacBook Pro and sing AS2 in this project.
    Thanks so much!
    BC

    first button is called Enter and it is btn1 in the libary, i would like that to navigate to scene 2 frame 1. this was a graphics and i converted it to a button have also tried making it a movie clip it still doesn't work. the second button is Autobiogtaphy and it is btn2, i would like that to be navigated to the frame 10 and the frame is called About. I have CS4 and i realised all the stop actions worked when i saved it in CS3 and opedned it back up so since then  i have been using that format. im also using AS3 if that makes any difference.
    So i realised i haven't been much help on details hope this helps

  • Problem with action script from Schewe and Frasier book.

    I am working on a Photoshop CS3 action script to
    open raw files, do a couple of modifications
    in Camera Raw, exit camera raw and save
    the file as a jpeg.
    I think this should work, because I am working
    on an example out of "Camera raw with Adobe
    Photoshop CS3" by Schewe and Frasier which
    shows the step recorded.
    See page 344 of Schewe and Frasier.
    In figure 9-11 you see, after the open
    statement, 10 lines of details like
    "As camera raw"
    "Model:Canon 350d" etc.
    I get the file path and name line, but
    none of the other details reflecting
    actions in Camera Raw.
    The problem is that in setting up the action, none
    of the steps done in camera raw after I do the
    open get recorded.
    And it works in my old CS version !
    Out of frustration I repeated the action
    script creation in my old CS version and
    it worked fine.
    Any idea where I am screwing up ?

    Crappy format justification:
    I sometimes have a day of family
    type pictures that are in raw format
    that I want to put up on the internet
    quickly. I would like to be able to
    apply the "Auto" feature, as in general
    it seems to be pretty good for something
    quick.
    OK, it sorta works in CS, go here
    http://www.angelplace.net/photos/sample.jpg
    It sets up all of the details and gets the
    "As camera raw" but opens the .dng file
    rather than the Camera raw window.
    The point is, these important settings
    seem to be saved, which does not happen
    in CS3.

  • Problem with action script to button

    Hello all.
    I'm having a problem with my adobe flash CS3 action script. My button cant link to the other URL. I tried to put an action script but i fail. anyone can help me? here the attachment for my flash document.

    HELLO,
                  just check       navigateToURL()

  • Problems adding  url link to buttons in action Script 3

    each time I added it link 1 to the button on file i get these error messages-  
    1046: Type was not found or was not a compile-time constant: link1.
    1180: Call to a possibly undefined method link1.
    Warning: 3594: exec is not a recognized method of the dynamic class RegExp. var r:Object = p.exec(s);  
    This is the code I am using:   import flash.net.navigateToURL; import flash.net.URLRequest;  var link_one:link1;  link_one = new link1(); stage.addChild(link_one);  link_one.addEventListener(MouseEvent.CLICK, buttonClickHandler);  function buttonClickHandler(event:MouseEvent):void { var url:String = "http://www.masterpiececorp.com/ARMREF.htm"; var request:URLRequest = new URLRequest(url); navigateToURL(request); }    I have no other problems with link 3 or 4, just link 1  I still cannot get my urls link to movie clips on the flash  
    Can you upload flash here? if not I have a image capture I can use to have you look at my buttons  and action script code. i have been to every forum I know and not any have been helpful at all. This is my last hope.
    Very frustrated newbie  Gina T
    Message was edited by: gtaylor0406

    The way you had your code originally would be correct...
    var link_one:link1;
    link_one = new link1();
    addChild(link_one);
    The 1046 error is indicating it doesn't recognize the link1 class.  So the first thing you need to make sure of is that you have assigned the link1 class designation to whatever symbol that is in the library.

  • Action script with reference to root causing problems in Captivate

    Hi All,
    I just inserted an animation into Captivate and it seems to
    be working as intended; however, i receive a warning stating that
    action script referencing "root" may cause the Captivate project
    not to work properly or at all.
    Has anyone experienced such a problems coming from action
    script reference. It appears to be working fine, so I'd rather not
    touch it if I can get away with it.

    If you run into issues there is a technote on Adobe.com that
    will advise you
    on how to remove or work around using _root references.
    Ideally you would
    never refer to _root at all.
    Steve
    http://twitter.com/Stevehoward999
    Adobe Community Expert: eLearning, Mobile and Devices
    European eLearning Summit - EeLS
    Adobe-sponsored eLearning conference.
    http://www.elearningsummit.eu

  • Action script to loop scrolling text

    hello guys/girls,
    im working on a website
    http://www.tweedmill.co.uk/newA/
    and i`ve used some basic scrolling flash. ( its on the rightside,
    the text is scrolling up )
    i was wondering if you can use action script to create the
    scrolling rather than having to tween it.
    cheers

    for smooth scrolling like your website you would control the
    _y property of a movieclip and yes, that can be done with
    actionscript.

Maybe you are looking for

  • How can I get my Photosmart B8550 to print envelopes from the photo tray?

    I have a Photosmart B8550 printer.  I print a LOT of envelopes for greeting cards through Stamps.com.  I would like to be able to load invitation envelopes in the photo tray so I don't have to keep switching between paper and envelopes.  I tried it a

  • Issue with Lumia 620 Black update

    Hi everyone. Recently I've updated my L620 to Black and the ROM is EU-Spain. When I turn the " Double tap" on for unlocking the screen and put my phone into any of my pockets, the phone strongly hangs and there will be no way to unlock the screen exc

  • How to include a template from a different directory

    Hi, I have a page navigation menu that I placed in a template file.  All the browsing files would then call this template file using cfinclude.  I now want to call this file from a different directory.  However, this causes all the url and image link

  • Error in getting cube from BC (BW 7.0)

    hello. when i try to copy cube from bw content it display error: You attempted to use a 'NULL' object reference (points to 'nothing') access a component (variable: " "). An object reference must point to an object (an instance of a class) before it c

  • SCCM 2012 software distribution not able to distribute content for chrome

    Hi I am using sccm 2012, need some advice, thanks! I tried to deploy chrome exe to a xp pc but the PC software centre shows downloading for very long time, more than a few hours. I created a 64bit chrome for a win7 pc and deployment also not working,