-
1. Re: Can I access a label inside of an MC and then go back to the main time line
kglad Jan 17, 2012 10:30 AM (in response to nikolaig)you should have one frame with an flvplayback component and have each button assign a source variable's value that's used by your component:
var sourceVar:String;
function theArrangement_btn_amimated_btnDown(event:MouseEvent):void {
sourceVar="arrangement.flv"; // for example
gotoAndPlay("flv_pb");
}
///
and in your "flv_pb" frame, use:
yourflv_pb.source=sourceVar; // where yourflv_pb is your component's instance name.
-
2. Re: Can I access a label inside of an MC and then go back to the main time line
nikolaig Jan 19, 2012 10:27 AM (in response to kglad)Looks like I am missing something.
Here is my set up for my videos. I will use just two different once for an example sake.
In my section where all the video icons/links are located here what I have assigned two two different buttons:
BUTTON1:
var sourceVarJTV_LampShade:String;
function JTV_LampShade_btn_amimated_btnDown(event:MouseEvent):void {
sourceVarJTV_LampShade="howto_popups/jtvs10w07.flv";
gotoAndPlay("flv_pb");
}
BUTTON2:
var sourceVarJTV_SubRose:String;
function JTV_SubRose_btn_amimated_btnDown(event:MouseEvent):void {
sourceVarJTV_SubRose="howto_popups/jtvs11w06.flv";
gotoAndPlay("flv_pb");
}
Then in "flv_pb" frame I have this code:
SWF_flv2.source=sourceVarJTV_LampShade;
SWF_flv2.source=sourceVarJTV_SubRose;
My FLV Playback component has an instance name of "SWF_flv2"
In the component inspector dialog box I deleted the source path and it is now empty
I am not sure where I went wrong.
I am sure all the sourceVar have to have unique names as I was getting these errors?
-
3. Re: Can I access a label inside of an MC and then go back to the main time line
kglad Jan 19, 2012 11:10 AM (in response to nikolaig)use the code i suggested:
BUTTON1:
var sourceVar:String;
function JTV_LampShade_btn_amimated_btnDown(event:MouseEvent):void {
sourceVar="howto_popups/jtvs10w07.flv";
gotoAndPlay("flv_pb");
}
BUTTON2:
function JTV_SubRose_btn_amimated_btnDown(event:MouseEvent):void {
sourceVar="howto_popups/jtvs11w06.flv";
gotoAndPlay("flv_pb");
}
//Then in "flv_pb" frame I have this code:
SWF_flv2.source=sourceVar;
-
4. Re: Can I access a label inside of an MC and then go back to the main time line
nikolaig Jan 19, 2012 12:22 PM (in response to kglad)Oh, WOW! It is working perfectly now.
My mistake was that I was specifiying the var sourceVar:String;
for every single button. It was not clear to me from the first example that it has to be specified only once.
I made a small test Flash file and everything works now. It still doesn't work on my big flash file, I guess some other code messes it up and I can' not figure what it is exactly.
I would like to include the OUTPUT error message in hopes that you can spot right away what a mistake could be:
VideoError: 1000: Unable to make connection to server or to find FLV on server
at fl.video::VideoPlayer/stop()
at fl.video::FLVPlayback/stop()
at acolyteVideos_fla::mainsite_mc_2/stopF2()[acolyteVideos_fla.mainsite_mc_2::frame484:21]
at flash.display::MovieClip/gotoAndPlay()
at acolyteVideos_fla::mainsite_mc_2/onClick_GoBackToHowTo2()[acolyteVideos_fla.mainsite_mc_2 ::frame484:13]
If there is no immediate cure for it, I will go through code line by line. Since it is working on the test it must be something wrong with my main file.
Additiona question (please let me know if I should paste it as a new thread)
I have similar set up with UILoader. Where different buttons set up to bring a user to individual labeled sections with individual UILoader. Should it be arranged in the same way that it is only one loader and "var sourceVar:String;" code is the one which brings up different content for each button?
-
5. Re: Can I access a label inside of an MC and then go back to the main time line
kglad Jan 19, 2012 1:46 PM (in response to nikolaig)test online.


