Making Sprites visible on seperate frames

Hi. Im trying to get my head around this and it is doing my
head in.
For example, while in frame 1 I want to be able to click a
button which will then make a sprite visible in frame 10, which is
a different page, i.e the sprite is only in frame 10 and the button
is only in frame 1.
If they were on the same page I could use...
on mouseup me
sprite("1").visible=true
end
but because they are on different frames to one another it
tells me there is a property error with "visible". I need to make
the function global some how but not sure how to do this.
PLEASE HELP
Lee

Set a global variable in your mouseUp handler then use that
variable's state
to set the visible of the sprite in frame 10 in its
beginSprite handler
-- put this in a movie script
global gSetVis
on StartMovie
gSetVis = FALSE
end
-- integrate this into the script/behavior for the button
global gSetVis
on mouseUp me
gSetVis = FALSE
end
--Then in frame 10 on the sprite that needs to be made
visible
global gSetVis
on beginSprite me
sprite (me.spriteNum).visible = gSetVis
end
Craig Wollman
Word of Mouth Productions
phone 212 928 9581
fax 212 928 9582
159-00 Riverside Drive West #5H-70
NY, NY 10032
www.wordofmouthpros.com
"Leegee3" <[email protected]> wrote in
message
news:eidcn4$be8$[email protected]..
> Hi. Im trying to get my head around this and it is doing
my head in.
>
> For example, while in frame 1 I want to be able to click
a button which
> will
> then make a sprite visible in frame 10, which is a
different page, i.e the
> sprite is only in frame 10 and the button is only in
frame 1.
>
> If they were on the same page I could use...
>
> on mouseup me
> sprite("1").visible=true
> end
>
> but because they are on different frames to one another
it tells me there
> is a
> property error with "visible". I need to make the
function global some
> how but
> not sure how to do this.
>
>
> PLEASE HELP
>
>
> Lee
>

