Break Beat Matching

This is something I asked a while ago and mentioned in the battles section - I wondered if anyone had any fresh ideas, as it is still puzzling me .

I have two loops of a couple of bars each that work well looped. Listen to them here:

Loop 1
Loop 2

What I’d like to do is to have the first one looped three times and then play the second one - and then back to the first one again.

I know that I could record it as one big loop - but that would be double the size, and putting them on the timeline in approximately the right places doesn’t loop it properly. Does anyone have any fancy ideas perchance?

something like this should work

[AS]
x = new Sound();
y = new Sound();
x.attachSound(“firstSound”);
y.attachSound(“secondSound”);
x.start(0,3);
xplaying = true;
if(xplaying != true){
y.start(1,3);//or however many times you want to loop it
}
[/AS]

quick code but it should work. if not repost