Results 1 to 5 of 5

Thread: Sending the name of a control to a module *Resolved*

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    251

    Sending the name of a control to a module *Resolved*

    Hey guys!

    I have a form and a module.

    My form have an object called flash and my module have a function.

    I am trying to send trought the function the name of the object, but I am not having success... Nothing is happening. Nor even an error.

    In my form I have the following function call:

    PegaFlash 101, "CUSTOM", "logo.swf", Me, Flash


    In my module I have the following function:

    Public Sub PegaFlash(i As Integer, swf As String, arquivo As String, F As Form, O As Object)

    .
    . codes...
    .
    F.O.Movie = sEnv & arquivo

    End Sub



    The F variable is getting correctly the name of the form that I passed. But the Object flash is not being received by the function..

    If I change the last code to the following:

    F.Flash.Movie = Senv & arquivo

    everything will run fine...

    What am I doing wrong?

    Thanks in advance,

    Elminster
    Last edited by Elminster; Mar 2nd, 2004 at 05:01 PM.

  2. #2
    Lively Member
    Join Date
    Jan 2003
    Posts
    79
    Have you tried passing F.Flash.Movie as one parameter i.e. the object rather than as separate parameters?

    Good luck,

    Dave.

  3. #3
    Member
    Join Date
    Oct 2002
    Location
    too expensive land
    Posts
    46
    IF YOU CAN GET IT BY WRITING F.Flash.Movie IT IS A WASTE TO TRANSFER THOSE ARGUMENTS. LEAVE IT THIS WAY, NO?
    IF YOU INSISTE - I THINK THE PROBLEM IS THAT YOU SHOULD USE THE "SET" IN ORDER TO TELL THE MECHINE THAT O IS REFERING TO THE CONTROL ON F FORM.
    SO TRY:

    DIM OO AS OBJECT
    SET OO= Flash
    PegaFlash 101, "CUSTOM", "logo.swf", Me, OO

    OR

    MAYBE YOU SHOULD USE A SPECIFIC VAIREBLE TYPE:

    Public Sub PegaFlash(i As Integer, swf As String, arquivo As String, F As Form, O As Flash Type)
    when the going gets tought, jump on your bike and drive away..

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    251

    Yeap

    Thanks for the answers guys!

    I tryed the 3 ways but no one works...

    I need to send the object trought the function because in some cases I will have more than one shockwave object in a form, so if I dont do that I will have to write a new function for every new object in a form that I use after the first.. =-(

    Thanks guys

    Elminster

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    251

    I find out!

    I make a new way to resolve that.

    I create an index control for flash.. Sou I just pass the index..
    I dont need to create more functions for each control anymore

    Thanks for your help guys!

    Elminster

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width