Flash button controled by flex issue

In flex I can only reference the flash button by its ID property.
Most of the time I can't know its ID. I need cover it to a super class like MovieClip Instead of that.
I created the button in flash by the following steps:
design button -> cover symbol to flex component -> use it in flex
How can I fix this ?
<mx:Script>
  <![CDATA[
   private function clickHandler(event:MouseEvent):void
      /* not work */
    MovieClip(event.target).gotoAndPlay(MovieClip(event.target).currentLabel);
     /* only this way can run */
    query.gotoAndPlay(query.currentLabel);
  ]]>
</mx:Script>
<local:intergratedQueryButton id="query" click="clickHandler(event)" x="305" y="500"/>

Thanks Natasha! It works well now!
在2009-07-13,_Natasha_ <[email protected]> 写道:
>Hi,
>?
>to be able to write
>MovieClip(event.target).gotoAndPlay(MovieClip(event.target).currentLabel);
>your button should be a subclass of MovieClip.
>If not MovieClip(event.target) will be null and will not work.
>?
>So you can:
>1. Don't use types and write
>event.target.gotoAndPlay(event.target.currentLabel);
>or
>event.target.gotoAndPlay(event.target["currentLabel"]);
>2. See methods of intergratedQueryButton and if it have method gotoAndPlay use it.
>intergratedQueryButton(event.target).gotoAndPlay(intergratedQueryButton(event.ta rget).currentLabel);
>You can't set two superclasses, so intergratedQueryButton can be a only a Button or a MovieClip, not both.
>

