Letting users pick a character - configuration option
After submitting a number of different 'bobble head' flash toys to the gallery, they were rejected for being to similar to each other, and the advice was 'add a configuration option that lets the user select which bobble head they want.' which is fair enough and I'd love to have that option, but i don't know how to do it..
is it a case of having a flash movie with different scenes, that a configuration option would make the movie jump to.. or is it a case of selecting different URLS that different fla's are located..
thanks in advance for any help
is it a case of having a flash movie with different scenes, that a configuration option would make the movie jump to.. or is it a case of selecting different URLS that different fla's are located..
thanks in advance for any help
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
-
Inappropriate?The first option is what you want to do. In Widgetbox, you can setup configuration parameters that are passed to the widget when it is loaded on a page. One type of config that we offer is a Dropdown box which would let the subscriber to the widget pick a character. You would then look for that parameter name in your flash file and use the value you receive to jump to a frame in your movie. You could use frame labels to match character names for example, or just use the number of the frames as the parameter value.
Another way you could do this is to have a SWF that is just a container that you register as the widget, and then load the existing SWF files that you already have into it based on the value of the parameter.
I’m happy to help
-
hey, thanks for getting back so soon,
I haven't done this before, could you describe a little more what you mean by 'look for that parameter name in your flash file and use the value you receive to jump to a frame in your movie.'
the idea is i'd have a drop down box with character names (i see how to create those) but what would i need to make sure it jumps to the frame label, is it action script code or something else? -
Inappropriate?In order to use the parameters in your code you will want to take a look at our Flash Developer docs: http://docs.widgetbox.com/developers/....
If you need examples, you can check out the AS2 or AS3 examples we have linked to from that page:
Download the ZIP file containing the working example code for the Echo Test (Flash AS2) example widget.
Or
Download the ZIP file containing the working example code for the Echo Test (Flash AS3) example widget.
And you will want to use the gotoAndPlay() or gotoAndStop() functions to jump to the frame: http://livedocs.adobe.com/flash/9.0/m...
These functions are used like this:
gotoAndPlay(12); or gotoAndPlay("bob"); if you've labeled your frame "bob". You label a frame by selecting it in the timeline and entering a label into the properties panel.
Hope this helps.
Omar
I’m confident
-
ok so, i've put all the characters in one fla document..
there's 8 frames each with their own label (corresponding to the character's name) I'm setting up the widget with a drop down box, here's where i'm getting stuck..
do i need to add aditional action script to my movie to make this work (looking at the example i added
'Security.allowDomain('*');
if(wbx_softkey == null){
wbx_softkey = "false";
}
..what do i need as a Param name, do i set my own or is there a specific name for changing frames (which is all i need it to do)
what is the flash mode i need, 'plugin' 'var' or 'string'
and finaly for the menu choices in the value section, can i just put 'gotoAndPlay("name");'
hopefully i'm close to getting this sorted.. and once i get the hang of it i'll be able to do more, without trouble in future.. thanks again! -
Inappropriate?The name of the parameter is arbitrary, you can specify whatever you want. I suggest a parameter with a name like "character" and a display label of "Character:". You will want to make its type Dropdown, and its Flash-Mode = "FlashVar". Then in your code you would have gotoAndPlay(name); without quotes. This assumes that you have labeled frames with the same values as the options for this parameter on Widgetbox.
-
ok well as far as I know I've done all the steps, see pic : http://jmkit.com/hosted/pic1.png
but it still doesn't go to the frame as stated, I've double checked the frame labels etc so i'm not sure what's missing, unless you can point something out that i've done wrong with the settings, or that i've missed some action script inside the movie.. -
Inappropriate?I think you may have misunderstood my instructions.
You don't want the values to have actionscript code in them (see your pic1.png). You just want the names jinx, minx, etc.
Then in your Flash file you want to use code that looks like
gotoAndPlay(_root.character); -
aah ok so the value sets up the word 'character' to translate to the name that the user selects..
so does that - gotoAndPlay(_root.character); need to be on every frame, or just the first keyframe..
and do the value names need to be like "jinx" "minx" or do i need to say 'gotoAndPlay(_root."character"); -
Inappropriate?You would place the gotoAndPlay(_root.character) in the first frame. And the values for the drop downs should be jink or minx (w/o quotes)
1 person says
this answers the question
-
=D ok after a little tweaking and poking around i finally sorted it out.
lol thanks for having patience while i worked this one out XD
..submitting to gallery now =)
Loading Profile...