Similar Messages

  • Making a seperate frame non resizable

    Is it possible to make a seperate frame non-resizable and if so how? If I set the resizable property of the window then this simply makes the browser non-resizable rather than the seperate frame. Is there some PL/SQL code that can do this for me or is it possible to set this in the forms web config? Thanks for any help
    Dan

    I have tried this method, it looks like it should run, but when i compile it the browser displays................
    "Untitled1.java": Error #: 750 : initialization error: com.borland.compiler.symtab.LoadError: neither class nor source found for java.lang.Object
    public class Untitled1 extends Component {
    public void createPanel()
    JFrame frame = new JFrame();
    frame.setUndecorated(true);
    frame.setLayout(new BorderLayout());
    MyDisplay test = new MyDisplay(frame);
    test.setLayout(new BorderLayout());
    frame.add(test, BorderLayout.CENTER);
    JLabel label = new JLabel("This is just a test");
    test.add(label, BorderLayout.CENTER);
    frame.pack();
    frame.setSize(500, 500);
    // make sure you pack and/or set size first...
    Dimension dS = Toolkit.getDefaultToolkit().getScreenSize();
    Dimension dF = frame.getSize();
    // make sure it's not off screen
    int x = (dS.width/2)-(dF.width/2);
    int y = (dS.height/2)-(dF.height/2);
    if(x < 0) x = 0;
    if(y < 0) y = 0;
    frame.setLocation(x, y);
    frame.setVisible(true);
    contentpane.add(sc);
    jscrollpane sc = new jscrollpane();
    jtextarea ta = new jtextarea();
    /**Main method*/
    public static void main(String[] args) {
    try {
    UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    catch(Exception e) {
    e.printStackTrace();
    new untitled1();
    Do you know how i can correct this erreor!

  • Obtaining true size of a JFrame prior to making it visible

    Is there a way to accomplish the following without making the frame visible first?
    frame.setVisible(true);
    Rectangle frameSize = frame.getBounds();
    frame.setVisible(false);
    The problem is that if I don't make the frame visible, then I get a height and width of 0 in frameSize.
    Thanks in advance.

    its very simple. you can specify the frame size by setSize() method or
    directly you can call pack() method after adding all components. so after calling
    pack() method you can get the frames width and height by getWidth() and getHeight() methods. these methods apply to all components and u can call
    this method before calling setVisible(true).
    i think this will solve ur problem.

  • Problem making buttons visible

    Hi there, I have a poker game that all worked fine until I was told to restructure it in a MVC style. I never had this problem before I changed it but I'm having issues with making my buttons visible when it's the players turn. At first I setVisible to false which works fine, then I call my method to display them from my model and they display fine, so seemings as all is good to here I think it's the next bit that's causing my issue, I have actionListeners attached that when fired setsVisible on all the buttons to false again (which works) but the next time I call my method to make certain buttons visible they don't appear. I've tested that the method is being called with the correct parameter passed and it is. Now I must apologise because my knowledge of swing is very poor but I have searched and read alot and tried several approaches with no joy, I will definitly be studying up more on it in the future but time is against me at the mo. The only thing that seems to half work is if I use this.paint(g) the buttons display as I want them but my program crashes cos to be honest I don't know what g should be. Is this the right approach or is there a more simple way I can update my GUI to display my buttons?

    Works for me but you could try to add a revalidate(); repaint(); on the buttons parent.
    import java.awt.BorderLayout;
    import java.awt.EventQueue;
    import java.awt.event.ActionEvent;
    import javax.swing.AbstractAction;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    public class TestVisible {
        public static void main(String[] args) {
            EventQueue.invokeLater(new Runnable() {
                public void run() {
                    final JButton button = new JButton("I do nothing");
                    final JFrame frame = new JFrame("Test");
                    frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
                    frame.getContentPane().add(button);
                    frame.getContentPane().add(new JButton(new AbstractAction("Toggle") {
                        @Override
                        public void actionPerformed(ActionEvent e) {
                            button.setVisible(!button.isVisible());
    //                        frame.getRootPane().revalidate();
    //                        frame.getRootPane().repaint();
                    }), BorderLayout.PAGE_START);
                    frame.pack();
                    frame.setLocationRelativeTo(null);
                    frame.setVisible(true);
    }

  • Help with making JLabel visible for a few seconds only

    Hello guys,
    I need help with making a JLabel object visible for a few seconds only and disappear when a JButton has been clicked.
    Here is piece of code where I add mouse listener to the JButton object in my case is (jrbFigure1) and
    when is called sets icon and text to the JLabel jlbl object:
    jrbFigure1.addMouseListener(new MouseAdapter() {
    jrbFigure1.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent e) {
    jlbl.setIcon(cross);
    jlbl.setText(wrong);
    This piece of code is in a switch statement, the statement is in a method.
    The JLabel jlbl object is added in a panel in the constructor of the class.
    I really hope someone could help me on this issue.
    I would like to thank you in advance for any help or advice given.

    Bobson wrote:
    Sorry for posting my issue twice, I thought, I posted it in a wrong forum:)It's OK. We'll ask the mods to delete the other thread.
    I want the label to appear for X seconds when then button is pressed and disappear after that.Then a Swing Timer is what you want to use.
    I need to do this in a number of cases from a switch statement because I several buttons.Better to have several ActionListeners, one for each button or each type of button, rather than one ActionListener with a large switch statement, a so-called switch-board listener. They're messy to debug and upgrade.
    I tried to use Swing Timer, but I cannot set it properly.Go through the Sun Swing tutorial on Swing Timers. It's all outlined for you there: [http://java.sun.com/docs/books/tutorial/uiswing/misc/timer.html]

  • Sprite Visible

    I have a script that checks for the visibility of checkboxes
    -- then it goes to the next marker
    go "Plan1"
    cursor -1
    Now it sets the visibility of certain pictures based on which
    checkboxes were selected.
    Problem: it sets the visibility of sprites on the original
    screen also.
    Shouldn't it only set the visibility of the sprites on the
    new screen - since I have used go "plan1" to get to the new
    screen

    The visible property belongs to the sprite channel, not the
    item that
    currently occupies the sprite channel. So, if you set a
    sprite channel
    to be not visible, it will stay not visible until you tell it
    to be
    visible again.
    You may want to use the blend property instead, this property
    belongs to
    the individual element in the sprite channel, not the channel
    itself.
    Be aware that if a sprite's blend value is set to 0, it is
    still an
    active sprite and any code attached to it will work. So a
    cursor change
    will still show if the user slides the cursor over that
    hidden sprite.
    This will not happen if you use the visible property.
    Rob
    Rob Dillon
    Adobe Community Expert
    http://www.ddg-designs.com
    412-243-9119
    http://www.macromedia.com/software/trial/

  • Making components visible

    Hi there,
    Heres my problem.I ask the user how many textboxes the require.If they say ten then I create 10 textboxes ,add theese to a panel and then add the panel to the main frame.This works but the panel is not visible until the main frame is resized.How can I get the panel and its components to appear.I have tried setvisible(),repaint() and all them.Has anyone any ideas?
    Thankyou
    Peter

    Have you tried validate() on the main frame?

  • Component is  visible only  when frame is resize why?

    hai,
    In My application the components are visible only when the JFrame is resize...... why is it so?
    The problem is in login screen..
    that is the frame is displayed in middle the default layer for this borderlayout.... the panel here consists of gridbaglayout
    whats the problem? the size are all i have checked no problem
    Please help me out
    Shanthy

    Probably because you've added the components to the GUI after the GUI is visible.
    If this is the case then you need to revalidate the parent container.
    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

  • Making things visible one at a time

    Hi I am hoping someone can help me out here!
    I have one button, that when clicked should display several images, one at a time. At the minute they are all just coming on together, how do i seperate the functions so they come on individually, for example like bullet points, e.g click once and image1 appears, click again and image2 appears etc... so eventually all of the images are on screen, but they don't all just appear together, if that makes sense!
    Thanks for reading

    hey here is the code for ur task
    import flash.events.MouseEvent;
    var imageUrl:Array = new Array("images/image1.jpg",
       "images/image2.jpg",
       "images/image3.jpg",
       "images/image4.jpg");
    var imageLoaded:Number = 0;
    var loader:Loader;
    var xPos:Number=50;
    var yPos:Number=30;
    clickButton.addEventListener(MouseEvent.CLICK,onClick);
    function onClick(event):void{
    loader = new Loader();
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onCom);
    loader.addEventListener(IOErrorEvent.IO_ERROR,onErr);
    loader.load(new URLRequest(imageUrl[imageLoaded]));
    function onCom(event):void{
    loader.content.x=xPos;
    loader.content.y=yPos;
    loader.content.width=100;
    loader.content.height=100;
    addChild(loader.content);
    xPos+=110;
    imageLoaded+=1;
    if(imageLoaded>(imageUrl.length-1)){
    clickButton.removeEventListener(MouseEvent.CLICK,onClick);
    function onErr(event):void{
    trace(event);
    U can find the complete fla and the working swf here
    http://www.4shared.com/file/1bu8Vjfx/clickImage.html

  • Acrobat Pro: Making timecode visible in embedded sound files?

    Hello.  I teach music history courses.  For copyright purposes (i.e., to prevent music theft), I am embedding sound files in PDFs for student use.  Some of my commentaries have timing cues (e.g., Horns enter at 3'38"), but I've not found a way to make the timecode visible to the students.
    Time codes are, of course, a standard feature on most music players (iTunes, Quicktime, WMP, etc.), as well as on many Flash players.  It seems reasonable that the media player in Acrobat should have a similar feature, even if disabled by default.  But if it does, I have been unable to locate or enable it.  Does such a feature exist on Acrobat?
    If not, does anyone have a recommendation for a possible alternative?  Thanks.

    You do know that as of Acrobat 9.0 you are able to include Flash Movies in PDFs. Now as to how that works I couldn't tell you as I haven't used Flash much even though I have it as part of Studio 8.

  • BPM 11g - Making comments visible to all interactive activities in process

    Does anyone know of a way to make comments from one interactive activity visible in a subsequent interactive activity within the same process?
    We need this visibility since there are multiple human tasks in the process and the comments are relevant to the instance as a whole as it travels through the process.
    I've attempted to create a process data object of type "TaskExecutionData" and use that to map the comments in and out of the data associations for the interactive activities, but ran into bpel faults. The first attempt just used simple data association mappings for the execData.userComment collection (array) - but that results in assignment errors at runtime if there are no comments present. Having seen these errors before and having resolved them using a XSL transformation, I tried that route as well to map the userComment collection using a for-each construct - however that attempt resulted in a different bpel fault at runtime referring to duplicate definitions of the same type or something to that effect.
    Any ideas?

    Yes, but this is in version 11g, not 10g or 6. The human tasks use the ADF task flows, as is standard practice in 11g.
    I've attempted mapping the userComment array from the task's execData to process variables, but that effort resulted in bpel faults at runtime.
    I managed a roundabout way (i.e. a hack) to get the comments into the new task from the previous one using the human workflow services API in a managed bean of the task flow, but I'm having difficulty getting the comment iterator of the data control to update and pull in the comments.

  • Making Hyperlinks Visible On a PDF Printout

    G'Day,
    I am wondering if it is possible to make the hyperlinks in my PDF document (these are internal relative hyperlinks) visible -- so that when you print the document you can see the hyperlink (blue underlined part) in the document?  At the moment, I print my document...and none of the underline parts (hyperlinks) are visible on the printout.  I have researched this but can't seem to find any info.  Also, is there a way to check my PDF document to see what dpi it has?  The forums all say that this is not possible, but surely there is a way to view it or at least set your pdf to a particular dpi.  I would appreciate any insight.
    Nick
    Brisbane, QLD

    To check image resolution and lots more info use Acrobat Pro preflight feature.
    There's a few options in Acrobat to deal with your hyperlink question, you can use a text tool to change the colou of the text or indeed add an underline.
    It may be that the hyperlinks in your PDF are being automatically recognized as such by acrobat/reader.
    (to check go to edit>preferences>general, create links from URLs)
    in that case whenprinting the doc, the links don't have actual print info to print.
    Or the link is an actual link but has been set to an invisble border to be used, you could change the properties of the link using the link too, to hnage the border to an underline for example.
    If unsure, share a sample pdf somewhere, so we can have a look.

  • Making a video with single frames

    Hi,
    I'd like to make a video with single frames.
    One of my computergames is able to take 25 frames per second (or 30, 40 etc.). The game saves the frames in a folder. For one minute there are over 1000 frames.
    Now I need to know, how I can tell After Effects that every 25 frames are one seconds.
    I just want to make a movie of this game. This will be the easiest way if After Effects can handle with these single frames.
    Is it possible? I will be very happy if some can explain me the way to realise my idea.
    Sincerely,
    RazooN

    Footage Interpretation and preferences for image import.
    Mylenium

  • Always render after making video visible/hidden?

    I hope someone can help me, I've spent more time rendering than actually working on this project.
    I'm cutting together a music video that has 3 takes. The video is layered one track on top of the other, with the only audio being the guide track. Since I can only view one video track at a time, I have to make them visible on and off. However, every time I do, it needs me to render the entire video again. Which has naturally, become rather time consuming.
    I've done a lot of videos, and this hasn't happened before. Solutions?
    Thanks a lot!

    You are not using the application correctly. If you cannot use the multicam function, the standard way to do what you're doing is to resize the images so you can see all the clips on multiple tracks simultaneously. To work like this you probably should switch to Unlimited RT.
    I would suggest that though you've ben using the application for years you need to speed a little time learning it.

  • Making a visible top layer invisible for buttons/ controls on a layer underneath it.

    THE PROJECT
    I have 3 layers in a CS3 project, in the following order:
    - top Layer (semi-transparent Vignet Layer, and some additional Graphics, all this is contained in a dynamicly loaded mc)
    - Middle layer (Content, this contains the navigation and content. All of this loads dynamicly)
    - Background (this contains a screenfilling Background image and some graphic alements, all this is contained in a dynamicly loaded mc)
    THE PROBLEM
    The top layer blocks all off the dynamic content because its on top of it.
    SOLUTION
    Dynamicly disable the top layer, so flash doent use it anymore.
    I want to keep it visible, but not accessible for any mouse actions.
    It has to keep the dynamic content underneath it visible for interaction.
    I hope I Described it clear enough, so someone can give me the solution.
    I gues it's some real simple code attachment.
    Thanks.

    I made a quick exaample to demo having a layer of something atop a controls layer and disabling it from interfering with controls below it.  For this example, the lightened rectangular area is the Vignet layer that sits atop a button on a layer below it--I threw in a background layer too, just to cofuse the eyeballs I guess..  When you click the button it enables the Vignet layer so that it blocks the button, and clicking on it disables it again... just a liuttle variety of commands that might be useful for you at some point.
    If you can let me/us know whow you file differs, then maybe it will be easier to identify a different solution if one is needed.
    http://www.nedwebs.com/Flash/Vignet.fla

Maybe you are looking for

  • Getting Error in Viewing Report..Please help

    Post Author: gauravitech CA Forum: JAVA Hi All,   I am new to Crystal Report world.. I am trying to integrate Crystal Report with FileNet. FileNet has its own API to call webservices for Crystal report which bring reports back to the web application.

  • How to get mail from old computer to new in one place?

    I've had lots of trouble merging my data from a G4 iMac to a new iMac. Now my problem is mail. After the first Migration all was OK with mail. Then, because of other problems, I had to erase the entire new iMac. In doing so I lost about 10 days of ma

  • Searching through notes in pdf reader for ipad

    I, does anyone know if i can get the search function to search also my added text notes? For example i could write the word 'action' throughout a large document then want ro search later rather than go through the whole document page by page. Thnx.

  • Ps elements 10 on mac problems

    hi, i just downloaded the programm yesterday from the app store onto my imac. i want to use it as an extention to my aperture 3. I have the following questions/problems: + starting the programm takes at least 2 minutes, is this normal? I use an Imac

  • IWeb weird publish problem

    So I've been using iWeb for about 2 weeks now. I installed in in my G3 iBook (via Pacifist, I know, I know, but I bought it without reading that I needed a G4 or higher.. sigh my poor ol' iBook).. any way - iPhoto and iWeb work Awesome. I photo is mu