Similar Messages

  • How to access the flash player button controls from FLEX?

    Hi,
    I'm creating one application in that i hav created a presentation in Adobe Presenter and i played in flex, now i want to control the flash player buttons from flex 3.
    Can anyone tell how to solve this, i need the solution for this very urgent, please help.
    Thanks in Advance.

    Hi,
    I'm creating one application in that i hav created a presentation in Adobe Presenter and i played in flex, now i want to control the flash player buttons from flex 3.
    Can anyone tell how to solve this, i need the solution for this very urgent, please help.
    Thanks in Advance.

  • Flash button that controls breeze play button

    Is it possible to create a flash button that is scripted to
    control the play and pause button on the breeze playbar? What I am
    looking for is a way to have a button that would start a slide
    again after it has stopped and is waiting for the user to start
    again.

    Hi!
    If you want to control the viewer with a Flash button you've
    embedded in a powerpoint slide (prior to using presenter to convert
    it) try this:
    (1) Make your button in Flash, and add this Actionscript to
    the first slide (replace [btnName] with the name of your button
    instance:
    btnName.onRelease = function () {
    _root.m_controlBar.m_slideNextBtn._onRelease();
    (2) Insert your button's swf in the PPT presentation and
    compile with Presenter. Now, when the user clicks the button, it
    will simulate pressing the "next slide" button in the viewer's
    control bar.
    Here are some of the other button names; to use these
    instead, just replace "m_slideNextBtn" in the above code:
    Play/pause button "m_playBtn"
    Next slide button "m_slideNextBtn"
    Previous slide button "m_slideBackBtn"
    View changer button "m_viewChangeBtn"
    Attachment Button "m_attachmentsBtn"
    Volume Button "m_volumeBtn"
    Hope that helps!
    ~Marc B

  • Flex control inside flash Sprite control

    Hi,
       in my project,i have a requirement to add flex control e.g. TextArea to flash Sprite control. is this possible?
    regards,
    Rakesh

    yes you can add TextArea to Sprite
    set the x,y, width and height of the TextArea object and added to Sprite using
    spriteObj.addChild(textareaObj);
    If this post answers your question or helps. Please mark it as such

  • Replacing Flash Buttons/ Preview Issues

    I have old Flash Navigation Buttons on my website from years ago. I have been trying to replace them. What would be some good and simple ways to do this? It appears that the programs (DW5, DW6, and DWCC) won't let me do this. For example, I deleted the flash button that says "About" and then typed in new word "About" instead and linked it in a simply way to the "About" page.
    However, when I preview this in browsers, my flash button/s are still appearing in the preview window browser, even though already deleted many times in my Design View. The preview page has also showed all sorts of disorganization and chaos for these deletions of old navigation buttons which are not consistent with what is displaying on my working Design copy window. Any suggestions? (Mac Os X 10.8.4)

    Thank you all for your suggestions! I have emptied my cache, cookies, and refreshed my browser window. It looks like one button "Resources" in the left navigation panel managed to disappear from all pages on the website-- yet I only made changes to a select few pages. However, many of the changes I made are not showing up yet on the test page.
    I am not that familiar with code view so I use Design view mostly. Yet, I did split the view and see the selected area in the code responsible for a flash button. I tried to delete that in code view, as well.
    Here is my test page. In design view, I left most of the old navigation buttons intact, except for the bottom three.
    I tried to eliminate the bottom three flash buttons and replaced with linked words "About", "Resources", and "Home" (see below). Yet, on the web page, only the "Resources" button has disappeared, and the words I typed in to replace are not displaying yet.
    Resources

  • Issue adding Flash Buttons

    I'm trying to put flash nav button in a template that I built
    for a web site. Within 'Inset Flash Button' under Link: I browse
    for the .html page that I want to link the button to. When I'm
    finished and click 'OK' I get a error message; this is a site
    related Link. Please use either an absolute or document-relative
    link.
    All the .swf (flash buttons) files are in my Template folder
    that also houses my main_elements.dwt file.
    What an I doing wrong?
    Thanks

    Must you use Flash buttons? You can avoid this problem
    altogether by using
    ordinary graphic buttons or even CSS styled text. Besides,
    there are many
    disadvantages to the use of Flash navigation -
    1. Some people don't have Flash installed - what do they do?
    2. Search engines don't parse Flash links - your site will
    not be spidered
    3. Screen assistive devices don't parse Flash links - what
    will those users
    do?
    4. DW cannot maintain links within a Flash movie, so if you
    move or rename
    a linked file, your navigation will break - what will you do?
    It's usually a very bad idea for these reasons...
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Mike4177" <[email protected]> wrote in
    message
    news:fp1o44$5ps$[email protected]..
    > I'm trying to put flash nav button in a template that I
    built for a web
    > site.
    > Within 'Inset Flash Button' under Link: I browse for the
    .html page that I
    > want
    > to link the button to. When I'm finished and click 'OK'
    I get a error
    > message;
    > this is a site related Link. Please use either an
    absolute or
    > document-relative
    > link.
    >
    > All the .swf (flash buttons) files are in my Template
    folder that also
    > houses
    > my main_elements.dwt file.
    >
    > What an I doing wrong?
    > Thanks
    >

  • Flash Button Navigation Issues

    Hello all,
    I am a novice site designer. My first challenge is to design a navigation bar once and used by all web pages.  I built it using Flash buttons.  The concept works fine in a flat file, but when I'm viewing a web page that sits in a different directory than the flash navigation buttons, the buttons point to a file in the current directory which doesn't exist. I want the buttons to still point to the flash files in the parent directory.
    I'm using Dreamweaver CS2 to create my flash buttons. I'm using PHP include statements to include my flash navigation bar. When I create the php file in another directory, click on flash button, all heck breaks loose. I look at the URL and the link appends the PHP file that the flash button should be pointing to whatever directory my current web page is in.
    It seems like, I should just create each button  as a absolute path, http://rootdirectory.com/filename.php, but it still uses relative path when I'm looking at web page that sits in another directory and appends the navigation link to the current directory http://rootdirectory.com/currentdirectory/filename.php although it points to a link in the root or parent directory.
    Do I not know how to create flash buttons using the absolute paths?

    Movie1 and Movie2 should have a name in (Properties -
    Instance name).
    Assuming that button on Movie1 is on the movie, not inside
    the movie, that both movies are on the same timeline, and that you
    want to go to Movie2 frame 5, for example.
    Button on Movie1
    on(release){
    _root.Movie2.gotoAndStop(5);
    Hope this helps.

  • Flash Button and IE7 issues

    When I first built www.tutsheaven.com, I used Dreamweaver and
    Flash buttons. Everything has worked fine until IE7 came out. Now,
    you need to double click on the buttons to navigate to the next
    page. Is there a fix for this problem, or do I need to change all
    of the buttons on this and some other sites?
    Bob Tuttle
    707-322-4959
    [email protected]

    update dreamweaver 8 to 8.02, or get dreamweaver cs3.

  • Flash button script to control browser window

    I would like to open a browser window from a Flash button
    which will open my .swf into an html page with specific height and
    width with no tool bars just like: the "click here for demo" button
    in www.teachingtextbooks.com. It opens a window with no tool bars
    and it fits the .swf file perfectly. I see javascript in the html
    page that looks like it is part of the script however I am assuming
    their is script on the button as well.
    Please help.
    Thanks,
    Green

    Thank you for your help on this. I copy and pasted your code
    (on the button and I rec'd 2 errors. I copied and pasted here. I
    will put the code on the frame if I can get this working.
    **Error** Symbol=premier_mc, layer=angelmovie, frame=151:Line
    2: ')' or ',' expected
    getURL("javascript:YourWindow=window.open("
    http://www.google.com",'YourWindow','width=850,height=650,left=0,top=0,toolbar=No,location =No,scrollbars=No,status=No,resizable=No,fullscreen=No');
    YourWindow.focus(); void(0);");
    **Error** Symbol=premier_mc, layer=angelmovie, frame=151:Line
    3: Unexpected '}' encountered
    Total ActionScript Errors: 2 Reported Errors: 2
    Frame 151 is where the button is and there is only 3 lines of
    code in the Action Script panel. Any idea why I am getting the
    error. I won't have to add code to the html page?
    Thank you.

  • How can I Access the Flash "Slide class" using flex and ActionScript 3?

    Hi,
    I hope someone can help me solve a problem...
    I'm using the flex SwfLoader to load a flash side
    presentation as follows...
    <mx:SWFLoader id="ss_slides" source="ss_slides.swf"
    width="320" height="240"/>
    I would like to access the flash "Slide Class" using flex so
    I can make the following call...
    Slide.gotoNextSlide();
    Anyone know how I can do that?
    Would it be through the SwfLoader Object?
    Is there another way?
    F.Y.I. Here is a snippets about the Slide class from the
    Flash 8 help...
    Using the Slide class (Flash Professional only)
    You use the methods and properties of the Slide class to
    control slide
    presentations you create using the Screen Outline pane for a
    Flash Slide
    Presentation, to get information about a slide presentation
    (for example, to
    determine the number of child slides contained by parent
    slide), or to navigate
    between slides in a slide presentation (for example, to
    create "Next slide" and
    "Previous slide" buttons).
    You can also use the built-in behaviors that are available
    in the Behaviors
    panel to control slide presentations. For more information,
    see Adding controls
    to screens using behaviors (Flash Professional only) in Using
    Flash.
    Thanks,
    Chris S.

    Hi Chris,
    You cannot access the methods of the Flash 8 movie from Flex.
    And you can't do it the other way around either.
    The only way to communicate is to create a LocalConnection on
    each side.
    M.

  • Adobe Captivate Flash Buttons in Moodle

    I am using flash SWF files to control Captivate Course in Moodle and I have trouble with CLOSE pop up window flash button. It works in IE and FIrefox but not in Chrome and OPERA when course is opened via Moodle. I have created simple html page with link that opens pop up window containing the same course and this way the button works in all browsers. ????? Again, in MOOdle it doesn't.
    In Chrome Developer Tools I have tracked this error when clicking on close pop up window flash buttom: Ignoring cross-frame javascript URL load requested by plugin.
    The button itself is using this AS3:
    pbcExit_mc.addEventListener(MouseEvent.CLICK, myBtnClicked);
    function myBtnClicked(e:MouseEvent):void {
    navigateToURL(new URLRequest("javascript:window.opener=self; window.close()"), "_parent");
    Does anyone have a clue what is the problem?
    Thank you,
    Vito

    I am using flash SWF files to control Captivate Course in Moodle and I have trouble with CLOSE pop up window flash button. It works in IE and FIrefox but not in Chrome and OPERA when course is opened via Moodle. I have created simple html page with link that opens pop up window containing the same course and this way the button works in all browsers. ????? Again, in MOOdle it doesn't.
    In Chrome Developer Tools I have tracked this error when clicking on close pop up window flash buttom: Ignoring cross-frame javascript URL load requested by plugin.
    The button itself is using this AS3:
    pbcExit_mc.addEventListener(MouseEvent.CLICK, myBtnClicked);
    function myBtnClicked(e:MouseEvent):void {
    navigateToURL(new URLRequest("javascript:window.opener=self; window.close()"), "_parent");
    Does anyone have a clue what is the problem?
    Thank you,
    Vito

  • Flash buttons not working in IE7 and Chrome

    Here's my website where the problem is occuring www.bakercreative.co.uk
    As you can see the Flash buttons animate, but when clicked they should go to a new html page.
    I've tested it in IE8 and Firefox without any problems but it's not working in IE7 and Chrome.
    Does anyone know what the problem is? Could it be the html code or the flash file itself?
    Thanks

    Hi, Glad you were able to solve that issue with the buttons and Chrome. Any small thing can cause big problems!! LOL
    I'm sure IE7 will test out ok, IE6 did Your website is very nice and has a variety! I hope it all comes together for you.
    Thanks,
    eidnolb

  • Flash button link will not work in CS4

    Can anyone walk me through step by step to get a flash button link to work in CS4?  I tries action scripts 2 and 3... I cut and pasted a bunch of code on line, watched tutorials, and no matter what i do, the link won't work in CS4.  The button looks and works fine, but won't go to the web site ot web page after clicking on it.
    At this point, I am so confused, i think it would be better if someone walked me through step by step.  My email is [email protected]  I can email the button is that would help.  Thanks.
    Steve.

    Hi,
    This issue is fixed in Encore CS5.
    Thanks,
    Pankaj Gauba

  • Javascript call from a Flash button

    I have 2 Panel Groups of 5 panels each and I made a Flash
    button to controll them.
    The following code works if the panels are both open but it
    only works the first time.
    Then the second time I get an error;
    cpg is undefined
    CODE:
    on(release){
    getURL("javascript:cpg.closeAllPanels();cpg2.closeAllPanels()");
    This would need to work for both panelgroups even if only one
    is open.
    I tried using fscommand but not sure how to write it.

    Hi Doug,
    A few questions for you...
    <ol>
    <li>What functionality are you trying to achieve?</li>
    <li>What version of APEX are you using?</li>
    <li>When you say 'process', do you mean 'Page Process'?</li>
    </ol>
    There are definitely ways of submitting the page and triggering a page process to run via JavaScript, but it would be good to better understand your requirements first before proposing a certain solution.
    Regards,
    Anthony.

  • CS3 Web Standard SE. Can't edit Flash buttons

    I have an issue where I am unable to edit Flash buttons or
    Flash text that have been created in DW CS3.
    I am using CS4 Web Standard SE. A colleague of mine is using
    the same software and also unable to edit these.
    Until now I thought it was maybe a trial issue but have today
    activated the software. But the issue remains.
    Regards
    Dave

    > Until now I thought it was maybe a trial issue but have
    today activated
    > the
    > software. But the issue remains.
    It's not a Trial issue. It's a conscious design decision by
    Adobe announced
    in Aug 07.
    http://www.adobe.com/go/kb402489
    Flash buttons and Flash text have always been ill conceived
    features for
    webpages.
    Adobe recognised this by dropping them from DW CS4.
    If you still want to keep them and edit them, use DW CS3.
    However, consider using CSS styled buttons instead.
    Regards
    John Waller

Maybe you are looking for