Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Site Design > Flash Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Flash Discussion Forum Flash design presents a limitless number of possibilities for your sites and designs. Discuss your Flash ideas, questions and issues here.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-07-2004, 09:21 AM
WebProWorld New Member
 

Join Date: Nov 2003
Location: London
Posts: 9
kimmykool RepRank 0
Default Object methods

I am having greif with a game I am writing in Flash that I have previously written in VB, and DIV.

I create an (alien) object as a flash movie clip. The alien is controlled by a switch statement contained within each alien.
e.g.
switch (mode)
{
case "leave mother ship":{some function};
case "return mother ship":{some function};
}
I have created a function in the root of the alien called 'set mode' (this.mode="leave mother ship")but it seems to be private and inaccessible.
I now need to tell the alien from the outside to switch mode.
Any help, tips or ideas much appreciated.
__________________
If that's not confusing, the nuclear dance
Of electrons and suchlike is governed by chance!
Reply With Quote
  #2 (permalink)  
Old 08-10-2004, 08:45 PM
ivr ivr is offline
WebProWorld Member
 

Join Date: Jul 2003
Location: Warragul,Vic. Australia
Posts: 50
ivr RepRank 0
Default Flash

Hi Kimmy, I am not up with flash but run swish which makes swf files.
If you try putting a stop and then a play then a stop then a play and so on in the scene timeline, then place your alien in the first play then a remove in the timeline on a stop at least three places forward.
Make a command to to go to that point on the timeline to make your animation play
__________________
Hi All, I hope I can help the forum
Reply With Quote
  #3 (permalink)  
Old 08-12-2004, 02:44 AM
WebProWorld New Member
 

Join Date: Sep 2003
Location: mexico city
Posts: 14
compumonster RepRank 0
Default

Hi Kimmy, your code is not very specific, so I won't check the sintax (anyway, I haven't a very good memory for commas) but I dare to think that your problem is the "mode" variable in the "switch(mode)" sentence. You have to put global variables in a place where functions can find it. Normally in "root". So check if its in "root" and address to it properly. That's "switch(_root.mode)".
Reply With Quote
  #4 (permalink)  
Old 08-12-2004, 06:46 AM
WebProWorld New Member
 

Join Date: Nov 2003
Location: London
Posts: 9
kimmykool RepRank 0
Default Sorted

Many thanks compumonster, you hit the nail on the head
__________________
If that's not confusing, the nuclear dance
Of electrons and suchlike is governed by chance!
Reply With Quote
  #5 (permalink)  
Old 08-13-2004, 01:50 AM
WebProWorld New Member
 

Join Date: Sep 2003
Location: mexico city
Posts: 14
compumonster RepRank 0
Default

You're welcome, Kimmy. Have a nice day.
Reply With Quote
Reply

  WebProWorld > Site Design > Flash Discussion Forum
Tags: ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0